linux/drivers/macintosh
Nick Bowler b8f7d8f4d5 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-19 05:33:34 +02:00
..
ams
adb-iop.c
adb.c macintosh/adb: fix oob read in do_adb_query() function 2022-08-11 12:57:53 +02:00
adbhid.c
ans-lcd.c
ans-lcd.h
apm_emu.c
Kconfig macintosh: via-pmu-led: requires ATA to be set 2023-05-17 11:35:50 +02:00
mac_hid.c
macio_asic.c macintosh: fix possible memory leak in macio_add_one_device() 2023-01-18 11:41:29 +01:00
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
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
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
via-pmu-led.c
via-pmu.c
windfarm_ad7417_sensor.c
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
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 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