linux/drivers/hwmon
Zev Weiss f4e6960f4f hwmon: (nct6775) Fix platform driver suspend regression
Commit c3963bc0a0 ("hwmon: (nct6775) Split core and platform
driver") introduced a slight change in nct6775_suspend() in order to
avoid an otherwise-needless symbol export for nct6775_update_device(),
replacing a call to that function with a simple dev_get_drvdata()
instead.

As it turns out, there is no guarantee that nct6775_update_device()
is ever called prior to suspend. If this happens, the resume function
ends up writing bad data into the various chip registers, which results
in a crash shortly after resume.

To fix the problem, just add the symbol export and return to using
nct6775_update_device() as was employed previously.

Reported-by: Zoltán Kővágó <dirty.ice.hu@gmail.com>
Tested-by: Zoltán Kővágó <dirty.ice.hu@gmail.com>
Fixes: c3963bc0a0 ("hwmon: (nct6775) Split core and platform driver")
Cc: stable@kernel.org
Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Link: https://lore.kernel.org/r/20220810052646.13825-1-zev@bewilderbeest.net
[groeck: Updated description]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2022-08-10 06:37:01 -07:00
..
occ hwmon: (occ) Replace open-coded variant of %*phN specifier 2022-07-26 08:02:51 -07:00
peci hwmon: (dimmtemp) Fix bitmap handling 2022-05-22 11:32:32 -07:00
pmbus hwmon: (pmbus/ltc2978) Set voltage resolution 2022-07-13 08:38:20 -07:00
abituguru3.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
abituguru.c
acpi_power_meter.c hwmon: (acpi_power_meter) Fix style issues 2022-05-22 11:32:31 -07:00
ad7314.c
ad7414.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
ad7418.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
adc128d818.c
adcxx.c spi: make remove callback a void function 2022-02-09 13:00:45 +00:00
adm1021.c hwmon: (adm1021) Improve detection of LM84, MAX1617, and MAX1617A 2021-12-26 15:02:05 -08:00
adm1025.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
adm1026.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
adm1029.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
adm1031.c hwmon: (adm1031) Remove redundant assignment to variable range 2021-12-26 15:02:06 -08:00
adm1177.c
adm9240.c hwmon: (adm9240) Fix writes into inX_max attributes 2021-05-12 18:53:11 -07:00
ads7828.c
ads7871.c
adt7x10.c hwmon: (adt7x10) Use hwmon_notify_event 2022-02-27 17:03:18 -08:00
adt7x10.h hwmon: (adt7x10) Remove empty driver removal callback 2022-02-27 17:03:18 -08:00
adt7310.c hwmon: (adt7x10) Remove empty driver removal callback 2022-02-27 17:03:18 -08:00
adt7410.c hwmon: (adt7x10) Remove empty driver removal callback 2022-02-27 17:03:18 -08:00
adt7411.c
adt7462.c
adt7470.c hwmon: (adt7470) Fix warning on module removal 2022-04-08 08:39:03 -07:00
adt7475.c hwmon: (adt7475) Use enum chips when loading attenuator settings 2022-05-22 11:32:31 -07:00
aht10.c
amc6821.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
applesmc.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
aquacomputer_d5next.c hwmon: (aquacomputer_d5next) Add support for Aquacomputer Quadro fan controller 2022-07-27 06:00:24 -07:00
as370-hwmon.c hwmon: (as370-hwmon) Use HWMON_CHANNEL_INFO macro 2022-05-22 11:32:31 -07:00
asb100.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
asc7621.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
aspeed-pwm-tacho.c hwmon: (aspeed-pwm-tacho) increase fan tach period (again) 2022-07-21 07:15:55 -07:00
asus_atk0110.c
asus_wmi_ec_sensors.c hwmon: (asus_wmi_ec_sensors) Support T_Sensor on Prime X570-Pro 2022-02-27 17:03:17 -08:00
asus_wmi_sensors.c hwmon: (asus_wmi_sensors) Save a few bytes of memory 2022-07-13 08:39:42 -07:00
asus-ec-sensors.c hwmon: (asus-ec-sensors) add definitions for ROG ZENITH II EXTREME 2022-07-13 08:39:42 -07:00
atxp1.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
axi-fan-control.c hwmon: (axi-fan-control) Use hwmon_notify_event 2022-03-08 09:20:00 -08:00
bt1-pvt.c hwmon: (bt1-pvt) use generic polynomial functions 2022-05-22 11:32:30 -07:00
bt1-pvt.h
coretemp.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
corsair-cpro.c hwmon: (corsair-cpro) Fix fall-through warnings for Clang 2021-05-17 19:50:23 -05:00
corsair-psu.c hwmon: (corsair-psu) fix plain integer used as NULL pointer 2021-11-14 16:57:16 -08:00
da9052-hwmon.c
da9055-hwmon.c
dell-smm-hwmon.c hwmon: (dell-smm) Improve assembly code 2022-07-13 08:38:20 -07:00
dme1737.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
drivetemp.c hwmon: (drivetemp) Add module alias 2022-07-13 08:39:42 -07:00
ds620.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
ds1621.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
emc6w201.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
emc1403.c
emc2103.c
f71805f.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
f71882fg.c hwmon: (f71882fg) Add support for F71858AD (0x0903) 2022-07-13 08:38:19 -07:00
f75375s.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
fam15h_power.c hwmon: Replace deprecated CPU-hotplug functions. 2021-08-17 14:54:26 -07:00
fschmd.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
ftsteutates.c
g760a.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
g762.c
gl518sm.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
gl520sm.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
gpio-fan.c
gsc-hwmon.c hwmon: (gsc-hwmon) Add missing of_node_put() 2022-07-13 08:38:20 -07:00
hih6130.c
hwmon-vid.c
hwmon.c hwmon: Directly use ida_alloc()/free() 2022-05-22 11:32:32 -07:00
i5k_amb.c
i5500_temp.c hwmon: (i5500_temp) Convert to devm_hwmon_device_register_with_info 2021-10-12 07:22:37 -07:00
ibmaem.c hwmon: (ibmaem) don't call platform_device_del() if platform_device_add() fails 2022-07-01 11:53:29 -07:00
ibmpex.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
ibmpowernv.c
iio_hwmon.c
ina2xx.c
ina209.c
ina238.c hwmon: Driver for Texas Instruments INA238 2021-12-26 15:02:05 -08:00
ina3221.c hwmon: (ina3221) use CVRF only for single-shot conversion 2021-06-17 04:21:46 -07:00
intel-m10-bmc-hwmon.c hwmon: (intel-m10-bmc-hwmon) use devm_hwmon_sanitize_name() 2022-05-17 05:53:00 -07:00
it87.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
jc42.c hwmon: (jc42) Add support for S-34TS04A 2022-05-20 10:57:05 -07:00
k8temp.c
k10temp.c hwmon: (k10temp): Add support for new family 17h and 19h models 2022-07-20 17:39:11 +02:00
Kconfig hwmon: (aquacomputer_d5next) Add support for Aquacomputer Quadro fan controller 2022-07-27 06:00:24 -07:00
lan966x-hwmon.c hwmon: add driver for the Microchip LAN966x SoC 2022-05-22 11:32:30 -07:00
lineage-pem.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
lm63.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
lm70.c hwmon: (lm70) Add ti,tmp125 support 2022-02-27 17:03:19 -08:00
lm73.c
lm75.c hwmon: (lm75) Add Atmel AT30TS74 support 2022-05-20 10:57:05 -07:00
lm75.h hwmon: (lm75) Replace kernel.h with the necessary inclusions 2022-07-13 08:38:19 -07:00
lm77.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
lm78.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
lm80.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
lm83.c hwmon: (lm83) Remove unused include directives 2022-05-22 11:32:31 -07:00
lm85.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
lm87.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
lm90.c hwmon: (lm90) Fix error return value from detect function 2022-08-10 00:49:46 -07:00
lm92.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
lm93.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
lm95234.c
lm95241.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
lm95245.c
lochnagar-hwmon.c
ltc2945.c
ltc2947-core.c hwmon: (ltc2947) Properly handle errors when looking for the external clock 2021-09-24 05:02:24 -07:00
ltc2947-i2c.c
ltc2947-spi.c
ltc2947.h
ltc2990.c
ltc2992.c hwmon: (ltc2992) Use HWMON_CHANNEL_INFO macro 2022-05-22 11:32:31 -07:00
ltc4151.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
ltc4215.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
ltc4222.c
ltc4245.c
ltc4260.c
ltc4261.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
ltq-cputemp.c
Makefile hwmon: (nct6775) Add i2c driver 2022-05-22 11:32:31 -07:00
max127.c
max197.c
max1111.c spi: make remove callback a void function 2022-02-09 13:00:45 +00:00
max1619.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
max1668.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
max6620.c hwmon: Add Maxim MAX6620 hardware monitoring driver 2021-10-12 07:22:37 -07:00
max6621.c hwmon: (max6621) Fix fall-through warnings for Clang 2021-05-17 19:50:37 -05:00
max6639.c hwmon: (max6639) Add regulator support 2022-02-27 17:03:17 -08:00
max6642.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
max6650.c
max6697.c
max16065.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
max31722.c spi: make remove callback a void function 2022-02-09 13:00:45 +00:00
max31730.c
max31790.c hwmon: (max31790) Detect and report zero fan speed 2021-06-17 04:21:46 -07:00
mc13783-adc.c
mcp3021.c hwmon: (mcp3021) improve driver support for newer hwmon interface 2022-07-15 10:55:57 -07:00
menf21bmc_hwmon.c
mlxreg-fan.c hwmon: (mlxreg-fan) Use pwm attribute for setting fan speed low limit 2022-02-27 17:03:17 -08:00
mr75203.c hwmon: (mr75203) Use HWMON_CHANNEL_INFO macro 2022-05-22 11:32:31 -07:00
nct6683.c hwmon: (nct6683) Add another customer ID for NCT6683D sensor chip on some ASRock boards 2021-10-12 07:22:39 -07:00
nct6775-core.c hwmon: (nct6775) Fix platform driver suspend regression 2022-08-10 06:37:01 -07:00
nct6775-i2c.c hwmon: (nct6775) Add i2c driver 2022-05-22 11:32:31 -07:00
nct6775-platform.c hwmon: (nct6775) Fix platform driver suspend regression 2022-08-10 06:37:01 -07:00
nct6775.h hwmon: (nct6775) Fix platform driver suspend regression 2022-08-10 06:37:01 -07:00
nct7802.c hwmon: (nct7802) Add of_node_put() before return 2021-10-28 21:27:38 -07:00
nct7904.c
npcm750-pwm-fan.c
nsa320-hwmon.c
ntc_thermistor.c hwmon: (ntc_thermistor) Underscore Samsung thermistor 2022-02-19 16:47:54 -08:00
nzxt-kraken2.c
nzxt-smart2.c hwmon: (nzxt-smart2) make array detect_fans_report static const 2022-01-09 17:10:58 -08:00
pc87360.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
pc87427.c
pcf8591.c
powr1220.c hwmon: (powr1220) Add support for Lattice's POWR1014 power manager IC 2022-02-27 17:03:17 -08:00
pwm-fan.c hwmon: (pwm-fan) Use HWMON_CHANNEL_INFO macro 2022-05-22 11:32:31 -07:00
raspberrypi-hwmon.c hwmon: (raspberrypi) Exit immediately in case of error in init 2021-12-26 15:02:06 -08:00
s3c-hwmon.c
sbrmi.c hwmon: Add support for SB-RMI power module 2021-08-17 14:54:25 -07:00
sbtsi_temp.c
sch56xx-common.c hwmon: (sch56xx-common) Add DMI override table 2022-07-13 08:38:19 -07:00
sch56xx-common.h hwmon: (sch56xx) Use devres functions for watchdog 2021-06-17 04:21:44 -07:00
sch5627.c hwmon: (sch5627) Add pwmX_auto_channels_temp support 2022-02-27 17:03:19 -08:00
sch5636.c hwmon: (sch56xx) Autoload modules on platform device creation 2022-02-27 17:03:17 -08:00
scmi-hwmon.c
scpi-hwmon.c hwmon: (scpi-hwmon): Use of_device_get_match_data() 2022-03-15 16:30:56 -07:00
sht3x.c
sht4x.c hwmon: (sht4x) Add device tree match table 2021-12-26 15:02:06 -08:00
sht15.c hwmon: (sht15) Fix wrong assumptions in device remove callback 2022-07-26 07:00:27 -07:00
sht21.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
shtc1.c
sis5595.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
sl28cpld-hwmon.c hwmon: (sl28cpld) Fix typo in comment 2022-05-22 11:32:32 -07:00
smm665.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
smsc47b397.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
smsc47m1.c
smsc47m192.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
sparx5-temp.c
stts751.c
sy7636a-hwmon.c hwmon: sy7636a: Add temperature driver for sy7636a 2022-02-08 09:27:33 +00:00
tc74.c
tc654.c hwmon: (tc654) Add thermal_cooling device support 2022-02-27 17:03:18 -08:00
thmc50.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
tmp102.c
tmp103.c hwmon: (tmp103) Convert tmp103 to use new hwmon registration API 2021-10-12 07:22:41 -07:00
tmp108.c
tmp401.c hwmon: (tmp401) Fix incorrect return value of tmp401_init_client 2022-05-20 10:57:05 -07:00
tmp421.c hwmon: (tmp421) Add of_node_put() before return 2021-10-18 07:23:21 -07:00
tmp464.c hwmon: Add driver for Texas Instruments TMP464 and TMP468 2022-03-03 07:40:42 -08:00
tmp513.c
tps23861.c hwmon: (tps23861) fix byte order in current and voltage registers 2022-07-21 07:18:39 -07:00
ultra45_env.c
vexpress-hwmon.c hwmon: (vexpress-hwmon) Use of_device_get_match_data() 2022-03-08 09:15:22 -08:00
via686a.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
via-cputemp.c
vt1211.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
vt8231.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
w83l785ts.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
w83l786ng.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
w83627ehf.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
w83627hf.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
w83773g.c
w83781d.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
w83791d.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
w83792d.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
w83793.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
w83795.c hwmon: cleanup non-bool "valid" data fields 2021-10-12 07:22:41 -07:00
wm831x-hwmon.c
wm8350-hwmon.c
xgene-hwmon.c hwmon: (xgene-hwmon) Add free before exiting xgene_hwmon_probe 2021-12-28 08:04:10 -08:00