[PATCH v4 2/2] hwmon: (asus_atk0110) Make use of device managed memory

2018-06-01 Thread Bastian Germann
Use devm_* variants of kstrdup and kzalloc. Get rid of kfree cleanups. Signed-off-by: Bastian Germann --- drivers/hwmon/asus_atk0110.c | 44 +++- 1 file changed, 8 insertions(+), 36 deletions(-) diff --git a/drivers/hwmon/asus_atk0110.c b/drivers/hwmon

[PATCH v4 1/2] hwmon: (asus_atk0110) Replace deprecated device register call

2018-06-01 Thread Bastian Germann
by the (un)register calls via the attribute_group array. Signed-off-by: Bastian Germann --- drivers/hwmon/asus_atk0110.c | 75 1 file changed, 25 insertions(+), 50 deletions(-) diff --git a/drivers/hwmon/asus_atk0110.c b/drivers/hwmon/asus_atk0110.c index

asus_atk0110: Use non-deprecated registration and managed memory

2018-06-01 Thread Bastian Germann
This is version 4 of my previously unversioned patch. Version 2 addresses the issues brought up by Guenter. The two v1 patches are joined in v2 1/2. The unnecessary dynamic allocations are now part of the atk_data struct. devm_kcalloc is used for the attribute array that is created from sensors. v

[PATCH 2/2] hwmon: (asus_atk0110) Make use of device managed memory

2018-06-01 Thread Bastian Germann
Use devm_* variants of kstrdup and kzalloc. Get rid of kfree cleanups. Signed-off-by: Bastian Germann --- drivers/hwmon/asus_atk0110.c | 44 +++- 1 file changed, 8 insertions(+), 36 deletions(-) diff --git a/drivers/hwmon/asus_atk0110.c b/drivers/hwmon

[PATCH 1/2] hwmon: (asus_atk0110) Replace deprecated device register call

2018-06-01 Thread Bastian Germann
by the (un)register calls via the attribute_group array. Signed-off-by: Bastian Germann --- drivers/hwmon/asus_atk0110.c | 75 1 file changed, 25 insertions(+), 50 deletions(-) diff --git a/drivers/hwmon/asus_atk0110.c b/drivers/hwmon/asus_atk0110.c index

[PATCH 2/2] hwmon: (asus_atk0110) Make use of device managed memory

2018-05-31 Thread Bastian Germann
Use devm_* variants of kstrdup and kzalloc. Get rid of the kfree cleanups. Signed-off-by: Bastian Germann --- drivers/hwmon/asus_atk0110.c | 54 +++- 1 file changed, 10 insertions(+), 44 deletions(-) diff --git a/drivers/hwmon/asus_atk0110.c b/drivers/hwmon

[PATCH 1/2] hwmon: (asus_atk0110) Replace deprecated device register call

2018-05-31 Thread Bastian Germann
by the (un)register calls via the attribute_group array. Signed-off-by: Bastian Germann --- drivers/hwmon/asus_atk0110.c | 75 1 file changed, 25 insertions(+), 50 deletions(-) diff --git a/drivers/hwmon/asus_atk0110.c b/drivers/hwmon/asus_atk0110.c index

[PATCH 2/2] hwmon: (asus_atk0110) Remove unused manual sysfs file management

2018-05-31 Thread Bastian Germann
Remove the manual sysfs file creation and deletion that are now taken care of by the (un)register calls via an attribute_group array. Signed-off-by: Bastian Germann --- drivers/hwmon/asus_atk0110.c | 46 1 file changed, 46 deletions(-) diff --git a/drivers

[PATCH 1/2] hwmon: (asus_atk0110) Replace deprecated device register call

2018-05-31 Thread Bastian Germann
Make the asus_atk0110 driver use hwmon_device_register_with_groups instead of the deprecated hwmon_device_register. Construct the expected attribute_group array from the sensor list which contains all needed attributes. Signed-off-by: Bastian Germann --- drivers/hwmon/asus_atk0110.c | 71