Commit 75f9e937 authored by Jingoo Han's avatar Jingoo Han Committed by Linus Torvalds

drivers/w1/masters/ds1wm.cuse dev_get_platdata()

Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.  This is a cosmetic change to make
the code simpler and enhance the readability.
Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
Acked-by: default avatarEvgeniy Polyakov <zbr@ioremap.net>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent a0e5a12f
...@@ -255,17 +255,17 @@ static int ds1wm_find_divisor(int gclk) ...@@ -255,17 +255,17 @@ static int ds1wm_find_divisor(int gclk)
static void ds1wm_up(struct ds1wm_data *ds1wm_data) static void ds1wm_up(struct ds1wm_data *ds1wm_data)
{ {
int divisor; int divisor;
struct ds1wm_driver_data *plat = ds1wm_data->pdev->dev.platform_data; struct device *dev = &ds1wm_data->pdev->dev;
struct ds1wm_driver_data *plat = dev_get_platdata(dev);
if (ds1wm_data->cell->enable) if (ds1wm_data->cell->enable)
ds1wm_data->cell->enable(ds1wm_data->pdev); ds1wm_data->cell->enable(ds1wm_data->pdev);
divisor = ds1wm_find_divisor(plat->clock_rate); divisor = ds1wm_find_divisor(plat->clock_rate);
dev_dbg(&ds1wm_data->pdev->dev, dev_dbg(dev, "found divisor 0x%x for clock %d\n",
"found divisor 0x%x for clock %d\n", divisor, plat->clock_rate); divisor, plat->clock_rate);
if (divisor == 0) { if (divisor == 0) {
dev_err(&ds1wm_data->pdev->dev, dev_err(dev, "no suitable divisor for %dHz clock\n",
"no suitable divisor for %dHz clock\n",
plat->clock_rate); plat->clock_rate);
return; return;
} }
...@@ -481,7 +481,7 @@ static int ds1wm_probe(struct platform_device *pdev) ...@@ -481,7 +481,7 @@ static int ds1wm_probe(struct platform_device *pdev)
ds1wm_data->cell = mfd_get_cell(pdev); ds1wm_data->cell = mfd_get_cell(pdev);
if (!ds1wm_data->cell) if (!ds1wm_data->cell)
return -ENODEV; return -ENODEV;
plat = pdev->dev.platform_data; plat = dev_get_platdata(&pdev->dev);
if (!plat) if (!plat)
return -ENODEV; return -ENODEV;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment