Re: [PATCH 1/8] Input: lm8333 - convert to use devm_* api

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

 



Hi Yangtao,

On Fri, Jul 14, 2023 at 04:06:04PM +0800, Yangtao Li wrote:
> Use devm_* api to simplify code, this makes it unnecessary to explicitly
> release resources.
> 
> Signed-off-by: Yangtao Li <frank.li@xxxxxxxx>
> ---
>  drivers/input/keyboard/lm8333.c | 40 +++++++++------------------------
>  1 file changed, 11 insertions(+), 29 deletions(-)
> 
> diff --git a/drivers/input/keyboard/lm8333.c b/drivers/input/keyboard/lm8333.c
> index c9f05764e36d..41d088933e01 100644
> --- a/drivers/input/keyboard/lm8333.c
> +++ b/drivers/input/keyboard/lm8333.c
> @@ -129,6 +129,7 @@ static int lm8333_probe(struct i2c_client *client)
>  {
>  	const struct lm8333_platform_data *pdata =
>  			dev_get_platdata(&client->dev);
> +	struct device *dev = &client->dev;

This temporary is used only in few places, while the rest are still
using &client->dev. I removed it, made a couple more changes and
applied, thank you.

-- 
Dmitry



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux