From e3670b81954ab1247341a08514aa4df09f0b495e Mon Sep 17 00:00:00 2001 From: Guenter Roeck Date: Tue, 26 Nov 2013 07:15:23 +0000 Subject: [PATCH] igb: Convert to use devm_hwmon_device_register_with_groups 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 Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- Reading git-format-patch failed