diff options
author | Scott Wood <scottwood@freescale.com> | 2014-04-07 23:49:35 (GMT) |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2014-04-07 23:49:35 (GMT) |
commit | 62b8c978ee6b8d135d9e7953221de58000dba986 (patch) | |
tree | 683b04b2e627f6710c22c151b23c8cc9a165315e /drivers/extcon/extcon-adc-jack.c | |
parent | 78fd82238d0e5716578c326404184a27ba67fd6e (diff) | |
download | linux-fsl-qoriq-62b8c978ee6b8d135d9e7953221de58000dba986.tar.xz |
Rewind v3.13-rc3+ (78fd82238d0e5716) to v3.12
Diffstat (limited to 'drivers/extcon/extcon-adc-jack.c')
-rw-r--r-- | drivers/extcon/extcon-adc-jack.c | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/drivers/extcon/extcon-adc-jack.c b/drivers/extcon/extcon-adc-jack.c index e23f1c2..5985807 100644 --- a/drivers/extcon/extcon-adc-jack.c +++ b/drivers/extcon/extcon-adc-jack.c @@ -27,16 +27,16 @@ /** * struct adc_jack_data - internal data for adc_jack device driver - * @edev: extcon device. - * @cable_names: list of supported cables. - * @num_cables: size of cable_names. - * @adc_conditions: list of adc value conditions. - * @num_conditions: size of adc_conditions. - * @irq: irq number of attach/detach event (0 if not exist). - * @handling_delay: interrupt handler will schedule extcon event - * handling at handling_delay jiffies. - * @handler: extcon event handler called by interrupt handler. - * @chan: iio channel being queried. + * @edev - extcon device. + * @cable_names - list of supported cables. + * @num_cables - size of cable_names. + * @adc_conditions - list of adc value conditions. + * @num_conditions - size of adc_conditions. + * @irq - irq number of attach/detach event (0 if not exist). + * @handling_delay - interrupt handler will schedule extcon event + * handling at handling_delay jiffies. + * @handler - extcon event handler called by interrupt handler. + * @chan - iio channel being queried. */ struct adc_jack_data { struct extcon_dev edev; @@ -64,7 +64,7 @@ static void adc_jack_handler(struct work_struct *work) ret = iio_read_channel_raw(data->chan, &adc_val); if (ret < 0) { - dev_err(&data->edev.dev, "read channel() error: %d\n", ret); + dev_err(data->edev.dev, "read channel() error: %d\n", ret); return; } @@ -95,7 +95,7 @@ static irqreturn_t adc_jack_irq_thread(int irq, void *_data) static int adc_jack_probe(struct platform_device *pdev) { struct adc_jack_data *data; - struct adc_jack_pdata *pdata = dev_get_platdata(&pdev->dev); + struct adc_jack_pdata *pdata = pdev->dev.platform_data; int i, err = 0; data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL); @@ -110,7 +110,6 @@ static int adc_jack_probe(struct platform_device *pdev) goto out; } - data->edev.dev.parent = &pdev->dev; data->edev.supported_cable = pdata->cable_names; /* Check the length of array and set num_cables */ @@ -149,7 +148,7 @@ static int adc_jack_probe(struct platform_device *pdev) platform_set_drvdata(pdev, data); - err = extcon_dev_register(&data->edev); + err = extcon_dev_register(&data->edev, &pdev->dev); if (err) goto out; |