Message ID | 1470643396-6795-1-git-send-email-linus.walleij@linaro.org |
---|---|
State | New |
Headers | show |
Hi Linus, On 08/08/16 11:03, Linus Walleij wrote: > This saves a few codelines in the driver. > > Cc: Roger Quadros <rogerq@ti.com> > Cc: Tony Lindgren <tony@atomide.com> > Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Pushed to my -next queue. Thanks. cheers, -roger > --- > drivers/memory/omap-gpmc.c | 8 +------- > 1 file changed, 1 insertion(+), 7 deletions(-) > > diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c > index 869c83fb3c5d..b2aea23ca0ae 100644 > --- a/drivers/memory/omap-gpmc.c > +++ b/drivers/memory/omap-gpmc.c > @@ -2266,7 +2266,7 @@ static int gpmc_gpio_init(struct gpmc_device *gpmc) > gpmc->gpio_chip.get = gpmc_gpio_get; > gpmc->gpio_chip.base = -1; > > - ret = gpiochip_add(&gpmc->gpio_chip); > + ret = devm_gpiochip_add_data(gpmv->dev, &gpmc->gpio_chip, NULL); > if (ret < 0) { > dev_err(gpmc->dev, "could not register gpio chip: %d\n", ret); > return ret; > @@ -2275,11 +2275,6 @@ static int gpmc_gpio_init(struct gpmc_device *gpmc) > return 0; > } > > -static void gpmc_gpio_exit(struct gpmc_device *gpmc) > -{ > - gpiochip_remove(&gpmc->gpio_chip); > -} > - > static int gpmc_probe(struct platform_device *pdev) > { > int rc; > @@ -2394,7 +2389,6 @@ static int gpmc_remove(struct platform_device *pdev) > struct gpmc_device *gpmc = platform_get_drvdata(pdev); > > gpmc_free_irq(gpmc); > - gpmc_gpio_exit(gpmc); > gpmc_mem_exit(); > pm_runtime_put_sync(&pdev->dev); > pm_runtime_disable(&pdev->dev); > -- To unsubscribe from this list: send the line "unsubscribe linux-omap" 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/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c index 869c83fb3c5d..b2aea23ca0ae 100644 --- a/drivers/memory/omap-gpmc.c +++ b/drivers/memory/omap-gpmc.c @@ -2266,7 +2266,7 @@ static int gpmc_gpio_init(struct gpmc_device *gpmc) gpmc->gpio_chip.get = gpmc_gpio_get; gpmc->gpio_chip.base = -1; - ret = gpiochip_add(&gpmc->gpio_chip); + ret = devm_gpiochip_add_data(gpmv->dev, &gpmc->gpio_chip, NULL); if (ret < 0) { dev_err(gpmc->dev, "could not register gpio chip: %d\n", ret); return ret; @@ -2275,11 +2275,6 @@ static int gpmc_gpio_init(struct gpmc_device *gpmc) return 0; } -static void gpmc_gpio_exit(struct gpmc_device *gpmc) -{ - gpiochip_remove(&gpmc->gpio_chip); -} - static int gpmc_probe(struct platform_device *pdev) { int rc; @@ -2394,7 +2389,6 @@ static int gpmc_remove(struct platform_device *pdev) struct gpmc_device *gpmc = platform_get_drvdata(pdev); gpmc_free_irq(gpmc); - gpmc_gpio_exit(gpmc); gpmc_mem_exit(); pm_runtime_put_sync(&pdev->dev); pm_runtime_disable(&pdev->dev);
This saves a few codelines in the driver. Cc: Roger Quadros <rogerq@ti.com> Cc: Tony Lindgren <tony@atomide.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> --- drivers/memory/omap-gpmc.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html