aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/w1/masters/ds1wm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/w1/masters/ds1wm.c')
-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) {