mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-23 12:14:10 +08:00
hwmon: (raspberrypi) 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: <4e8893a1-b080-4676-97b9-a48ac9ead28a@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This commit is contained in:
parent
1d92c936ca
commit
39a8cf342b
@ -81,12 +81,6 @@ static int rpi_read(struct device *dev, enum hwmon_sensor_types type,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static umode_t rpi_is_visible(const void *_data, enum hwmon_sensor_types type,
|
||||
u32 attr, int channel)
|
||||
{
|
||||
return 0444;
|
||||
}
|
||||
|
||||
static const struct hwmon_channel_info * const rpi_info[] = {
|
||||
HWMON_CHANNEL_INFO(in,
|
||||
HWMON_I_LCRIT_ALARM),
|
||||
@ -94,7 +88,7 @@ static const struct hwmon_channel_info * const rpi_info[] = {
|
||||
};
|
||||
|
||||
static const struct hwmon_ops rpi_hwmon_ops = {
|
||||
.is_visible = rpi_is_visible,
|
||||
.visible = 0444,
|
||||
.read = rpi_read,
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user