From: Guenter Roeck Date: Tue, 26 Nov 2013 07:15:23 +0000 (+0000) Subject: igb: Convert to use devm_hwmon_device_register_with_groups X-Git-Tag: v3.14-rc1~94^2~542^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e3670b81954ab1247341a08514aa4df09f0b495e;p=pandora-kernel.git 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-diff-tree failed