Re: [PATCH 2/5] hwmon: (tmp401) Use sysfs_create_group / sysfs_remove_group

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

 



On Fri,  5 Apr 2013 18:02:54 -0700, Guenter Roeck wrote:
> instead of creating and removing sysfs attribute files individually.
> 
> Signed-off-by: Guenter Roeck <linux@xxxxxxxxxxxx>
> ---
>  drivers/hwmon/tmp401.c |  151 +++++++++++++++++++++++++++++-------------------
>  1 file changed, 90 insertions(+), 61 deletions(-)
> 
> diff --git a/drivers/hwmon/tmp401.c b/drivers/hwmon/tmp401.c
> index ef04cf8..f07fc40 100644
> --- a/drivers/hwmon/tmp401.c
> +++ b/drivers/hwmon/tmp401.c
> (...)
>  static int tmp401_probe(struct i2c_client *client,
>  			const struct i2c_device_id *id)
>  {
> -	int i, err = 0;
> +	struct device *dev = &client->dev;

You left one instance of &client->dev in this function. Either convert
them all, or none.

Other than this minor detail, fine with me. Even though it's a bit sad
when a cleanup increases both the line count and the binary size of a
driver.

Acked-by: Jean Delvare <khali@xxxxxxxxxxxx>

-- 
Jean Delvare

_______________________________________________
lm-sensors mailing list
lm-sensors@xxxxxxxxxxxxxx
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors




[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux