mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-28 16:56:26 +00:00
hwmon: (powerz) 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> Acked-by: Thomas Weißschuh <linux@weissschuh.net> Message-ID: <c4b4568b-59f6-43ac-8281-536a82ecd6ab@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This commit is contained in:
parent
9df39924c4
commit
1d92c936ca
@ -54,12 +54,6 @@ static const struct hwmon_channel_info *const powerz_info[] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
static umode_t powerz_is_visible(const void *data, enum hwmon_sensor_types type,
|
||||
u32 attr, int channel)
|
||||
{
|
||||
return 0444;
|
||||
}
|
||||
|
||||
static int powerz_read_string(struct device *dev, enum hwmon_sensor_types type,
|
||||
u32 attr, int channel, const char **str)
|
||||
{
|
||||
@ -201,7 +195,7 @@ static int powerz_read(struct device *dev, enum hwmon_sensor_types type,
|
||||
}
|
||||
|
||||
static const struct hwmon_ops powerz_hwmon_ops = {
|
||||
.is_visible = powerz_is_visible,
|
||||
.visible = 0444,
|
||||
.read = powerz_read,
|
||||
.read_string = powerz_read_string,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user