aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/w1
diff options
context:
space:
mode:
authorAndres Salomon <dilinger@queued.net>2011-03-01 16:55:07 -0500
committerSamuel Ortiz <sameo@linux.intel.com>2011-03-23 05:42:02 -0400
commit7e5dc1f7004832f797999dfb3498a68a6c16ef73 (patch)
tree7ef3cf763a638a68bd7d26a044411cb1e8396bb1 /drivers/w1
parente5c238c3fde93afdddef36aec2642155c709d93a (diff)
w1: Silence ds1wm warnings related to mfd_get_cell changes
mfd_get_cell returns a const, so change the ds1wm client to store a const mfd cell. This silences type mismatch warnings. Since we're guaranteed to have the mfd_cell, we can also simplify the code a bit to get rid of a temporary variable and NULL check. Signed-off-by: Andres Salomon <dilinger@queued.net> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/w1')
-rw-r--r--drivers/w1/masters/ds1wm.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/w1/masters/ds1wm.c b/drivers/w1/masters/ds1wm.c
index 22fc726feb9b..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;
@@ -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 = mfd_get_cell(pdev);
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;
@@ -362,7 +357,7 @@ static int ds1wm_probe(struct platform_device *pdev)
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) {