* [PATCH 1/8] hwmon: i5500_temp: Simplify specifying static visibility attribute
2024-10-11 19:53 [PATCH 0/8] hwmon: Use new member visible in struct hwmon_ops to simplify drivers Heiner Kallweit
@ 2024-10-11 19:55 ` Heiner Kallweit
2024-10-11 19:56 ` [PATCH 2/8] hwmon: surface_fan: " Heiner Kallweit
` (7 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Heiner Kallweit @ 2024-10-11 19:55 UTC (permalink / raw)
To: Jean Delvare, Guenter Roeck; +Cc: linux-hwmon@vger.kernel.org
Use new member visible of struct hwmon_ops to simplify specifying
the static attribute visibility.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
drivers/hwmon/i5500_temp.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/hwmon/i5500_temp.c b/drivers/hwmon/i5500_temp.c
index 7b00b38c7..2a530da21 100644
--- a/drivers/hwmon/i5500_temp.c
+++ b/drivers/hwmon/i5500_temp.c
@@ -29,12 +29,6 @@
#define REG_CTCTRL 0xF7
#define REG_TSTIMER 0xF8
-static umode_t i5500_is_visible(const void *drvdata, enum hwmon_sensor_types type, u32 attr,
- int channel)
-{
- return 0444;
-}
-
static int i5500_read(struct device *dev, enum hwmon_sensor_types type, u32 attr, int channel,
long *val)
{
@@ -84,7 +78,7 @@ static int i5500_read(struct device *dev, enum hwmon_sensor_types type, u32 attr
}
static const struct hwmon_ops i5500_ops = {
- .is_visible = i5500_is_visible,
+ .visible = 0444,
.read = i5500_read,
};
--
2.47.0
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH 2/8] hwmon: surface_fan: Simplify specifying static visibility attribute
2024-10-11 19:53 [PATCH 0/8] hwmon: Use new member visible in struct hwmon_ops to simplify drivers Heiner Kallweit
2024-10-11 19:55 ` [PATCH 1/8] hwmon: i5500_temp: Simplify specifying static visibility attribute Heiner Kallweit
@ 2024-10-11 19:56 ` Heiner Kallweit
2024-10-11 19:58 ` [PATCH 3/8] hwmon: sl28cpld: " Heiner Kallweit
` (6 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Heiner Kallweit @ 2024-10-11 19:56 UTC (permalink / raw)
To: Jean Delvare, Guenter Roeck, Maximilian Luz, Ivor Wanders
Cc: linux-hwmon@vger.kernel.org
Use new member visible of struct hwmon_ops to simplify specifying
the static attribute visibility.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
drivers/hwmon/surface_fan.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/hwmon/surface_fan.c b/drivers/hwmon/surface_fan.c
index de3c5a240..aafb4ac92 100644
--- a/drivers/hwmon/surface_fan.c
+++ b/drivers/hwmon/surface_fan.c
@@ -18,14 +18,6 @@ SSAM_DEFINE_SYNC_REQUEST_CL_R(__ssam_fan_rpm_get, __le16, {
.command_id = 0x01,
});
-// hwmon
-static umode_t surface_fan_hwmon_is_visible(const void *drvdata,
- enum hwmon_sensor_types type, u32 attr,
- int channel)
-{
- return 0444;
-}
-
static int surface_fan_hwmon_read(struct device *dev,
enum hwmon_sensor_types type, u32 attr,
int channel, long *val)
@@ -49,7 +41,7 @@ static const struct hwmon_channel_info *const surface_fan_info[] = {
};
static const struct hwmon_ops surface_fan_hwmon_ops = {
- .is_visible = surface_fan_hwmon_is_visible,
+ .visible = 0444,
.read = surface_fan_hwmon_read,
};
--
2.47.0
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH 3/8] hwmon: sl28cpld: Simplify specifying static visibility attribute
2024-10-11 19:53 [PATCH 0/8] hwmon: Use new member visible in struct hwmon_ops to simplify drivers Heiner Kallweit
2024-10-11 19:55 ` [PATCH 1/8] hwmon: i5500_temp: Simplify specifying static visibility attribute Heiner Kallweit
2024-10-11 19:56 ` [PATCH 2/8] hwmon: surface_fan: " Heiner Kallweit
@ 2024-10-11 19:58 ` Heiner Kallweit
2024-10-11 19:59 ` [PATCH 4/8] hwmon: gsc: " Heiner Kallweit
` (5 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Heiner Kallweit @ 2024-10-11 19:58 UTC (permalink / raw)
To: Jean Delvare, Guenter Roeck, Michael Walle; +Cc: linux-hwmon@vger.kernel.org
Use new member visible of struct hwmon_ops to simplify specifying
the static attribute visibility.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
drivers/hwmon/sl28cpld-hwmon.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/hwmon/sl28cpld-hwmon.c b/drivers/hwmon/sl28cpld-hwmon.c
index e020f25c9..454cc844f 100644
--- a/drivers/hwmon/sl28cpld-hwmon.c
+++ b/drivers/hwmon/sl28cpld-hwmon.c
@@ -23,13 +23,6 @@ struct sl28cpld_hwmon {
u32 offset;
};
-static umode_t sl28cpld_hwmon_is_visible(const void *data,
- enum hwmon_sensor_types type,
- u32 attr, int channel)
-{
- return 0444;
-}
-
static int sl28cpld_hwmon_read(struct device *dev,
enum hwmon_sensor_types type, u32 attr,
int channel, long *input)
@@ -73,7 +66,7 @@ static const struct hwmon_channel_info * const sl28cpld_hwmon_info[] = {
};
static const struct hwmon_ops sl28cpld_hwmon_ops = {
- .is_visible = sl28cpld_hwmon_is_visible,
+ .visible = 0444,
.read = sl28cpld_hwmon_read,
};
--
2.47.0
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH 4/8] hwmon: gsc: Simplify specifying static visibility attribute
2024-10-11 19:53 [PATCH 0/8] hwmon: Use new member visible in struct hwmon_ops to simplify drivers Heiner Kallweit
` (2 preceding siblings ...)
2024-10-11 19:58 ` [PATCH 3/8] hwmon: sl28cpld: " Heiner Kallweit
@ 2024-10-11 19:59 ` Heiner Kallweit
2024-10-11 20:00 ` [PATCH 5/8] hwmon: powerz: " Heiner Kallweit
` (4 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Heiner Kallweit @ 2024-10-11 19:59 UTC (permalink / raw)
To: Tim Harvey, Jean Delvare, Guenter Roeck; +Cc: linux-hwmon@vger.kernel.org
Use new member visible of struct hwmon_ops to simplify specifying
the static attribute visibility.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
drivers/hwmon/gsc-hwmon.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/hwmon/gsc-hwmon.c b/drivers/hwmon/gsc-hwmon.c
index 4514f3ed9..34aa17a23 100644
--- a/drivers/hwmon/gsc-hwmon.c
+++ b/drivers/hwmon/gsc-hwmon.c
@@ -231,15 +231,8 @@ gsc_hwmon_read_string(struct device *dev, enum hwmon_sensor_types type,
return 0;
}
-static umode_t
-gsc_hwmon_is_visible(const void *_data, enum hwmon_sensor_types type, u32 attr,
- int ch)
-{
- return 0444;
-}
-
static const struct hwmon_ops gsc_hwmon_ops = {
- .is_visible = gsc_hwmon_is_visible,
+ .visible = 0444,
.read = gsc_hwmon_read,
.read_string = gsc_hwmon_read_string,
};
--
2.47.0
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH 5/8] hwmon: powerz: Simplify specifying static visibility attribute
2024-10-11 19:53 [PATCH 0/8] hwmon: Use new member visible in struct hwmon_ops to simplify drivers Heiner Kallweit
` (3 preceding siblings ...)
2024-10-11 19:59 ` [PATCH 4/8] hwmon: gsc: " Heiner Kallweit
@ 2024-10-11 20:00 ` Heiner Kallweit
2024-10-11 20:06 ` Thomas Weißschuh
2024-10-11 20:01 ` [PATCH 6/8] hwmon: raspberrypi: " Heiner Kallweit
` (3 subsequent siblings)
8 siblings, 1 reply; 12+ messages in thread
From: Heiner Kallweit @ 2024-10-11 20:00 UTC (permalink / raw)
To: Jean Delvare, Guenter Roeck, Thomas Weißschuh
Cc: linux-hwmon@vger.kernel.org
Use new member visible of struct hwmon_ops to simplify specifying
the static attribute visibility.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
drivers/hwmon/powerz.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/hwmon/powerz.c b/drivers/hwmon/powerz.c
index cfb635f94..4e663d5b4 100644
--- a/drivers/hwmon/powerz.c
+++ b/drivers/hwmon/powerz.c
@@ -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,
};
--
2.47.0
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH 6/8] hwmon: raspberrypi: Simplify specifying static visibility attribute
2024-10-11 19:53 [PATCH 0/8] hwmon: Use new member visible in struct hwmon_ops to simplify drivers Heiner Kallweit
` (4 preceding siblings ...)
2024-10-11 20:00 ` [PATCH 5/8] hwmon: powerz: " Heiner Kallweit
@ 2024-10-11 20:01 ` Heiner Kallweit
2024-10-11 20:03 ` [PATCH 7/8] hwmon: intel-m10-bmc: " Heiner Kallweit
` (2 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Heiner Kallweit @ 2024-10-11 20:01 UTC (permalink / raw)
To: Jean Delvare, Guenter Roeck, Florian Fainelli
Cc: Broadcom internal kernel review list, linux-hwmon@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-rpi-kernel
Use new member visible of struct hwmon_ops to simplify specifying
the static attribute visibility.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
drivers/hwmon/raspberrypi-hwmon.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/hwmon/raspberrypi-hwmon.c b/drivers/hwmon/raspberrypi-hwmon.c
index 65cc52e47..10ef1e1f9 100644
--- a/drivers/hwmon/raspberrypi-hwmon.c
+++ b/drivers/hwmon/raspberrypi-hwmon.c
@@ -81,12 +81,6 @@ static int rpi_read(struct device *dev, enum hwmon_sensor_types type,
return 0;
}
-static umode_t rpi_is_visible(const void *_data, enum hwmon_sensor_types type,
- u32 attr, int channel)
-{
- return 0444;
-}
-
static const struct hwmon_channel_info * const rpi_info[] = {
HWMON_CHANNEL_INFO(in,
HWMON_I_LCRIT_ALARM),
@@ -94,7 +88,7 @@ static const struct hwmon_channel_info * const rpi_info[] = {
};
static const struct hwmon_ops rpi_hwmon_ops = {
- .is_visible = rpi_is_visible,
+ .visible = 0444,
.read = rpi_read,
};
--
2.47.0
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH 7/8] hwmon: intel-m10-bmc: Simplify specifying static visibility attribute
2024-10-11 19:53 [PATCH 0/8] hwmon: Use new member visible in struct hwmon_ops to simplify drivers Heiner Kallweit
` (5 preceding siblings ...)
2024-10-11 20:01 ` [PATCH 6/8] hwmon: raspberrypi: " Heiner Kallweit
@ 2024-10-11 20:03 ` Heiner Kallweit
2024-10-11 20:04 ` [PATCH 8/8] hwmon: nzxt-kraken2: " Heiner Kallweit
2024-10-11 20:24 ` [PATCH 0/8] hwmon: Use new member visible in struct hwmon_ops to simplify drivers Guenter Roeck
8 siblings, 0 replies; 12+ messages in thread
From: Heiner Kallweit @ 2024-10-11 20:03 UTC (permalink / raw)
To: Jean Delvare, Guenter Roeck, Xu Yilun, Tom Rix
Cc: linux-hwmon@vger.kernel.org
Use new member visible of struct hwmon_ops to simplify specifying
the static attribute visibility.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
drivers/hwmon/intel-m10-bmc-hwmon.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/hwmon/intel-m10-bmc-hwmon.c b/drivers/hwmon/intel-m10-bmc-hwmon.c
index 96397ae6f..e221f2c1f 100644
--- a/drivers/hwmon/intel-m10-bmc-hwmon.c
+++ b/drivers/hwmon/intel-m10-bmc-hwmon.c
@@ -565,13 +565,6 @@ static const struct m10bmc_hwmon_board_data n6000bmc_hwmon_bdata = {
.hinfo = n6000bmc_hinfo,
};
-static umode_t
-m10bmc_hwmon_is_visible(const void *data, enum hwmon_sensor_types type,
- u32 attr, int channel)
-{
- return 0444;
-}
-
static const struct m10bmc_sdata *
find_sensor_data(struct m10bmc_hwmon *hw, enum hwmon_sensor_types type,
int channel)
@@ -729,7 +722,7 @@ static int m10bmc_hwmon_read_string(struct device *dev,
}
static const struct hwmon_ops m10bmc_hwmon_ops = {
- .is_visible = m10bmc_hwmon_is_visible,
+ .visible = 0444,
.read = m10bmc_hwmon_read,
.read_string = m10bmc_hwmon_read_string,
};
--
2.47.0
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH 8/8] hwmon: nzxt-kraken2: Simplify specifying static visibility attribute
2024-10-11 19:53 [PATCH 0/8] hwmon: Use new member visible in struct hwmon_ops to simplify drivers Heiner Kallweit
` (6 preceding siblings ...)
2024-10-11 20:03 ` [PATCH 7/8] hwmon: intel-m10-bmc: " Heiner Kallweit
@ 2024-10-11 20:04 ` Heiner Kallweit
2024-10-12 0:02 ` Jonas Malaco
2024-10-11 20:24 ` [PATCH 0/8] hwmon: Use new member visible in struct hwmon_ops to simplify drivers Guenter Roeck
8 siblings, 1 reply; 12+ messages in thread
From: Heiner Kallweit @ 2024-10-11 20:04 UTC (permalink / raw)
To: Jean Delvare, Guenter Roeck, Jonas Malaco; +Cc: linux-hwmon@vger.kernel.org
Use new member visible of struct hwmon_ops to simplify specifying
the static attribute visibility.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
drivers/hwmon/nzxt-kraken2.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/hwmon/nzxt-kraken2.c b/drivers/hwmon/nzxt-kraken2.c
index ed38645a1..034698232 100644
--- a/drivers/hwmon/nzxt-kraken2.c
+++ b/drivers/hwmon/nzxt-kraken2.c
@@ -35,13 +35,6 @@ struct kraken2_priv_data {
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,
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 = {
- .is_visible = kraken2_is_visible,
+ .visible = 0444,
.read = kraken2_read,
.read_string = kraken2_read_string,
};
--
2.47.0
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [PATCH 0/8] hwmon: Use new member visible in struct hwmon_ops to simplify drivers
2024-10-11 19:53 [PATCH 0/8] hwmon: Use new member visible in struct hwmon_ops to simplify drivers Heiner Kallweit
` (7 preceding siblings ...)
2024-10-11 20:04 ` [PATCH 8/8] hwmon: nzxt-kraken2: " Heiner Kallweit
@ 2024-10-11 20:24 ` Guenter Roeck
8 siblings, 0 replies; 12+ messages in thread
From: Guenter Roeck @ 2024-10-11 20:24 UTC (permalink / raw)
To: Heiner Kallweit, Tim Harvey, Jean Delvare, Xu Yilun, Tom Rix,
Jonas Malaco, Thomas Weißschuh, Florian Fainelli,
Michael Walle, Maximilian Luz, Ivor Wanders
Cc: Broadcom internal kernel review list, linux-hwmon@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-rpi-kernel
On 10/11/24 12:53, Heiner Kallweit wrote:
> This is a follow-up to 11fb69bb15c1 ("hwmon: Add static visibility member
> to struct hwmon_ops") and makes use of the new struct hwmon_ops member
> to simplify a number of drivers.
>
> Heiner Kallweit (8):
> hwmon: i5500_temp: Simplify specifying static visibility attribute
> hwmon: surface_fan: Simplify specifying static visibility attribute
> hwmon: sl28cpld: Simplify specifying static visibility attribute
> hwmon: gsc: Simplify specifying static visibility attribute
> hwmon: powerz: Simplify specifying static visibility attribute
> hwmon: raspberrypi: Simplify specifying static visibility attribute
> hwmon: intel-m10-bmc: Simplify specifying static visibility attribute
> hwmon: nzxt-kraken2: Simplify specifying static visibility attribute
>
> drivers/hwmon/gsc-hwmon.c | 9 +--------
> drivers/hwmon/i5500_temp.c | 8 +-------
> drivers/hwmon/intel-m10-bmc-hwmon.c | 9 +--------
> drivers/hwmon/nzxt-kraken2.c | 9 +--------
> drivers/hwmon/powerz.c | 8 +-------
> drivers/hwmon/raspberrypi-hwmon.c | 8 +-------
> drivers/hwmon/sl28cpld-hwmon.c | 9 +--------
> drivers/hwmon/surface_fan.c | 10 +---------
> 8 files changed, 8 insertions(+), 62 deletions(-)
>
Series applied.
Thanks,
Guenter
^ permalink raw reply [flat|nested] 12+ messages in thread