lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56CC0F1B.9040003@analog.com>
Date:	Tue, 23 Feb 2016 08:49:47 +0100
From:	Michael Hennerich <michael.hennerich@...log.com>
To:	Laxman Dewangan <ldewangan@...dia.com>, <linus.walleij@...aro.org>,
	<gnurou@...il.com>, <corbet@....net>, <albeu@...e.fr>,
	<rjui@...adcom.com>, <shc_work@...l.ru>,
	<support.opensource@...semi.com>, <swarren@...dotorg.org>,
	<thierry.reding@...il.com>
CC:	<bjorn.andersson@...ymobile.com>, <a.kesavan@...sung.com>,
	<gregkh@...uxfoundation.org>, <catalin.marinas@....com>,
	<linux-doc@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<linux-gpio@...r.kernel.org>,
	<patches@...nsource.wolfsonmicro.com>,
	<bcm-kernel-feedback-list@...adcom.com>,
	<linux-arm-kernel@...ts.infradead.org>,
	<linux-tegra@...r.kernel.org>
Subject: Re: [PATCH 06/61] gpio: adp5520: Use devm_gpiochip_add_data() for
 gpio registration

On 02/22/2016 03:07 PM, Laxman Dewangan wrote:
> Use devm_gpiochip_add_data() for GPIO registration and remove the
> call for gpiochip_remove() from error path.
>
> Also remove the need of driver callback .remove.
>
> Signed-off-by: Laxman Dewangan <ldewangan@...dia.com>

Acked-by: Michael Hennerich <michael.hennerich@...log.com>

> Cc: Michael Hennerich <michael.hennerich@...log.com>
> ---
>   drivers/gpio/gpio-adp5520.c | 13 +------------
>   1 file changed, 1 insertion(+), 12 deletions(-)
>
> diff --git a/drivers/gpio/gpio-adp5520.c b/drivers/gpio/gpio-adp5520.c
> index 4fa7ff1..abf1996 100644
> --- a/drivers/gpio/gpio-adp5520.c
> +++ b/drivers/gpio/gpio-adp5520.c
> @@ -153,7 +153,7 @@ static int adp5520_gpio_probe(struct platform_device *pdev)
>   		goto err;
>   	}
>
> -	ret = gpiochip_add_data(&dev->gpio_chip, dev);
> +	ret = devm_gpiochip_add_data(&pdev->dev, &dev->gpio_chip, dev);
>   	if (ret)
>   		goto err;
>
> @@ -164,22 +164,11 @@ err:
>   	return ret;
>   }
>
> -static int adp5520_gpio_remove(struct platform_device *pdev)
> -{
> -	struct adp5520_gpio *dev;
> -
> -	dev = platform_get_drvdata(pdev);
> -	gpiochip_remove(&dev->gpio_chip);
> -
> -	return 0;
> -}
> -
>   static struct platform_driver adp5520_gpio_driver = {
>   	.driver	= {
>   		.name	= "adp5520-gpio",
>   	},
>   	.probe		= adp5520_gpio_probe,
> -	.remove		= adp5520_gpio_remove,
>   };
>
>   module_platform_driver(adp5520_gpio_driver);
>


-- 
Greetings,
Michael

--
Analog Devices GmbH      Wilhelm-Wagenfeld-Str. 6      80807 Muenchen
Sitz der Gesellschaft: Muenchen; Registergericht: Muenchen HRB 40368;
Geschaeftsfuehrer:Dr.Carsten Suckrow, Thomas Wessel, William A. Martin,
Margaret Seif

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ