diff options
Diffstat (limited to 'drivers/w1')
-rw-r--r-- | drivers/w1/masters/ds1wm.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/w1/masters/ds1wm.c b/drivers/w1/masters/ds1wm.c index 41613f92a723..02df3b1381d2 100644 --- a/drivers/w1/masters/ds1wm.c +++ b/drivers/w1/masters/ds1wm.c | |||
@@ -255,17 +255,17 @@ static int ds1wm_find_divisor(int gclk) | |||
255 | static void ds1wm_up(struct ds1wm_data *ds1wm_data) | 255 | static void ds1wm_up(struct ds1wm_data *ds1wm_data) |
256 | { | 256 | { |
257 | int divisor; | 257 | int divisor; |
258 | struct ds1wm_driver_data *plat = ds1wm_data->pdev->dev.platform_data; | 258 | struct device *dev = &ds1wm_data->pdev->dev; |
259 | struct ds1wm_driver_data *plat = dev_get_platdata(dev); | ||
259 | 260 | ||
260 | if (ds1wm_data->cell->enable) | 261 | if (ds1wm_data->cell->enable) |
261 | ds1wm_data->cell->enable(ds1wm_data->pdev); | 262 | ds1wm_data->cell->enable(ds1wm_data->pdev); |
262 | 263 | ||
263 | divisor = ds1wm_find_divisor(plat->clock_rate); | 264 | divisor = ds1wm_find_divisor(plat->clock_rate); |
264 | dev_dbg(&ds1wm_data->pdev->dev, | 265 | dev_dbg(dev, "found divisor 0x%x for clock %d\n", |
265 | "found divisor 0x%x for clock %d\n", divisor, plat->clock_rate); | 266 | divisor, plat->clock_rate); |
266 | if (divisor == 0) { | 267 | if (divisor == 0) { |
267 | dev_err(&ds1wm_data->pdev->dev, | 268 | dev_err(dev, "no suitable divisor for %dHz clock\n", |
268 | "no suitable divisor for %dHz clock\n", | ||
269 | plat->clock_rate); | 269 | plat->clock_rate); |
270 | return; | 270 | return; |
271 | } | 271 | } |
@@ -481,7 +481,7 @@ static int ds1wm_probe(struct platform_device *pdev) | |||
481 | ds1wm_data->cell = mfd_get_cell(pdev); | 481 | ds1wm_data->cell = mfd_get_cell(pdev); |
482 | if (!ds1wm_data->cell) | 482 | if (!ds1wm_data->cell) |
483 | return -ENODEV; | 483 | return -ENODEV; |
484 | plat = pdev->dev.platform_data; | 484 | plat = dev_get_platdata(&pdev->dev); |
485 | if (!plat) | 485 | if (!plat) |
486 | return -ENODEV; | 486 | return -ENODEV; |
487 | 487 | ||