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: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NMatthew Garrett <matthew.garrett@nebula.com>
Showing
想要评论请 注册 或 登录