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

hwmon: (surface_fan) 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: <d5d2570c-dfd9-4be5-ad9f-e721be477131@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>

authored by

Heiner Kallweit and committed by
Guenter Roeck
041e20ee 5deb4229

+1 -9
+1 -9
drivers/hwmon/surface_fan.c
··· 18 18 .command_id = 0x01, 19 19 }); 20 20 21 - // hwmon 22 - static umode_t surface_fan_hwmon_is_visible(const void *drvdata, 23 - enum hwmon_sensor_types type, u32 attr, 24 - int channel) 25 - { 26 - return 0444; 27 - } 28 - 29 21 static int surface_fan_hwmon_read(struct device *dev, 30 22 enum hwmon_sensor_types type, u32 attr, 31 23 int channel, long *val) ··· 41 49 }; 42 50 43 51 static const struct hwmon_ops surface_fan_hwmon_ops = { 44 - .is_visible = surface_fan_hwmon_is_visible, 52 + .visible = 0444, 45 53 .read = surface_fan_hwmon_read, 46 54 }; 47 55