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] [day] [month] [year] [list]
Message-ID: <53046D87.6030606@ti.com>
Date:	Wed, 19 Feb 2014 14:08:31 +0530
From:	Keerthy <a0393675@...com>
To:	Axel Lin <axel.lin@...ics.com>
CC:	Mark Brown <broonie@...nel.org>, Keerthy <j-keerthy@...com>,
	Liam Girdwood <lgirdwood@...il.com>,
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/3 v2] regulator: tps65218: Remove unnecessary regulator_unregister
 call

On Wednesday 19 February 2014 02:04 PM, Axel Lin wrote:
> Current code uses devm_regulator_register() so the we don't need to explicitly
> call regulator_unregister() in .remove.
> And then we don't need to save rdev pointer to tps->rdev[id].

Acked-by: Keerthy <j-keerthy@...com>

> Signed-off-by: Axel Lin <axel.lin@...ics.com>
> ---
>   drivers/regulator/tps65218-regulator.c | 18 ------------------
>   1 file changed, 18 deletions(-)
>
> diff --git a/drivers/regulator/tps65218-regulator.c b/drivers/regulator/tps65218-regulator.c
> index d1c7831..1fb1db5 100644
> --- a/drivers/regulator/tps65218-regulator.c
> +++ b/drivers/regulator/tps65218-regulator.c
> @@ -267,23 +267,6 @@ static int tps65218_regulator_probe(struct platform_device *pdev)
>   		return PTR_ERR(rdev);
>   	}
>   
> -	/* Save regulator */
> -	tps->rdev[id] = rdev;
> -
> -	return 0;
> -}
> -
> -static int tps65218_regulator_remove(struct platform_device *pdev)
> -{
> -	struct tps65218 *tps = platform_get_drvdata(pdev);
> -	const struct of_device_id	*match;
> -	const struct tps_info		*template;
> -
> -	match = of_match_device(tps65218_of_match, &pdev->dev);
> -	template = match->data;
> -	regulator_unregister(tps->rdev[template->id]);
> -	platform_set_drvdata(pdev, NULL);
> -
>   	return 0;
>   }
>   
> @@ -294,7 +277,6 @@ static struct platform_driver tps65218_regulator_driver = {
>   		.of_match_table = of_match_ptr(tps65218_of_match),
>   	},
>   	.probe = tps65218_regulator_probe,
> -	.remove = tps65218_regulator_remove,
>   };
>   
>   module_platform_driver(tps65218_regulator_driver);

--
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