mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-30 22:03:17 +01:00
r8169: simplify setting hwmon attribute visibility
Use new member visible to simplify setting the static visibility. Signed-off-by: Heiner Kallweit <[email protected]> Reviewed-by: Michal Swiatkowski <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
This commit is contained in:
1 parent
ac98b31324
commit
152d00a913
1 file changed
+1
-8
@@ -5332,13 +5332,6 @@ static bool rtl_aspm_is_safe(struct rtl8169_private *tp)
|
||||
return false;
|
||||
}
|
||||
|
||||
static umode_t r8169_hwmon_is_visible(const void *drvdata,
|
||||
enum hwmon_sensor_types type,
|
||||
u32 attr, int channel)
|
||||
{
|
||||
return 0444;
|
||||
}
|
||||
|
||||
static int r8169_hwmon_read(struct device *dev, enum hwmon_sensor_types type,
|
||||
u32 attr, int channel, long *val)
|
||||
{
|
||||
@@ -5355,7 +5348,7 @@ static int r8169_hwmon_read(struct device *dev, enum hwmon_sensor_types type,
|
||||
}
|
||||
|
||||
static const struct hwmon_ops r8169_hwmon_ops = {
|
||||
.is_visible = r8169_hwmon_is_visible,
|
||||
.visible = 0444,
|
||||
.read = r8169_hwmon_read,
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user