Message ID | 1457527197.720.2.camel@ingics.com |
---|---|
State | New |
Headers | show |
On Wed, Mar 9, 2016 at 1:39 PM, Axel Lin <axel.lin@ingics.com> wrote: > No need to store *medv in struct men_z127_gpio. > > Signed-off-by: Axel Lin <axel.lin@ingics.com> Patch applied for v4.7. Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/gpio/gpio-menz127.c b/drivers/gpio/gpio-menz127.c index c5c9599..d979f4b 100644 --- a/drivers/gpio/gpio-menz127.c +++ b/drivers/gpio/gpio-menz127.c @@ -35,7 +35,6 @@ struct men_z127_gpio { struct gpio_chip gc; void __iomem *reg_base; - struct mcb_device *mdev; struct resource *mem; }; @@ -43,7 +42,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; @@ -135,7 +134,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,
No need to store *medv in struct men_z127_gpio. Signed-off-by: Axel Lin <axel.lin@ingics.com> --- drivers/gpio/gpio-menz127.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)