[ 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>
|
||
|---|---|---|
| .. | ||
| ams | ||
| adb-iop.c | ||
| adb.c | ||
| adbhid.c | ||
| ans-lcd.c | ||
| ans-lcd.h | ||
| apm_emu.c | ||
| Kconfig | ||
| mac_hid.c | ||
| macio_asic.c | ||
| macio_sysfs.c | ||
| macio-adb.c | ||
| Makefile | ||
| mediabay.c | ||
| rack-meter.c | ||
| smu.c | ||
| therm_adt746x.c | ||
| therm_windtunnel.c | ||
| via-cuda.c | ||
| via-macii.c | ||
| 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 | ||
| 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 | ||
| windfarm.h | ||