[PATCH 2/9] hwmon: i5500_temp: Use new helper hwmon_visible_0444
Heiner Kallweit
hkallweit1 at gmail.com
Wed Oct 9 13:04:19 PDT 2024
Use new helper hwmon_visible_0444 to simplify the code.
Signed-off-by: Heiner Kallweit <hkallweit1 at gmail.com>
---
drivers/hwmon/i5500_temp.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/hwmon/i5500_temp.c b/drivers/hwmon/i5500_temp.c
index 7b00b38c7..819be21d3 100644
--- a/drivers/hwmon/i5500_temp.c
+++ b/drivers/hwmon/i5500_temp.c
@@ -29,12 +29,6 @@
#define REG_CTCTRL 0xF7
#define REG_TSTIMER 0xF8
-static umode_t i5500_is_visible(const void *drvdata, enum hwmon_sensor_types type, u32 attr,
- int channel)
-{
- return 0444;
-}
-
static int i5500_read(struct device *dev, enum hwmon_sensor_types type, u32 attr, int channel,
long *val)
{
@@ -84,7 +78,7 @@ static int i5500_read(struct device *dev, enum hwmon_sensor_types type, u32 attr
}
static const struct hwmon_ops i5500_ops = {
- .is_visible = i5500_is_visible,
+ .is_visible = hwmon_visible_0444,
.read = i5500_read,
};
--
2.47.0
More information about the linux-arm-kernel
mailing list