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.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/w1/masters/ds1wm.c b/drivers/w1/masters/ds1wm.c
index 6b85e7fefa43..95921b77cf86 100644
--- a/drivers/w1/masters/ds1wm.c
+++ b/drivers/w1/masters/ds1wm.c
@@ -90,7 +90,7 @@ struct ds1wm_data {
90 void __iomem *map; 90 void __iomem *map;
91 int bus_shift; /* # of shifts to calc register offsets */ 91 int bus_shift; /* # of shifts to calc register offsets */
92 struct platform_device *pdev; 92 struct platform_device *pdev;
93 struct mfd_cell *cell; 93 const struct mfd_cell *cell;
94 int irq; 94 int irq;
95 int active_high; 95 int active_high;
96 int slave_present; 96 int slave_present;
@@ -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 = ds1wm_data->cell->driver_data; 219 struct ds1wm_driver_data *plat = mfd_get_data(ds1wm_data->pdev);
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);
@@ -330,16 +330,11 @@ static int ds1wm_probe(struct platform_device *pdev)
330 struct ds1wm_data *ds1wm_data; 330 struct ds1wm_data *ds1wm_data;
331 struct ds1wm_driver_data *plat; 331 struct ds1wm_driver_data *plat;
332 struct resource *res; 332 struct resource *res;
333 struct mfd_cell *cell;
334 int ret; 333 int ret;
335 334
336 if (!pdev) 335 if (!pdev)
337 return -ENODEV; 336 return -ENODEV;
338 337
339 cell = pdev->dev.platform_data;
340 if (!cell)
341 return -ENODEV;
342
343 ds1wm_data = kzalloc(sizeof(*ds1wm_data), GFP_KERNEL); 338 ds1wm_data = kzalloc(sizeof(*ds1wm_data), GFP_KERNEL);
344 if (!ds1wm_data) 339 if (!ds1wm_data)
345 return -ENOMEM; 340 return -ENOMEM;
@@ -356,13 +351,13 @@ static int ds1wm_probe(struct platform_device *pdev)
356 ret = -ENOMEM; 351 ret = -ENOMEM;
357 goto err0; 352 goto err0;
358 } 353 }
359 plat = cell->driver_data; 354 plat = mfd_get_data(pdev);
360 355
361 /* calculate bus shift from mem resource */ 356 /* calculate bus shift from mem resource */
362 ds1wm_data->bus_shift = resource_size(res) >> 3; 357 ds1wm_data->bus_shift = resource_size(res) >> 3;
363 358
364 ds1wm_data->pdev = pdev; 359 ds1wm_data->pdev = pdev;
365 ds1wm_data->cell = cell; 360 ds1wm_data->cell = mfd_get_cell(pdev);
366 361
367 res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); 362 res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
368 if (!res) { 363 if (!res) {