diff options
author | Marek Vasut <marex@denx.de> | 2019-05-28 20:15:41 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-05-30 07:02:18 +0200 |
commit | 517f4c49aafce3d2c3ac54ae0bb36f2c76e57fe8 (patch) | |
tree | 455edda963c9603b8d921944a48db3b193920478 /drivers/net/phy/nxp-tja11xx.c | |
parent | net: ethernet: ti: cpsw: correct .ndo_open error path (diff) | |
download | linux-517f4c49aafce3d2c3ac54ae0bb36f2c76e57fe8.tar.xz linux-517f4c49aafce3d2c3ac54ae0bb36f2c76e57fe8.zip |
net: phy: tja11xx: Switch to HWMON_CHANNEL_INFO()
The HWMON_CHANNEL_INFO macro simplifies the code, reduces the likelihood
of errors, and makes the code easier to read.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Heiner Kallweit <hkallweit1@gmail.com>
Cc: Jean Delvare <jdelvare@suse.com>
Cc: linux-hwmon@vger.kernel.org
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/nxp-tja11xx.c')
-rw-r--r-- | drivers/net/phy/nxp-tja11xx.c | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/drivers/net/phy/nxp-tja11xx.c b/drivers/net/phy/nxp-tja11xx.c index 11b8701e78fd..b705d0bd798b 100644 --- a/drivers/net/phy/nxp-tja11xx.c +++ b/drivers/net/phy/nxp-tja11xx.c @@ -311,29 +311,9 @@ static umode_t tja11xx_hwmon_is_visible(const void *data, return 0; } -static u32 tja11xx_hwmon_in_config[] = { - HWMON_I_LCRIT_ALARM, - 0 -}; - -static const struct hwmon_channel_info tja11xx_hwmon_in = { - .type = hwmon_in, - .config = tja11xx_hwmon_in_config, -}; - -static u32 tja11xx_hwmon_temp_config[] = { - HWMON_T_CRIT_ALARM, - 0 -}; - -static const struct hwmon_channel_info tja11xx_hwmon_temp = { - .type = hwmon_temp, - .config = tja11xx_hwmon_temp_config, -}; - static const struct hwmon_channel_info *tja11xx_hwmon_info[] = { - &tja11xx_hwmon_in, - &tja11xx_hwmon_temp, + HWMON_CHANNEL_INFO(in, HWMON_I_LCRIT_ALARM), + HWMON_CHANNEL_INFO(temp, HWMON_T_CRIT_ALARM), NULL }; |