mbox series

[wireless-next,0/2] wifi: Convert using devm_clk_get_optional_enabled()

Message ID 20240903110205.4127706-1-lizetao1@huawei.com
Headers show
Series wifi: Convert using devm_clk_get_optional_enabled() | expand

Message

Li Zetao Sept. 3, 2024, 11:02 a.m. UTC
There are many examples[1][2] of clk resource leakage in LTS. The
reason is that developers need to maintain the allocation and release
of clk resources themselves, but this will increase the burden on
developers. Using the API related to devm_clk_get_*_enable ensures
that the life cycle of clk is consistent with that of the device,
reducing the risk of unreleased resources like clk.

[1]: https://lore.kernel.org/all/20240812160128.338041191@linuxfoundation.org/
[2]: https://lore.kernel.org/all/20240812160135.992451065@linuxfoundation.org/

Li Zetao (2):
  wifi: wilc1000: Convert using devm_clk_get_optional_enabled() in
    wilc_sdio_probe()
  wifi: wilc1000: Convert using devm_clk_get_optional_enabled() in
    wilc_bus_probe()

 drivers/net/wireless/microchip/wilc1000/sdio.c | 10 +++-------
 drivers/net/wireless/microchip/wilc1000/spi.c  |  5 +----
 2 files changed, 4 insertions(+), 11 deletions(-)