Re: [PATCH] memory: omap-gpmc: use devm_gpiochip_add_data()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Linus,

On 08/08/16 11:03, Linus Walleij wrote:
> This saves a few codelines in the driver.
> 
> Cc: Roger Quadros <rogerq@xxxxxx>
> Cc: Tony Lindgren <tony@xxxxxxxxxxx>
> Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>

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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux