Skip to content

Commit 992df3b

Browse files
committed
mtd: hyperbus: hbmc-am654: Drop pm_runtime* calls from probe
Recent genpd changes for K3 platform ensure device is ON before driver probe is called. Therefore, drop redundant pm_runtime_* calls from driver to simplify the code. Signed-off-by: Vignesh Raghavendra <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent aca31ce commit 992df3b

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

drivers/mtd/hyperbus/hbmc-am654.c

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#include <linux/of.h>
1414
#include <linux/of_address.h>
1515
#include <linux/platform_device.h>
16-
#include <linux/pm_runtime.h>
1716
#include <linux/types.h>
1817

1918
#define AM654_HBMC_CALIB_COUNT 25
@@ -89,13 +88,6 @@ static int am654_hbmc_probe(struct platform_device *pdev)
8988
priv->mux_ctrl = control;
9089
}
9190

92-
pm_runtime_enable(dev);
93-
ret = pm_runtime_get_sync(dev);
94-
if (ret < 0) {
95-
pm_runtime_put_noidle(dev);
96-
goto disable_pm;
97-
}
98-
9991
priv->hbdev.map.size = resource_size(&res);
10092
priv->hbdev.map.virt = devm_ioremap_resource(dev, &res);
10193
if (IS_ERR(priv->hbdev.map.virt))
@@ -107,13 +99,11 @@ static int am654_hbmc_probe(struct platform_device *pdev)
10799
ret = hyperbus_register_device(&priv->hbdev);
108100
if (ret) {
109101
dev_err(dev, "failed to register controller\n");
110-
pm_runtime_put_sync(&pdev->dev);
111-
goto disable_pm;
102+
goto disable_mux;
112103
}
113104

114105
return 0;
115-
disable_pm:
116-
pm_runtime_disable(dev);
106+
disable_mux:
117107
if (priv->mux_ctrl)
118108
mux_control_deselect(priv->mux_ctrl);
119109
return ret;
@@ -127,8 +117,6 @@ static int am654_hbmc_remove(struct platform_device *pdev)
127117
ret = hyperbus_unregister_device(&priv->hbdev);
128118
if (priv->mux_ctrl)
129119
mux_control_deselect(priv->mux_ctrl);
130-
pm_runtime_put_sync(&pdev->dev);
131-
pm_runtime_disable(&pdev->dev);
132120

133121
return ret;
134122
}

0 commit comments

Comments
 (0)