Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <vigneshr@ti.com>
Link: https://lore.kernel.org/r/20200924081214.16934-4-vigneshr@ti.com

+2 -14
+2 -14
drivers/mtd/hyperbus/hbmc-am654.c
··· 13 13 #include <linux/of.h> 14 14 #include <linux/of_address.h> 15 15 #include <linux/platform_device.h> 16 - #include <linux/pm_runtime.h> 17 16 #include <linux/types.h> 18 17 19 18 #define AM654_HBMC_CALIB_COUNT 25 ··· 88 89 priv->mux_ctrl = control; 89 90 } 90 91 91 - pm_runtime_enable(dev); 92 - ret = pm_runtime_get_sync(dev); 93 - if (ret < 0) { 94 - pm_runtime_put_noidle(dev); 95 - goto disable_pm; 96 - } 97 - 98 92 priv->hbdev.map.size = resource_size(&res); 99 93 priv->hbdev.map.virt = devm_ioremap_resource(dev, &res); 100 94 if (IS_ERR(priv->hbdev.map.virt)) ··· 99 107 ret = hyperbus_register_device(&priv->hbdev); 100 108 if (ret) { 101 109 dev_err(dev, "failed to register controller\n"); 102 - pm_runtime_put_sync(&pdev->dev); 103 - goto disable_pm; 110 + goto disable_mux; 104 111 } 105 112 106 113 return 0; 107 - disable_pm: 108 - pm_runtime_disable(dev); 114 + disable_mux: 109 115 if (priv->mux_ctrl) 110 116 mux_control_deselect(priv->mux_ctrl); 111 117 return ret; ··· 117 127 ret = hyperbus_unregister_device(&priv->hbdev); 118 128 if (priv->mux_ctrl) 119 129 mux_control_deselect(priv->mux_ctrl); 120 - pm_runtime_put_sync(&pdev->dev); 121 - pm_runtime_disable(&pdev->dev); 122 130 123 131 return ret; 124 132 }