devm_clk_get_enabled() will call devm_clk_get() + clk_prepare_enable() and the clock will automatically be disabled, unprepared and freed when the device is unbound from the bus. So simplify .probe() and .remove() accordingly. version 1 changes The changes for davinci have been removed, as they have already been sent by Bartosz. Rong Qianfeng (2): gpio: stp-xway: Simplify using devm_clk_get_enabled() gpio: zynq: Simplify using devm_clk_get_enabled() drivers/gpio/gpio-stp-xway.c | 10 ++-------- drivers/gpio/gpio-zynq.c | 10 +--------- 2 files changed, 3 insertions(+), 17 deletions(-) -- 2.39.0