]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
w1: Silence ds1wm warnings related to mfd_get_cell changes
authorAndres Salomon <dilinger@queued.net>
Tue, 1 Mar 2011 21:55:07 +0000 (13:55 -0800)
committerSamuel Ortiz <sameo@linux.intel.com>
Wed, 23 Mar 2011 09:42:02 +0000 (10:42 +0100)
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>
drivers/w1/masters/ds1wm.c

index 22fc726feb9b989512daa806926156bd486c3cc8..95921b77cf8650068f2641816f267eb97da9acfc 100644 (file)
@@ -90,7 +90,7 @@ struct ds1wm_data {
        void            __iomem *map;
        int             bus_shift; /* # of shifts to calc register offsets */
        struct platform_device *pdev;
-       struct mfd_cell *cell;
+       const struct mfd_cell *cell;
        int             irq;
        int             active_high;
        int             slave_present;
@@ -330,16 +330,11 @@ static int ds1wm_probe(struct platform_device *pdev)
        struct ds1wm_data *ds1wm_data;
        struct ds1wm_driver_data *plat;
        struct resource *res;
-       struct mfd_cell *cell;
        int ret;
 
        if (!pdev)
                return -ENODEV;
 
-       cell = mfd_get_cell(pdev);
-       if (!cell)
-               return -ENODEV;
-
        ds1wm_data = kzalloc(sizeof(*ds1wm_data), GFP_KERNEL);
        if (!ds1wm_data)
                return -ENOMEM;
@@ -362,7 +357,7 @@ static int ds1wm_probe(struct platform_device *pdev)
        ds1wm_data->bus_shift = resource_size(res) >> 3;
 
        ds1wm_data->pdev = pdev;
-       ds1wm_data->cell = cell;
+       ds1wm_data->cell = mfd_get_cell(pdev);
 
        res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
        if (!res) {