kernel_samsung_a53x/drivers/macintosh
Nick Bowler f19e11de51 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: c6e126de43e7 ("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-11-23 23:20:11 +01:00
..
ams Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
adb-iop.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
adb.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
adbhid.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ans-lcd.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ans-lcd.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
apm_emu.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mac_hid.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
macio-adb.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
macio_asic.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
macio_sysfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mediabay.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rack-meter.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
smu.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
therm_adt746x.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
therm_windtunnel.c macintosh/therm_windtunnel: fix module unload. 2024-11-23 23:20:11 +01:00
via-cuda.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
via-macii.c macintosh/via-macii: Fix "BUG: sleeping function called from invalid context" 2024-11-19 12:26:55 +01:00
via-pmu-backlight.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
via-pmu-event.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
via-pmu-event.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
via-pmu-led.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
via-pmu.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
windfarm.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
windfarm_ad7417_sensor.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
windfarm_core.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
windfarm_cpufreq_clamp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
windfarm_fcu_controls.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
windfarm_lm75_sensor.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
windfarm_lm87_sensor.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
windfarm_max6690_sensor.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
windfarm_mpu.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
windfarm_pid.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
windfarm_pid.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
windfarm_pm72.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
windfarm_pm81.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
windfarm_pm91.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
windfarm_pm112.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
windfarm_pm121.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
windfarm_rm31.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
windfarm_smu_controls.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
windfarm_smu_sat.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
windfarm_smu_sensors.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00