summaryrefslogtreecommitdiff
path: root/drivers/bus
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2024-09-05 14:11:31 +0000
committerArnd Bergmann <arnd@arndb.de>2024-09-05 14:11:31 +0000
commit742d980809597f26ed356e751014a1bbbdb32165 (patch)
tree548a524d73a0bb1b3759ecc6edf1519750ff7c1d /drivers/bus
parent311ef8837ff2c99a1594fa979aa6bc6e0099d98c (diff)
parent2ea2113b3dacf9cf616488f875f32584dad53ff8 (diff)
downloadlwn-742d980809597f26ed356e751014a1bbbdb32165.tar.gz
lwn-742d980809597f26ed356e751014a1bbbdb32165.zip
Merge tag 'imx-drivers-6.12' of https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/drivers
i.MX drivers changes for 6.12: - A couple of imx-weim bus driver changes from Wu Bo to support compile test and use devm_clk_get_enabled() helper to clean up code a bit * tag 'imx-drivers-6.12' of https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: bus: imx-weim: change to use devm_clk_get_enabled() helper bus: imx-weim: support compile test Link: https://lore.kernel.org/r/20240904143439.211552-1-shawnguo2@yeah.net Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/bus')
-rw-r--r--drivers/bus/Kconfig2
-rw-r--r--drivers/bus/imx-weim.c14
2 files changed, 6 insertions, 10 deletions
diff --git a/drivers/bus/Kconfig b/drivers/bus/Kconfig
index 64cd2ee03aa3..ff669a8ccad9 100644
--- a/drivers/bus/Kconfig
+++ b/drivers/bus/Kconfig
@@ -89,7 +89,7 @@ config HISILICON_LPC
config IMX_WEIM
bool "Freescale EIM DRIVER"
- depends on ARCH_MXC
+ depends on ARCH_MXC || COMPILE_TEST
help
Driver for i.MX WEIM controller.
The WEIM(Wireless External Interface Module) works like a bus.
diff --git a/drivers/bus/imx-weim.c b/drivers/bus/imx-weim.c
index 837bf9d51c6e..83d623d97f5f 100644
--- a/drivers/bus/imx-weim.c
+++ b/drivers/bus/imx-weim.c
@@ -282,22 +282,18 @@ static int weim_probe(struct platform_device *pdev)
dev_set_drvdata(&pdev->dev, priv);
/* get the clock */
- clk = devm_clk_get(&pdev->dev, NULL);
+ clk = devm_clk_get_enabled(&pdev->dev, NULL);
if (IS_ERR(clk))
return PTR_ERR(clk);
- ret = clk_prepare_enable(clk);
- if (ret)
- return ret;
-
/* parse the device node */
ret = weim_parse_dt(pdev);
if (ret)
- clk_disable_unprepare(clk);
- else
- dev_info(&pdev->dev, "Driver registered.\n");
+ return ret;
- return ret;
+ dev_info(&pdev->dev, "Driver registered.\n");
+
+ return 0;
}
#if IS_ENABLED(CONFIG_OF_DYNAMIC)