]> git.baikalelectronics.ru Git - kernel.git/commit
clocksource/drivers/timer-probe: Avoid creating dead devices
authorSaravana Kannan <saravanak@google.com>
Sat, 11 Jan 2020 05:21:25 +0000 (21:21 -0800)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Tue, 17 Mar 2020 12:10:07 +0000 (13:10 +0100)
commitf7d2b06f8a13f72b227bdd52c4488676a8e6c9d7
tree54d144205cdb0caa693087e2170750a28bb0453f
parent749d7360062d2a92f9a81ab695e8893af5c75f35
clocksource/drivers/timer-probe: Avoid creating dead devices

Timer initialization is done during early boot way before the driver
core starts processing devices and drivers. Timers initialized during
this early boot period don't really need or use a struct device.

However, for timers represented as device tree nodes, the struct devices
are still created and sit around unused and wasting memory. This change
avoid this by marking the device tree nodes as "populated" if the
corresponding timer is successfully initialized.

Signed-off-by: Saravana Kannan <saravanak@google.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20200111052125.238212-1-saravanak@google.com
drivers/clocksource/timer-probe.c