]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit3a20bc113e42ddc3253f0e3afe2344c38fb37ce7
tree6c44da69f215597a10784612c9d057a312633b4d
parent301d41582d73654e78202c3a78d5d025fb060766
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