]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
gpio: menz127: Drop *mdev field from struct men_z127_gpio
authorAxel Lin <axel.lin@ingics.com>
Wed, 9 Mar 2016 12:39:57 +0000 (20:39 +0800)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 30 Mar 2016 08:38:50 +0000 (10:38 +0200)
No need to store *medv in struct men_z127_gpio.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-menz127.c

index a68e199d579d58c099203886eaabd3479c0e35cf..8c1ab8e1974fc2d5480e6c62057ebcd389786699 100644 (file)
@@ -35,7 +35,6 @@
 struct men_z127_gpio {
        struct gpio_chip gc;
        void __iomem *reg_base;
-       struct mcb_device *mdev;
        struct resource *mem;
        spinlock_t lock;
 };
@@ -44,7 +43,7 @@ static int men_z127_debounce(struct gpio_chip *gc, unsigned gpio,
                             unsigned debounce)
 {
        struct men_z127_gpio *priv = gpiochip_get_data(gc);
-       struct device *dev = &priv->mdev->dev;
+       struct device *dev = gc->parent;
        unsigned int rnd;
        u32 db_en, db_cnt;
 
@@ -136,7 +135,6 @@ static int men_z127_probe(struct mcb_device *mdev,
                goto err_release;
        }
 
-       men_z127_gpio->mdev = mdev;
        mcb_set_drvdata(mdev, men_z127_gpio);
 
        ret = bgpio_init(&men_z127_gpio->gc, &mdev->dev, 4,