aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/w1
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2011-04-06 05:41:03 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2011-05-26 13:45:00 -0400
commit121ea573aeb7e9b1d79effa8ef7970031aebda12 (patch)
treecbde4018e74e37fb4697ae5a9f1eb0a0096fae8b /drivers/w1
parentec71974f2a3ae052cdbb57a92ce3c3b34ebd7b5d (diff)
w1: Use device platform_data to retrieve ds1wm platform bits
With the addition of the platform device mfd_cell pointer, we can now cleanly pass the sub device drivers platform data pointers through the regular device platform_data one, and get rid of mfd_get_data(). Cc: Matt Reimer <mreimer@vpop.net> Cc: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/w1')
-rw-r--r--drivers/w1/masters/ds1wm.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/w1/masters/ds1wm.c b/drivers/w1/masters/ds1wm.c
index 2f4fa02744a5..0855d6cce3c1 100644
--- a/drivers/w1/masters/ds1wm.c
+++ b/drivers/w1/masters/ds1wm.c
@@ -216,7 +216,7 @@ static int ds1wm_find_divisor(int gclk)
216static void ds1wm_up(struct ds1wm_data *ds1wm_data) 216static void ds1wm_up(struct ds1wm_data *ds1wm_data)
217{ 217{
218 int divisor; 218 int divisor;
219 struct ds1wm_driver_data *plat = mfd_get_data(ds1wm_data->pdev); 219 struct ds1wm_driver_data *plat = ds1wm_data->pdev->dev.platform_data;
220 220
221 if (ds1wm_data->cell->enable) 221 if (ds1wm_data->cell->enable)
222 ds1wm_data->cell->enable(ds1wm_data->pdev); 222 ds1wm_data->cell->enable(ds1wm_data->pdev);
@@ -351,13 +351,21 @@ static int ds1wm_probe(struct platform_device *pdev)
351 ret = -ENOMEM; 351 ret = -ENOMEM;
352 goto err0; 352 goto err0;
353 } 353 }
354 plat = mfd_get_data(pdev);
355 354
356 /* calculate bus shift from mem resource */ 355 /* calculate bus shift from mem resource */
357 ds1wm_data->bus_shift = resource_size(res) >> 3; 356 ds1wm_data->bus_shift = resource_size(res) >> 3;
358 357
359 ds1wm_data->pdev = pdev; 358 ds1wm_data->pdev = pdev;
360 ds1wm_data->cell = mfd_get_cell(pdev); 359 ds1wm_data->cell = mfd_get_cell(pdev);
360 if (!ds1wm_data->cell) {
361 ret = -ENODEV;
362 goto err1;
363 }
364 plat = pdev->dev.platform_data;
365 if (!plat) {
366 ret = -ENODEV;
367 goto err1;
368 }
361 369
362 res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); 370 res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
363 if (!res) { 371 if (!res) {