linux-stable/drivers/macintosh
Nick Bowler a60111f96e macintosh/therm_windtunnel: fix module unload.
[ Upstream commit fd748e1771 ]

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-03 08:54:02 +02:00
..
ams powerpc updates for 6.6 2023-08-31 12:43:10 -07:00
adb-iop.c
adb.c
adbhid.c
ans-lcd.c
ans-lcd.h
apm_emu.c
Kconfig
mac_hid.c
macio-adb.c
macio_asic.c macintosh: Explicitly include correct DT includes 2023-08-28 13:36:24 -05:00
macio_sysfs.c
Makefile
mediabay.c
rack-meter.c
smu.c macintosh: Explicitly include correct DT includes 2023-08-28 13:36:24 -05:00
therm_adt746x.c macintosh: Explicitly include correct DT includes 2023-08-28 13:36:24 -05:00
therm_windtunnel.c macintosh/therm_windtunnel: fix module unload. 2024-08-03 08:54:02 +02:00
via-cuda.c macintosh: Use of_address_to_resource() 2023-06-21 14:08:54 +10:00
via-macii.c macintosh/via-macii: Fix "BUG: sleeping function called from invalid context" 2024-06-12 11:11:47 +02:00
via-pmu-backlight.c
via-pmu-event.c
via-pmu-event.h
via-pmu-led.c
via-pmu.c macintosh: Use of_address_to_resource() 2023-06-21 14:08:54 +10:00
windfarm.h
windfarm_ad7417_sensor.c
windfarm_core.c
windfarm_cpufreq_clamp.c
windfarm_fcu_controls.c
windfarm_lm75_sensor.c macintosh: Explicitly include correct DT includes 2023-08-28 13:36:24 -05:00
windfarm_lm87_sensor.c
windfarm_max6690_sensor.c
windfarm_mpu.h
windfarm_pid.c
windfarm_pid.h
windfarm_pm72.c
windfarm_pm81.c
windfarm_pm91.c
windfarm_pm112.c
windfarm_pm121.c
windfarm_rm31.c
windfarm_smu_controls.c
windfarm_smu_sat.c
windfarm_smu_sensors.c