34e788045d
[ Upstream commit e90c369cc2ffcf7145a46448de101f715a1f5584 ]
During the probe, driver enables clocks necessary to access registers
(in get_temp()) and then registers thermal zone with managed-resources
(devm) interface. Removal of device is not done in reversed order,
because:
1. Clock will be disabled in driver remove() callback - thermal zone is
still registered and accessible to users,
2. devm interface will unregister thermal zone.
This leaves short window between (1) and (2) for accessing the
get_temp() callback with disabled clock.
Fix this by enabling clock also via devm-interface, so entire cleanup
path will be in proper, reversed order.
Fixes:
|
||
---|---|---|
.. | ||
Kconfig | ||
Makefile | ||
bcm2711_thermal.c | ||
bcm2835_thermal.c | ||
brcmstb_thermal.c | ||
ns-thermal.c | ||
sr-thermal.c |