Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

hwmon: (i5500_temp) Simplify specifying static visibility attribute

Use new member visible of struct hwmon_ops to simplify specifying
the static attribute visibility.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Message-ID: <2b1f2778-1127-4979-b02d-f75e16497ad7@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>

authored by

Heiner Kallweit and committed by
Guenter Roeck
5deb4229 7506ebcd

+1 -7
+1 -7
drivers/hwmon/i5500_temp.c
··· 29 29 #define REG_CTCTRL 0xF7 30 30 #define REG_TSTIMER 0xF8 31 31 32 - static umode_t i5500_is_visible(const void *drvdata, enum hwmon_sensor_types type, u32 attr, 33 - int channel) 34 - { 35 - return 0444; 36 - } 37 - 38 32 static int i5500_read(struct device *dev, enum hwmon_sensor_types type, u32 attr, int channel, 39 33 long *val) 40 34 { ··· 78 84 } 79 85 80 86 static const struct hwmon_ops i5500_ops = { 81 - .is_visible = i5500_is_visible, 87 + .visible = 0444, 82 88 .read = i5500_read, 83 89 }; 84 90