mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-17 10:26:09 +00:00
hwmon: (nzxt-kraken2) 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: <1ac2be2d-df4f-455a-900d-821fc7bd12c4@gmail.com> Acked-by: Jonas Malaco <jonas@protocubo.io> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This commit is contained in:
parent
182137ecfb
commit
83cca55a63
@ -35,13 +35,6 @@ struct kraken2_priv_data {
|
|||||||
unsigned long updated; /* jiffies */
|
unsigned long updated; /* jiffies */
|
||||||
};
|
};
|
||||||
|
|
||||||
static umode_t kraken2_is_visible(const void *data,
|
|
||||||
enum hwmon_sensor_types type,
|
|
||||||
u32 attr, int channel)
|
|
||||||
{
|
|
||||||
return 0444;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int kraken2_read(struct device *dev, enum hwmon_sensor_types type,
|
static int kraken2_read(struct device *dev, enum hwmon_sensor_types type,
|
||||||
u32 attr, int channel, long *val)
|
u32 attr, int channel, long *val)
|
||||||
{
|
{
|
||||||
@ -81,7 +74,7 @@ static int kraken2_read_string(struct device *dev, enum hwmon_sensor_types type,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static const struct hwmon_ops kraken2_hwmon_ops = {
|
static const struct hwmon_ops kraken2_hwmon_ops = {
|
||||||
.is_visible = kraken2_is_visible,
|
.visible = 0444,
|
||||||
.read = kraken2_read,
|
.read = kraken2_read,
|
||||||
.read_string = kraken2_read_string,
|
.read_string = kraken2_read_string,
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user