Skip to content

Commit 742d980

Browse files
committed
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>
2 parents 311ef88 + 2ea2113 commit 742d980

2 files changed

Lines changed: 6 additions & 10 deletions

File tree

drivers/bus/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ config HISILICON_LPC
8989

9090
config IMX_WEIM
9191
bool "Freescale EIM DRIVER"
92-
depends on ARCH_MXC
92+
depends on ARCH_MXC || COMPILE_TEST
9393
help
9494
Driver for i.MX WEIM controller.
9595
The WEIM(Wireless External Interface Module) works like a bus.

drivers/bus/imx-weim.c

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -282,22 +282,18 @@ static int weim_probe(struct platform_device *pdev)
282282
dev_set_drvdata(&pdev->dev, priv);
283283

284284
/* get the clock */
285-
clk = devm_clk_get(&pdev->dev, NULL);
285+
clk = devm_clk_get_enabled(&pdev->dev, NULL);
286286
if (IS_ERR(clk))
287287
return PTR_ERR(clk);
288288

289-
ret = clk_prepare_enable(clk);
290-
if (ret)
291-
return ret;
292-
293289
/* parse the device node */
294290
ret = weim_parse_dt(pdev);
295291
if (ret)
296-
clk_disable_unprepare(clk);
297-
else
298-
dev_info(&pdev->dev, "Driver registered.\n");
292+
return ret;
299293

300-
return ret;
294+
dev_info(&pdev->dev, "Driver registered.\n");
295+
296+
return 0;
301297
}
302298

303299
#if IS_ENABLED(CONFIG_OF_DYNAMIC)

0 commit comments

Comments
 (0)