Skip to contentSkip to conversation

hwmon: axi-fan-control: use hwmon_notify_event

PATCH Applied Nuno Sá 2 participants 2 messages Mar 8, 2022

Subsystems (2)
lore
Share & tools
lore

Nuno Sá

author maintainer
#0 lore raw

PATCH 1/1 hwmon: axi-fan-control: use hwmon_notify_event

Instead of directly accessing kobj directly from the driver, use the hwmon notify API.

---
 drivers/hwmon/axi-fan-control.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/hwmon/axi-fan-control.c +2 -1
index d2092c17d993..96c4a5c45291 100644
@@ -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);
 		}
 	}
 
Signature · 1 line
2.35.1
maintainer Applied
#1 lore raw
Quoted 4 lines · Nuno Sá

Instead of directly accessing kobj directly from the driver, use the hwmon notify API.

Applied to hwmon-next.

Thanks,
Guenter

Quoted 18 lines
---
 drivers/hwmon/axi-fan-control.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/hwmon/axi-fan-control.c +2 -1
index d2092c17d993..96c4a5c45291 100644
@@ -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);
 		}
 	}