mbox series

[0/2] hwmon: (sch5627) Use devres function

Message ID 20210417210920.15496-1-W_Armin@gmx.de (mailing list archive)
Headers show
Series hwmon: (sch5627) Use devres function | expand

Message

Armin Wolf April 17, 2021, 9:09 p.m. UTC
From: Armin Wolf <W_Armin@gmx.de>

Use devm_hwmon_device_register_with_info() to simplify
the source code and remove an unnecessary error path
in sch5627_probe as it performs nothing useful when
using the devres function.

Tested on a Fujitsu Esprimo P720.

Armin Wolf (2):
  hwmon: (sch5627) Use devres function
  hwmon: (sch5627) Remove unnecessary error path

 drivers/hwmon/sch5627.c | 81 ++++++++++++++---------------------------
 1 file changed, 28 insertions(+), 53 deletions(-)

--
2.20.1

Comments

Hans de Goede April 18, 2021, 12:48 p.m. UTC | #1
Hi,

On 4/17/21 11:09 PM, W_Armin@gmx.de wrote:
> From: Armin Wolf <W_Armin@gmx.de>
> 
> Use devm_hwmon_device_register_with_info() to simplify
> the source code and remove an unnecessary error path
> in sch5627_probe as it performs nothing useful when
> using the devres function.
> 
> Tested on a Fujitsu Esprimo P720.
> 
> Armin Wolf (2):
>   hwmon: (sch5627) Use devres function
>   hwmon: (sch5627) Remove unnecessary error path

Thanks, both patches looks good to me:

Reviewed-by: Hans de Goede <hdegoede@redhat.com>

For the series.

Regards,

Hans
Guenter Roeck April 19, 2021, 3:59 a.m. UTC | #2
On 4/17/21 2:09 PM, W_Armin@gmx.de wrote:
> From: Armin Wolf <W_Armin@gmx.de>
> 
> Use devm_hwmon_device_register_with_info() to simplify
> the source code and remove an unnecessary error path
> in sch5627_probe as it performs nothing useful when
> using the devres function.
> 
> Tested on a Fujitsu Esprimo P720.
> 
> Armin Wolf (2):
>   hwmon: (sch5627) Use devres function
>   hwmon: (sch5627) Remove unnecessary error path
> 
>  drivers/hwmon/sch5627.c | 81 ++++++++++++++---------------------------
>  1 file changed, 28 insertions(+), 53 deletions(-)
> 
> --
> 2.20.1
> 

Both applied, though it would be even better if you'd do the same
with the watchdog device.

Guenter