summaryrefslogtreecommitdiff
path: root/drivers/bus/mhi/core/pm.c
diff options
context:
space:
mode:
authorBhaumik Bhatt <bbhatt@codeaurora.org>2020-11-09 23:47:28 +0300
committerManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>2020-11-18 12:50:34 +0300
commit40c3127187cb38ed255ba4473e11cd70385c7431 (patch)
treefd8664dcd5d97fb256cccbfa56a97c86e49bd850 /drivers/bus/mhi/core/pm.c
parentdc53d862eab89000ebc87240274943793f0af682 (diff)
downloadlinux-40c3127187cb38ed255ba4473e11cd70385c7431.tar.xz
bus: mhi: core: Check for IRQ availability during registration
Current design allows a controller to register with MHI successfully without the need to have any IRQs available for use. If no IRQs are available, power up requests to MHI can fail after a successful registration with MHI. Improve the design by checking for the number of IRQs available sooner within the mhi_regsiter_controller() API as it is required to be specified by the controller. Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Diffstat (limited to 'drivers/bus/mhi/core/pm.c')
-rw-r--r--drivers/bus/mhi/core/pm.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/bus/mhi/core/pm.c b/drivers/bus/mhi/core/pm.c
index 06adea2580d2..1d04e401b67f 100644
--- a/drivers/bus/mhi/core/pm.c
+++ b/drivers/bus/mhi/core/pm.c
@@ -926,9 +926,6 @@ int mhi_async_power_up(struct mhi_controller *mhi_cntrl)
dev_info(dev, "Requested to power ON\n");
- if (mhi_cntrl->nr_irqs < 1)
- return -EINVAL;
-
/* Supply default wake routines if not provided by controller driver */
if (!mhi_cntrl->wake_get || !mhi_cntrl->wake_put ||
!mhi_cntrl->wake_toggle) {