diff options
author | 2024-12-03 22:33:22 +0100 | |
---|---|---|
committer | 2024-12-04 19:44:22 -0800 | |
commit | 152d00a913969514967ad3f962b3b1c8983eb2d7 (patch) | |
tree | adde2d8c008bc63471c10ffdfcf004cf1bce8b3a | |
parent | selftests/net: call sendmmsg via udpgso_bench.sh (diff) | |
download | wireguard-linux-152d00a913969514967ad3f962b3b1c8983eb2d7.tar.xz wireguard-linux-152d00a913969514967ad3f962b3b1c8983eb2d7.zip |
r8169: simplify setting hwmon attribute visibility
Use new member visible to simplify setting the static visibility.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Link: https://patch.msgid.link/dba77e76-be45-4a30-96c7-45e284072ad2@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r-- | drivers/net/ethernet/realtek/r8169_main.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c index cc14cd540f74..6934bdee2a91 100644 --- a/drivers/net/ethernet/realtek/r8169_main.c +++ b/drivers/net/ethernet/realtek/r8169_main.c @@ -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, }; |