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
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
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
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
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
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
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
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
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