diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/input/misc/pcf50633-input.c | 7 | ||||
-rw-r--r-- | drivers/mfd/pcf50633-adc.c | 5 | ||||
-rw-r--r-- | drivers/mfd/pcf50633-core.c | 10 | ||||
-rw-r--r-- | drivers/power/pcf50633-charger.c | 3 | ||||
-rw-r--r-- | drivers/rtc/rtc-pcf50633.c | 5 |
5 files changed, 7 insertions, 23 deletions
diff --git a/drivers/input/misc/pcf50633-input.c b/drivers/input/misc/pcf50633-input.c index 039dcb00ebd9..008de0c5834b 100644 --- a/drivers/input/misc/pcf50633-input.c +++ b/drivers/input/misc/pcf50633-input.c | |||
@@ -55,7 +55,6 @@ pcf50633_input_irq(int irq, void *data) | |||
55 | static int __devinit pcf50633_input_probe(struct platform_device *pdev) | 55 | static int __devinit pcf50633_input_probe(struct platform_device *pdev) |
56 | { | 56 | { |
57 | struct pcf50633_input *input; | 57 | struct pcf50633_input *input; |
58 | struct pcf50633_subdev_pdata *pdata = pdev->dev.platform_data; | ||
59 | struct input_dev *input_dev; | 58 | struct input_dev *input_dev; |
60 | int ret; | 59 | int ret; |
61 | 60 | ||
@@ -71,7 +70,7 @@ static int __devinit pcf50633_input_probe(struct platform_device *pdev) | |||
71 | } | 70 | } |
72 | 71 | ||
73 | platform_set_drvdata(pdev, input); | 72 | platform_set_drvdata(pdev, input); |
74 | input->pcf = pdata->pcf; | 73 | input->pcf = dev_to_pcf50633(pdev->dev.parent); |
75 | input->input_dev = input_dev; | 74 | input->input_dev = input_dev; |
76 | 75 | ||
77 | input_dev->name = "PCF50633 PMU events"; | 76 | input_dev->name = "PCF50633 PMU events"; |
@@ -85,9 +84,9 @@ static int __devinit pcf50633_input_probe(struct platform_device *pdev) | |||
85 | kfree(input); | 84 | kfree(input); |
86 | return ret; | 85 | return ret; |
87 | } | 86 | } |
88 | pcf50633_register_irq(pdata->pcf, PCF50633_IRQ_ONKEYR, | 87 | pcf50633_register_irq(input->pcf, PCF50633_IRQ_ONKEYR, |
89 | pcf50633_input_irq, input); | 88 | pcf50633_input_irq, input); |
90 | pcf50633_register_irq(pdata->pcf, PCF50633_IRQ_ONKEYF, | 89 | pcf50633_register_irq(input->pcf, PCF50633_IRQ_ONKEYF, |
91 | pcf50633_input_irq, input); | 90 | pcf50633_input_irq, input); |
92 | 91 | ||
93 | return 0; | 92 | return 0; |
diff --git a/drivers/mfd/pcf50633-adc.c b/drivers/mfd/pcf50633-adc.c index 3d31e97d6a45..6d2e8466df1d 100644 --- a/drivers/mfd/pcf50633-adc.c +++ b/drivers/mfd/pcf50633-adc.c | |||
@@ -209,17 +209,16 @@ static void pcf50633_adc_irq(int irq, void *data) | |||
209 | 209 | ||
210 | static int __devinit pcf50633_adc_probe(struct platform_device *pdev) | 210 | static int __devinit pcf50633_adc_probe(struct platform_device *pdev) |
211 | { | 211 | { |
212 | struct pcf50633_subdev_pdata *pdata = pdev->dev.platform_data; | ||
213 | struct pcf50633_adc *adc; | 212 | struct pcf50633_adc *adc; |
214 | 213 | ||
215 | adc = kzalloc(sizeof(*adc), GFP_KERNEL); | 214 | adc = kzalloc(sizeof(*adc), GFP_KERNEL); |
216 | if (!adc) | 215 | if (!adc) |
217 | return -ENOMEM; | 216 | return -ENOMEM; |
218 | 217 | ||
219 | adc->pcf = pdata->pcf; | 218 | adc->pcf = dev_to_pcf50633(pdev->dev.parent); |
220 | platform_set_drvdata(pdev, adc); | 219 | platform_set_drvdata(pdev, adc); |
221 | 220 | ||
222 | pcf50633_register_irq(pdata->pcf, PCF50633_IRQ_ADCRDY, | 221 | pcf50633_register_irq(adc->pcf, PCF50633_IRQ_ADCRDY, |
223 | pcf50633_adc_irq, adc); | 222 | pcf50633_adc_irq, adc); |
224 | 223 | ||
225 | mutex_init(&adc->queue_mutex); | 224 | mutex_init(&adc->queue_mutex); |
diff --git a/drivers/mfd/pcf50633-core.c b/drivers/mfd/pcf50633-core.c index 48776d3018ed..69cdbdcd2e82 100644 --- a/drivers/mfd/pcf50633-core.c +++ b/drivers/mfd/pcf50633-core.c | |||
@@ -456,7 +456,6 @@ static void | |||
456 | pcf50633_client_dev_register(struct pcf50633 *pcf, const char *name, | 456 | pcf50633_client_dev_register(struct pcf50633 *pcf, const char *name, |
457 | struct platform_device **pdev) | 457 | struct platform_device **pdev) |
458 | { | 458 | { |
459 | struct pcf50633_subdev_pdata *subdev_pdata; | ||
460 | int ret; | 459 | int ret; |
461 | 460 | ||
462 | *pdev = platform_device_alloc(name, -1); | 461 | *pdev = platform_device_alloc(name, -1); |
@@ -465,15 +464,6 @@ pcf50633_client_dev_register(struct pcf50633 *pcf, const char *name, | |||
465 | return; | 464 | return; |
466 | } | 465 | } |
467 | 466 | ||
468 | subdev_pdata = kmalloc(sizeof(*subdev_pdata), GFP_KERNEL); | ||
469 | if (!subdev_pdata) { | ||
470 | dev_err(pcf->dev, "Error allocating subdev pdata\n"); | ||
471 | platform_device_put(*pdev); | ||
472 | } | ||
473 | |||
474 | subdev_pdata->pcf = pcf; | ||
475 | platform_device_add_data(*pdev, subdev_pdata, sizeof(*subdev_pdata)); | ||
476 | |||
477 | (*pdev)->dev.parent = pcf->dev; | 467 | (*pdev)->dev.parent = pcf->dev; |
478 | 468 | ||
479 | ret = platform_device_add(*pdev); | 469 | ret = platform_device_add(*pdev); |
diff --git a/drivers/power/pcf50633-charger.c b/drivers/power/pcf50633-charger.c index e8b278f71781..6a84a8eb8d7a 100644 --- a/drivers/power/pcf50633-charger.c +++ b/drivers/power/pcf50633-charger.c | |||
@@ -303,7 +303,6 @@ static const u8 mbc_irq_handlers[] = { | |||
303 | static int __devinit pcf50633_mbc_probe(struct platform_device *pdev) | 303 | static int __devinit pcf50633_mbc_probe(struct platform_device *pdev) |
304 | { | 304 | { |
305 | struct pcf50633_mbc *mbc; | 305 | struct pcf50633_mbc *mbc; |
306 | struct pcf50633_subdev_pdata *pdata = pdev->dev.platform_data; | ||
307 | int ret; | 306 | int ret; |
308 | int i; | 307 | int i; |
309 | u8 mbcs1; | 308 | u8 mbcs1; |
@@ -313,7 +312,7 @@ static int __devinit pcf50633_mbc_probe(struct platform_device *pdev) | |||
313 | return -ENOMEM; | 312 | return -ENOMEM; |
314 | 313 | ||
315 | platform_set_drvdata(pdev, mbc); | 314 | platform_set_drvdata(pdev, mbc); |
316 | mbc->pcf = pdata->pcf; | 315 | mbc->pcf = dev_to_pcf50633(pdev->dev.parent); |
317 | 316 | ||
318 | /* Set up IRQ handlers */ | 317 | /* Set up IRQ handlers */ |
319 | for (i = 0; i < ARRAY_SIZE(mbc_irq_handlers); i++) | 318 | for (i = 0; i < ARRAY_SIZE(mbc_irq_handlers); i++) |
diff --git a/drivers/rtc/rtc-pcf50633.c b/drivers/rtc/rtc-pcf50633.c index 4c5d5d0c4cfc..9b74e9c9151c 100644 --- a/drivers/rtc/rtc-pcf50633.c +++ b/drivers/rtc/rtc-pcf50633.c | |||
@@ -277,16 +277,13 @@ static void pcf50633_rtc_irq(int irq, void *data) | |||
277 | 277 | ||
278 | static int __devinit pcf50633_rtc_probe(struct platform_device *pdev) | 278 | static int __devinit pcf50633_rtc_probe(struct platform_device *pdev) |
279 | { | 279 | { |
280 | struct pcf50633_subdev_pdata *pdata; | ||
281 | struct pcf50633_rtc *rtc; | 280 | struct pcf50633_rtc *rtc; |
282 | 281 | ||
283 | |||
284 | rtc = kzalloc(sizeof(*rtc), GFP_KERNEL); | 282 | rtc = kzalloc(sizeof(*rtc), GFP_KERNEL); |
285 | if (!rtc) | 283 | if (!rtc) |
286 | return -ENOMEM; | 284 | return -ENOMEM; |
287 | 285 | ||
288 | pdata = pdev->dev.platform_data; | 286 | rtc->pcf = dev_to_pcf50633(pdev->dev.parent); |
289 | rtc->pcf = pdata->pcf; | ||
290 | platform_set_drvdata(pdev, rtc); | 287 | platform_set_drvdata(pdev, rtc); |
291 | rtc->rtc_dev = rtc_device_register("pcf50633-rtc", &pdev->dev, | 288 | rtc->rtc_dev = rtc_device_register("pcf50633-rtc", &pdev->dev, |
292 | &pcf50633_rtc_ops, THIS_MODULE); | 289 | &pcf50633_rtc_ops, THIS_MODULE); |