Re: [PATCH] power: Remove obsolete cleanup for clientdata

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

 



On Mon, Jun 20, 2011 at 11:01:14PM +0200, Wolfram Sang wrote:
> A few new i2c-drivers came into the kernel which clear the clientdata-pointer
> on exit or error. This is obsolete meanwhile, the core will do it.
> 
> Signed-off-by: Wolfram Sang <w.sang@xxxxxxxxxxxxxx>
> Cc: MyungJoo Ham <myungjoo.ham@xxxxxxxxxxx>
> Cc: Anton Vorontsov <cbouatmailru@xxxxxxxxx>
> Cc: Kyungmin Park <kyungmin.park@xxxxxxxxxxx>
> ---
> 
> This is more a cleanup than a bugfix. Still, would be happy to have this
> obsolete programming style largely removed in 3.0 if possible.

Applied for 3.1, sorry. This is not a regression fix.

Thanks,

> 
>  drivers/power/max17042_battery.c |    2 --
>  1 files changed, 0 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/power/max17042_battery.c b/drivers/power/max17042_battery.c
> index c5c8805..09f7496 100644
> --- a/drivers/power/max17042_battery.c
> +++ b/drivers/power/max17042_battery.c
> @@ -183,7 +183,6 @@ static int __devinit max17042_probe(struct i2c_client *client,
>  	ret = power_supply_register(&client->dev, &chip->battery);
>  	if (ret) {
>  		dev_err(&client->dev, "failed: power supply register\n");
> -		i2c_set_clientdata(client, NULL);
>  		kfree(chip);
>  		return ret;
>  	}
> @@ -202,7 +201,6 @@ static int __devexit max17042_remove(struct i2c_client *client)
>  	struct max17042_chip *chip = i2c_get_clientdata(client);
>  
>  	power_supply_unregister(&chip->battery);
> -	i2c_set_clientdata(client, NULL);
>  	kfree(chip);
>  	return 0;
>  }

-- 
Anton Vorontsov
Email: cbouatmailru@xxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux