compal-laptop: Use devm_hwmon_device_register_with_groups
authorGuenter Roeck <linux@roeck-us.net>
Sat, 23 Nov 2013 19:03:20 +0000 (11:03 -0800)
committerMatthew Garrett <matthew.garrett@nebula.com>
Tue, 21 Jan 2014 13:44:03 +0000 (08:44 -0500)
commitc2be45f09bb0b37ba1f87f39fbb04886f94e3e58
tree6c44da69f215597a10784612c9d057a312633b4d
parent4e062581cc95cc0a12f8e48778a0d3ebb48fa980
compal-laptop: Use devm_hwmon_device_register_with_groups

Simplify the code and create hwmon attributes as well as hwmon device in one go.

With the new hwmon API, hwmon attributes are now attached to the hwmon device.
Therefore, split hwmon and device attributes into two separate groups.
Platform attributes are still attached to the platform device.

Also use devm_kzalloc to allocate local data structures for further
simplification.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
drivers/platform/x86/compal-laptop.c