Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757000Ab3JNP0J (ORCPT ); Mon, 14 Oct 2013 11:26:09 -0400 Received: from ns.mm-sol.com ([212.124.72.66]:49745 "EHLO extserv.mm-sol.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756957Ab3JNP0D (ORCPT ); Mon, 14 Oct 2013 11:26:03 -0400 From: "Ivan T. Ivanov" To: balbi@ti.com Cc: rob.herring@calxeda.com, pawel.moll@arm.com, mark.rutland@arm.com, swarren@wwwdotorg.org, ijc+devicetree@hellion.org.uk, rob@landley.net, davidb@codeaurora.org, dwalker@fifo99.com, bryanh@codeaurora.org, linux@arm.linux.org.uk, gregkh@linuxfoundation.org, grant.likely@linaro.org, jackp@codeaurora.org, mgautam@codeaurora.org, dsegal@codeaurora.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, "Ivan T. Ivanov" Subject: [PATCH v3 04/13] usb: phy: msm: Remove unnecessarily check for valid regulators. Date: Mon, 14 Oct 2013 18:24:31 +0300 Message-Id: <1381764280-28420-5-git-send-email-iivanov@mm-sol.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1381764280-28420-1-git-send-email-iivanov@mm-sol.com> References: <1381764280-28420-1-git-send-email-iivanov@mm-sol.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1220 Lines: 40 From: "Ivan T. Ivanov" Whether regulators are available or not is checked at driver probe. If they are not available driver will refuse to load, so no need to check them again. Signed-off-by: Ivan T. Ivanov --- drivers/usb/phy/phy-msm-usb.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c index 136f063..b77441b 100644 --- a/drivers/usb/phy/phy-msm-usb.c +++ b/drivers/usb/phy/phy-msm-usb.c @@ -159,16 +159,6 @@ static int msm_hsusb_ldo_set_mode(struct msm_otg *motg, int on) { int ret = 0; - if (!motg->v1p8 || IS_ERR(motg->v1p8)) { - pr_err("%s: HSUSB_1p8 is not initialized\n", __func__); - return -ENODEV; - } - - if (!motg->v3p3 || IS_ERR(motg->v3p3)) { - pr_err("%s: HSUSB_3p3 is not initialized\n", __func__); - return -ENODEV; - } - if (on) { ret = regulator_set_optimum_mode(motg->v1p8, USB_PHY_1P8_HPM_LOAD); -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/