Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Marek Vasut and committed by
David S. Miller
517f4c49 02cacede

+2 -22
+2 -22
drivers/net/phy/nxp-tja11xx.c
··· 311 311 return 0; 312 312 } 313 313 314 - static u32 tja11xx_hwmon_in_config[] = { 315 - HWMON_I_LCRIT_ALARM, 316 - 0 317 - }; 318 - 319 - static const struct hwmon_channel_info tja11xx_hwmon_in = { 320 - .type = hwmon_in, 321 - .config = tja11xx_hwmon_in_config, 322 - }; 323 - 324 - static u32 tja11xx_hwmon_temp_config[] = { 325 - HWMON_T_CRIT_ALARM, 326 - 0 327 - }; 328 - 329 - static const struct hwmon_channel_info tja11xx_hwmon_temp = { 330 - .type = hwmon_temp, 331 - .config = tja11xx_hwmon_temp_config, 332 - }; 333 - 334 314 static const struct hwmon_channel_info *tja11xx_hwmon_info[] = { 335 - &tja11xx_hwmon_in, 336 - &tja11xx_hwmon_temp, 315 + HWMON_CHANNEL_INFO(in, HWMON_I_LCRIT_ALARM), 316 + HWMON_CHANNEL_INFO(temp, HWMON_T_CRIT_ALARM), 337 317 NULL 338 318 }; 339 319