From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753767AbbIGH4r (ORCPT ); Mon, 7 Sep 2015 03:56:47 -0400 Received: from mail-wi0-f182.google.com ([209.85.212.182]:34785 "EHLO mail-wi0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752029AbbIGH4o (ORCPT ); Mon, 7 Sep 2015 03:56:44 -0400 Message-ID: <1441612601.2626.0.camel@linaro.org> Subject: Re: [PATCH] usb: phy: msm: Unregister driver interest for VBUS and ID events From: "Ivan T. Ivanov" To: Tim Bird Cc: Felipe Balbi , Greg Kroah-Hartman , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" , linux-arm-msm Date: Mon, 07 Sep 2015 10:56:41 +0300 In-Reply-To: <55DB5040.2060002@sonymobile.com> References: <1439884576-28467-1-git-send-email-ivan.ivanov@linaro.org> <55DB5040.2060002@sonymobile.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.13.7-fta1.2~trusty Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2015-08-24 at 10:11 -0700, Tim Bird wrote: > On 08/18/2015 12:56 AM, Ivan T. Ivanov wrote: > > Right now even if driver failed to probe extcon framework will > > still deliver its VBUS and ID events, which will lead to random > > exception codes. > > > > Fix this by removing driver interest for VBUS and ID events when > > probe fail. > > > > Fixes: 591fc116f330 ("usb: phy: msm: Use extcon framework for VBUS and ID detection") > > > > Reported-by: Tim Bird bird@sonymobile.com> > > Signed-off-by: Ivan T. Ivanov ivanov@linaro.org> > > --- > > drivers/usb/phy/phy-msm-usb.c | 26 +++++++++++++++++--------- > > 1 file changed, 17 insertions(+), 9 deletions(-) > > > > diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c > > index 00c49bb1bd29..a9082567f114 100644 > > --- a/drivers/usb/phy/phy-msm-usb.c > > +++ b/drivers/usb/phy/phy-msm-usb.c > > @@ -1581,6 +1581,8 @@ static int msm_otg_read_dt(struct platform_device *pdev, struct msm_otg *motg) > > ret = extcon_register_interest(&motg->id.conn, ext_id->name, > > "USB-HOST", &motg->id.nb); > > if (ret < 0) { > > + if (!IS_ERR(ext_vbus)) > > + extcon_unregister_interest(&motg->vbus.conn); > > dev_err(&pdev->dev, "register ID notifier failed\n"); > > return ret; > > } > ... > > This patch is obsoleted by commit 83b7b67c7, which changes the extcon API > a bit (from register_interest to register_notifier, among other things). Ah, sorry, missed this. New version is coming. Regards, Ivan