Re: [PATCH 2/5] igb: Convert to use devm_hwmon_device_register_with_groups

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

 



On Fri, 2013-11-22 at 22:07 -0800, Guenter Roeck wrote:
> Simplify the code. Attach hwmon sysfs attributes to hwmon device
> instead of pci device. Avoid race conditions caused by attributes
> being created after registration and provide mandatory 'name'
> attribute by using new hwmon API.
> 
> Other cleanup:
> 
> Instead of allocating memory for hwmon attributes, move attributes
> and all other hwmon related data into struct hwmon_buff and allocate
> the entire structure using devm_kzalloc.
> 
> Check return value from calls to igb_add_hwmon_attr() one by one
> instead
> of logically combining them all together.
> 
> Signed-off-by: Guenter Roeck <linux@xxxxxxxxxxxx>
> ---
>  drivers/net/ethernet/intel/igb/igb.h       |    8 ++-
>  drivers/net/ethernet/intel/igb/igb_hwmon.c |  100
> +++++++++++++---------------
>  2 files changed, 53 insertions(+), 55 deletions(-)

I have added this to my queue, thanks!

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
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