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: <201309041625.25514.marex@denx.de>
Date:	Wed, 4 Sep 2013 16:25:25 +0200
From:	Marek Vasut <marex@...x.de>
To:	Sachin Kamat <sachin.kamat@...aro.org>
Cc:	linux-kernel@...r.kernel.org, broonie@...nel.org, nm@...com,
	ldewangan@...dia.com, gg@...mlogic.co.uk, yong.shen@...aro.org,
	s.hauer@...gutronix.de, Nancy.Chen@...escale.com
Subject: Re: [PATCH 1/7] regulator: anatop-regulator: Use devm_regulator_register

Dear Sachin Kamat,

> devm_* simplifies the code.
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@...aro.org>

Makes sense

Acked-by: Marek Vasut <marex@...x.de>

> ---
> This series is compile tested.
> ---
>  drivers/regulator/anatop-regulator.c |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/regulator/anatop-regulator.c
> b/drivers/regulator/anatop-regulator.c index 0d4a8cc..e42bfd1 100644
> --- a/drivers/regulator/anatop-regulator.c
> +++ b/drivers/regulator/anatop-regulator.c
> @@ -200,7 +200,7 @@ static int anatop_regulator_probe(struct
> platform_device *pdev) config.regmap = sreg->anatop;
> 
>  	/* register regulator */
> -	rdev = regulator_register(rdesc, &config);
> +	rdev = devm_regulator_register(dev, rdesc, &config);
>  	if (IS_ERR(rdev)) {
>  		dev_err(dev, "failed to register %s\n",
>  			rdesc->name);
> @@ -223,7 +223,6 @@ static int anatop_regulator_remove(struct
> platform_device *pdev) struct anatop_regulator *sreg =
> rdev_get_drvdata(rdev);
>  	const char *name = sreg->name;
> 
> -	regulator_unregister(rdev);
>  	kfree(name);
> 
>  	return 0;

Best regards,
Marek Vasut
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ