]> www.infradead.org Git - users/jedix/linux-maple.git/commit
hwmon: Add static visibility member to struct hwmon_ops
authorHeiner Kallweit <hkallweit1@gmail.com>
Thu, 10 Oct 2024 19:35:42 +0000 (21:35 +0200)
committerGuenter Roeck <linux@roeck-us.net>
Sun, 10 Nov 2024 22:48:06 +0000 (14:48 -0800)
commit79bc0af904db647979c735563299c9b0d820e432
treef15c2f6eca3b6b158bef69f5ce29217595d227bd
parentedeed7b6666cd02bd7e370b47573d95bc9b0f51c
hwmon: Add static visibility member to struct hwmon_ops

Several drivers return the same static value in their is_visible
callback, what results in code duplication. Therefore add an option
for drivers to specify a static visibility directly.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Message-ID: <89690b81-2c73-47ae-9ae9-45c77b45ca0c@gmail.com>
groeck: Renamed hwmon_ops_is_visible -> hwmon_is_visible
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/hwmon.c
include/linux/hwmon.h