diff mbox series

hwmon: axi-fan-control: use hwmon_notify_event

Message ID 20220308135408.440744-1-nuno.sa@analog.com (mailing list archive)
State Accepted
Headers show
Series hwmon: axi-fan-control: use hwmon_notify_event | expand

Commit Message

Nuno Sa March 8, 2022, 1:54 p.m. UTC
Instead of directly accessing kobj directly from the driver, use the
hwmon notify API.

Signed-off-by: Nuno Sá <nuno.sa@analog.com>
---
 drivers/hwmon/axi-fan-control.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Guenter Roeck March 8, 2022, 5:20 p.m. UTC | #1
On Tue, Mar 08, 2022 at 02:54:08PM +0100, Nuno Sá wrote:
> Instead of directly accessing kobj directly from the driver, use the
> hwmon notify API.
> 
> Signed-off-by: Nuno Sá <nuno.sa@analog.com>

Applied to hwmon-next.

Thanks,
Guenter

> ---
>  drivers/hwmon/axi-fan-control.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/hwmon/axi-fan-control.c b/drivers/hwmon/axi-fan-control.c
> index d2092c17d993..96c4a5c45291 100644
> --- a/drivers/hwmon/axi-fan-control.c
> +++ b/drivers/hwmon/axi-fan-control.c
> @@ -339,7 +339,8 @@ static irqreturn_t axi_fan_control_irq_handler(int irq, void *data)
>  			ctl->update_tacho_params = true;
>  		} else {
>  			ctl->hw_pwm_req = false;
> -			sysfs_notify(&ctl->hdev->kobj, NULL, "pwm1");
> +			hwmon_notify_event(ctl->hdev, hwmon_pwm,
> +					   hwmon_pwm_input, 0);
>  		}
>  	}
>
diff mbox series

Patch

diff --git a/drivers/hwmon/axi-fan-control.c b/drivers/hwmon/axi-fan-control.c
index d2092c17d993..96c4a5c45291 100644
--- a/drivers/hwmon/axi-fan-control.c
+++ b/drivers/hwmon/axi-fan-control.c
@@ -339,7 +339,8 @@  static irqreturn_t axi_fan_control_irq_handler(int irq, void *data)
 			ctl->update_tacho_params = true;
 		} else {
 			ctl->hw_pwm_req = false;
-			sysfs_notify(&ctl->hdev->kobj, NULL, "pwm1");
+			hwmon_notify_event(ctl->hdev, hwmon_pwm,
+					   hwmon_pwm_input, 0);
 		}
 	}