[PATCH v3] hwmon: g762: handle cleanup with devm_add_action

2018-02-28 Thread Peng Hao
Simplify code and use devm_add_action() to handle cleanup. Signed-off-by: Peng Hao <peng.h...@zte.com.cn> --- drivers/hwmon/g762.c | 58 +--- 1 file changed, 19 insertions(+), 39 deletions(-) diff --git a/drivers/hwmon/g762.c b/drivers/hwmo

[PATCH v2] hwmon: g762: handle cleanup with devm_add_action

2018-02-28 Thread Peng Hao
Simplify code and use devm_add_action() to handle cleanup. Signed-off-by: Peng Hao <peng.h...@zte.com.cn> --- drivers/hwmon/g762.c | 43 +-- 1 file changed, 17 insertions(+), 26 deletions(-) diff --git a/drivers/hwmon/g762.c b/drivers/hwmon/g762.c

[PATCH] hwmon: g762: handle cleanup with devm_add_action

2018-02-27 Thread Peng Hao
Simplify code and use devm_add_action() to handle cleanup. Signed-off-by: Peng Hao <peng.h...@zte.com.cn> --- drivers/hwmon/g762.c | 30 ++ 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/drivers/hwmon/g762.c b/drivers/hwmon/g762.c index 6