summaryrefslogtreecommitdiff
path: root/drivers/hwmon/lm70.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2024-07-15 17:39:13 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2024-07-15 17:39:13 -0700
commit500a711df663adccb30fd3508960ff90c73f1cd4 (patch)
treefe158af4ae65fe662f91088f6cba7c50885f220a /drivers/hwmon/lm70.c
parente763c9ec71dd462337d0b671ec5014b737c5342e (diff)
parent1ea3fd1eb9869fcdcbc9c68f9728bfc47b9503f1 (diff)
Merge tag 'hwmon-for-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
Pull hwmon updates from Guenter Roeck: "Obsolete driver removals: - Removed obsolete adm1021 and max6642 drivers New drivers: - MPS MP2891, MP2993, MP9941, and MP5920 - SPD5118 (Temperature Sensor and EEPROM) Added device support to existing drivers: - g762: G761 - dell-smm: Dell OptiPlex 7060 - asus-ec-sensors: ProArt X670E-CREATOR WIFI - corsair-psu: HX1200i Series 2023 psu - nzxt-smart2: Additional USB IS for NZXT RGB & Fan Controller Notable enhancements and fixes: - Removed use of i2c_match_id() - Constified struct regmap_config where feasible - Cleaned up amc6821 driver, and converted to use regmap and with_info API - Converted max6639 driver to use with_info API; added support for additional sysfs attributes - Fixed various sysfs attribute underflows - Added PEC support to hwmon core, and use in lm90 and max31827 drivers And various other minor fixes and improvements" * tag 'hwmon-for-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (103 commits) hwmon: (max6697) Fix swapped temp{1,8} critical alarms hwmon: (max6697) Fix underflow when writing limit attributes hwmon: Remove obsolete adm1021 and max6642 drivers hwmon: (pmbus/ltc4286) Drop unused i2c device ids hwmon: (g762) Initialize fans after configuring clock hwmon: (amc6821) Add support for pwm1_mode attribute hwmon: (amc6821) Convert to with_info API hwmon: (amc6821) Convert to use regmap hwmon: (amc6821) Drop unnecessary enum chips hwmon: (amc6821) Use BIT() and GENMASK() hwmon: (amc6821) Use tabs for column alignment in defines hwmon: (amc6821) Reorder include files, drop unnecessary ones hwmon: (amc6821) Add support for fan1_target and pwm1_enable mode 4 hwmon: (amc6821) Rename fan1_div to fan1_pulses hwmon: (amc6821) Make reading and writing fan speed limits consistent hwmon: (amc6821) Stop accepting invalid pwm values hwmon: (w83627ehf) Fix underflows seen when writing limit attributes hwmon: (nct6775-core) Fix underflows seen when writing limit attributes hwmon: (lm95234) Fix underflows seen when writing limit attributes hwmon: (adc128d818) Fix underflows seen when writing limit attributes ...
Diffstat (limited to 'drivers/hwmon/lm70.c')
-rw-r--r--drivers/hwmon/lm70.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/hwmon/lm70.c b/drivers/hwmon/lm70.c
index 481e4e1f8f4f..0d5a250cb672 100644
--- a/drivers/hwmon/lm70.c
+++ b/drivers/hwmon/lm70.c
@@ -169,11 +169,7 @@ static int lm70_probe(struct spi_device *spi)
struct lm70 *p_lm70;
int chip;
- if (dev_fwnode(&spi->dev))
- chip = (int)(uintptr_t)device_get_match_data(&spi->dev);
- else
- chip = spi_get_device_id(spi)->driver_data;
-
+ chip = (kernel_ulong_t)spi_get_device_match_data(spi);
/* signaling is SPI_MODE_0 */
if ((spi->mode & SPI_MODE_X_MASK) != SPI_MODE_0)