aboutsummaryrefslogtreecommitdiff
path: root/drivers/mfd
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/pcf50606-adc.c5
-rw-r--r--drivers/mfd/pcf50606-core.c4
2 files changed, 2 insertions, 7 deletions
diff --git a/drivers/mfd/pcf50606-adc.c b/drivers/mfd/pcf50606-adc.c
index 38f5b5c0593..47210a9cce8 100644
--- a/drivers/mfd/pcf50606-adc.c
+++ b/drivers/mfd/pcf50606-adc.c
@@ -211,17 +211,16 @@ static void pcf50606_adc_irq(int irq, void *data)
static int __devinit pcf50606_adc_probe(struct platform_device *pdev)
{
- struct pcf50606_subdev_pdata *pdata = pdev->dev.platform_data;
struct pcf50606_adc *adc;
adc = kzalloc(sizeof(*adc), GFP_KERNEL);
if (!adc)
return -ENOMEM;
- adc->pcf = pdata->pcf;
+ adc->pcf = dev_to_pcf50606(pdev->dev.parent);
platform_set_drvdata(pdev, adc);
- pcf50606_register_irq(pdata->pcf, PCF50606_IRQ_ADCRDY,
+ pcf50606_register_irq(adc->pcf, PCF50606_IRQ_ADCRDY,
pcf50606_adc_irq, adc);
mutex_init(&adc->queue_mutex);
diff --git a/drivers/mfd/pcf50606-core.c b/drivers/mfd/pcf50606-core.c
index 355a7fc7476..a6ff522931d 100644
--- a/drivers/mfd/pcf50606-core.c
+++ b/drivers/mfd/pcf50606-core.c
@@ -436,7 +436,6 @@ static void
pcf50606_client_dev_register(struct pcf50606 *pcf, const char *name,
struct platform_device **pdev)
{
- struct pcf50606_subdev_pdata subdev_pdata;
int ret;
*pdev = platform_device_alloc(name, -1);
@@ -445,9 +444,6 @@ pcf50606_client_dev_register(struct pcf50606 *pcf, const char *name,
return;
}
- subdev_pdata.pcf = pcf;
- platform_device_add_data(*pdev, &subdev_pdata, sizeof(subdev_pdata));
-
(*pdev)->dev.parent = pcf->dev;
ret = platform_device_add(*pdev);