android_kernel_xiaomi_sm8350/drivers/macintosh
Nick Bowler b8f7d8f4d5 macintosh/therm_windtunnel: fix module unload.
[ Upstream commit fd748e177194ebcbbaf98df75152a30e08230cc6 ]

The of_device_unregister call in therm_windtunnel's module_exit procedure
does not fully reverse the effects of of_platform_device_create in the
module_init prodedure.  Once you unload this module, it is impossible
to load it ever again since only the first of_platform_device_create
call on the fan node succeeds.

This driver predates first git commit, and it turns out back then
of_platform_device_create worked differently than it does today.
So this is actually an old regression.

The appropriate function to undo of_platform_device_create now appears
to be of_platform_device_destroy, and switching to use this makes it
possible to unload and load the module as expected.

Signed-off-by: Nick Bowler <nbowler@draconx.ca>
Fixes: c6e126de43 ("of: Keep track of populated platform devices")
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20240711035428.16696-1-nbowler@draconx.ca
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-08-19 05:33:34 +02:00
..
ams
adb-iop.c macintosh/via-macii, macintosh/adb-iop: Clean up whitespace 2018-10-08 22:53:10 +11:00
adb.c
adbhid.c macintosh/adb: Rework printk output again 2018-10-08 22:53:10 +11:00
ans-lcd.c Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
ans-lcd.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
apm_emu.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 118 2019-05-24 17:39:02 +02:00
Kconfig macintosh: via-pmu-led: requires ATA to be set 2023-05-17 11:35:50 +02:00
mac_hid.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
macio_asic.c
macio_sysfs.c
macio-adb.c macintosh/macio-adb: check the return value of ioremap() 2023-01-18 11:41:29 +01:00
Makefile
mediabay.c Merge remote-tracking branch 'remotes/origin/tmp-f686d9f' into msm-lahaina 2019-07-01 17:41:24 -07:00
rack-meter.c
smu.c
therm_adt746x.c
therm_windtunnel.c macintosh/therm_windtunnel: fix module unload. 2024-08-19 05:33:34 +02:00
via-cuda.c macintosh/via-cuda: Don't rely on Cuda to end a transfer 2019-01-22 10:21:45 +01:00
via-macii.c macintosh/via-macii: Fix "BUG: sleeping function called from invalid context" 2024-06-16 13:28:35 +02:00
via-pmu-backlight.c
via-pmu-event.c
via-pmu-event.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
via-pmu-led.c
via-pmu.c macintosh/via-pmu: Fix build failure when CONFIG_INPUT is disabled 2022-06-14 18:11:31 +02:00
windfarm_ad7417_sensor.c macintosh: windfarm: fix MODINFO regression 2020-03-18 07:17:53 +01:00
windfarm_core.c
windfarm_cpufreq_clamp.c
windfarm_fcu_controls.c
windfarm_lm75_sensor.c macintosh: windfarm: Use unsigned type for 1-bit bitfields 2023-03-17 08:32:52 +01:00
windfarm_lm87_sensor.c
windfarm_max6690_sensor.c macintosh: windfarm: fix MODINFO regression 2020-03-18 07:17:53 +01:00
windfarm_mpu.h
windfarm_pid.c
windfarm_pid.h
windfarm_pm72.c
windfarm_pm81.c
windfarm_pm91.c Merge remote-tracking branch 'remotes/origin/tmp-f686d9f' into msm-lahaina 2019-07-01 17:41:24 -07:00
windfarm_pm112.c
windfarm_pm121.c
windfarm_rm31.c
windfarm_smu_controls.c
windfarm_smu_sat.c macintosh/windfarm_smu_sat: Add missing of_node_put() 2023-05-17 11:35:49 +02:00
windfarm_smu_sensors.c macintosh: windfarm: Use unsigned type for 1-bit bitfields 2023-03-17 08:32:52 +01:00
windfarm.h