From patchwork Tue Mar 28 04:38:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanwoo Choi X-Patchwork-Id: 9648065 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4E1B0602C8 for ; Tue, 28 Mar 2017 04:39:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 45F9625F31 for ; Tue, 28 Mar 2017 04:39:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3ABE028338; Tue, 28 Mar 2017 04:39:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E714525F31 for ; Tue, 28 Mar 2017 04:39:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: Message-id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:List-Owner; bh=VmR/6A+YADeCHk/uTO7HDOK7s//SADffdKVxnTtDQbc=; b=C2 DOJduaroJ+vPQwzttm5vefLnSitSobUruSZc8WjPb00/1cahiNeY/Jnb27vxPGLCPJRHfyjuhuPii fWuCZ5i5fGSTs24jEXkRc2kgJ+qsP3eqMdGEr+OMvKznOCH3qavK68efpK5XMb+HzJ6VjcDO7hy6n kw9J40Vnetmd+fMnzIEfp7R72NTup+RQe+mytIP84T1OuqS++eI2OKfe325Zm9KZk/6k5ia6tJbRu c60GPGmwTx/2wYOZ6luo3xVxLaItBNWL9a3ZIs+LvWhrlFYXY+POvtyqagKkzxNkHwt0wAxulsQK0 G7KjSg1y6K6NjPtZ/l+ApfTxMJ1rrbWQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1csiup-0004gG-9l; Tue, 28 Mar 2017 04:39:31 +0000 Received: from mailout2.samsung.com ([203.254.224.25] helo=epoutp02.samsung.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1csiuH-0004PG-Ij for linux-arm-kernel@lists.infradead.org; Tue, 28 Mar 2017 04:38:59 +0000 Received: from epcas1p2.samsung.com (unknown [182.195.41.46]) by epoutp02.samsung.com (KnoxPortal) with ESMTP id 20170328043838epoutp02fcb60949b287dd51a6c21dfa04b26362~v8dmYGrRF0276602766epoutp02I; Tue, 28 Mar 2017 04:38:38 +0000 (GMT) Received: from epsmges1p4.samsung.com (unknown [182.195.40.67]) by epcas1p3.samsung.com (KnoxPortal) with ESMTP id 20170328043838epcas1p3bcdd72720c8911f19967a37d1ceb5206~v8dmH3foe0500605006epcas1p3m; Tue, 28 Mar 2017 04:38:38 +0000 (GMT) Received: from epcas1p2.samsung.com ( [182.195.41.46]) by epsmges1p4.samsung.com (Symantec Messaging Gateway) with SMTP id 67.DF.12779.6C8E9D85; Tue, 28 Mar 2017 13:38:30 +0900 (KST) Received: from epcpsbgm1new.samsung.com (u26.gpu120.samsung.co.kr [203.254.230.26]) by epcas1p4.samsung.com (KnoxPortal) with ESMTP id 20170328043830epcas1p4069bda461ad648cfd6598905b7167e9f~v8dfIWEO31691916919epcas1p4w; Tue, 28 Mar 2017 04:38:30 +0000 (GMT) X-AuditID: b6c32a38-f791a6d0000031eb-48-58d9e8c6a9d9 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1new.samsung.com (EPCPMTA) with SMTP id 63.95.05715.6C8E9D85; Tue, 28 Mar 2017 13:38:30 +0900 (KST) Received: from localhost.localdomain ([10.113.62.212]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0ONI007OGCW6U4A0@mmp2.samsung.com>; Tue, 28 Mar 2017 13:38:30 +0900 (KST) From: Chanwoo Choi To: kishon@ti.com Subject: [PATCH 1/2] phy: qcom-usb-hs: Replace the extcon API Date: Tue, 28 Mar 2017 13:38:28 +0900 Message-id: <1490675909-2533-1-git-send-email-cw00.choi@samsung.com> X-Mailer: git-send-email 1.8.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrGKsWRmVeSWpSXmKPExsWy7bCmnu6xFzcjDI7NtraYeOMKi8X1L89Z LS487WGz2PT4GqvF5V1z2BxYPTat6mTz2Lyk3qNvyypGj+M3tjN5fN4kF8AalWqTkZqYklqk kJqXnJ+SmZduq+QdHO8cb2pmYKhraGlhrqSQl5ibaqvk4hOg65aZA7RbSaEsMacUKBSQWFys pG9nU5RfWpKqkJFfXGKrFG1oaKRnaGCuZ2RkpGdiHGtlZApUkpCacWwla8E03orLjx+wNTA2 cncxcnJICJhIdL/tZISwxSQu3FvP1sXIxSEksINRou/HZHaQhJBAO5PEl7U1MA1/z6yBKprD KLH23FQWCOcHo8S3JZtYQKrYBLQk9r+4AVTFwSEiICjx6RMjSA2zQBOjxL/W1SwgcWEBW4lt m91ATBYBVYnvz8RAOnkFXCSWtp1ngtglJ/FhzyN2kFYJgSNsEr2L9jOD1EsIyEpsOsAMUeMi sfrschYIW1ji1fEt7BC2tMSqf7eYIHrbGSU2z7nHAuF0MErcX9nIClFlLHH/wT2wScwCfBLv vvawQizglehoE4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kdlvi9I+CGnoGF55Ub Eoz79A02Bq/y0Z/sxBjpdr5s7lmva7vu7LboybPmWTdL6ctM/YsL36x6smhC6YotnNtEDe5L XewJPGJ04G/n3ondk3KMjTODxJaph0vcDNjNrsRSnJFoqMVcVJwIAFX9SdJZAgAA X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170328043830epcas1p4069bda461ad648cfd6598905b7167e9f X-Msg-Generator: CA X-Sender-IP: 203.254.230.26 X-Local-Sender: =?UTF-8?B?7LWc7LCs7JqwG1RpemVuIFBsYXRmb3JtIExhYihTL1fshLw=?= =?UTF-8?B?7YSwKRvsgrzshLHsoITsnpAbU2VuaW9yIEVuZ2luZWVy?= X-Global-Sender: =?UTF-8?B?Q2hhbndvbyBDaG9pG1RpemVuIFBsYXRmb3JtIExhYi4bU2Ft?= =?UTF-8?B?c3VuZyBFbGVjdHJvbmljcxtTZW5pb3IgRW5naW5lZXI=?= X-Sender-Code: =?UTF-8?B?QzEwG1NUQUYbQzEwVjgxMTE=?= CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20170328043830epcas1p4069bda461ad648cfd6598905b7167e9f X-RootMTR: 20170328043830epcas1p4069bda461ad648cfd6598905b7167e9f References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170327_213857_765485_7B5C159B X-CRM114-Status: GOOD ( 11.67 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chanwoo Choi , chanwoo@kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This patch uses the resource-managed extcon API for extcon_register_notifier() and replaces the deprecated extcon API as following: - (deprecated) extcon_get_cable_state_() -> extcon_get_state() Cc: Kishon Vijay Abraham I Signed-off-by: Chanwoo Choi Acked-by: Kishon Vijay Abraham I --- drivers/phy/phy-qcom-usb-hs.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/phy/phy-qcom-usb-hs.c b/drivers/phy/phy-qcom-usb-hs.c index 94dfbfd739c3..f630fa553b7d 100644 --- a/drivers/phy/phy-qcom-usb-hs.c +++ b/drivers/phy/phy-qcom-usb-hs.c @@ -156,12 +156,12 @@ static int qcom_usb_hs_phy_power_on(struct phy *phy) } if (uphy->vbus_edev) { - state = extcon_get_cable_state_(uphy->vbus_edev, EXTCON_USB); + state = extcon_get_state(uphy->vbus_edev, EXTCON_USB); /* setup initial state */ qcom_usb_hs_phy_vbus_notifier(&uphy->vbus_notify, state, uphy->vbus_edev); - ret = extcon_register_notifier(uphy->vbus_edev, EXTCON_USB, - &uphy->vbus_notify); + ret = devm_extcon_register_notifier(&ulpi->dev, uphy->vbus_edev, + EXTCON_USB, &uphy->vbus_notify); if (ret) goto err_ulpi; } @@ -180,16 +180,8 @@ static int qcom_usb_hs_phy_power_on(struct phy *phy) static int qcom_usb_hs_phy_power_off(struct phy *phy) { - int ret; struct qcom_usb_hs_phy *uphy = phy_get_drvdata(phy); - if (uphy->vbus_edev) { - ret = extcon_unregister_notifier(uphy->vbus_edev, EXTCON_USB, - &uphy->vbus_notify); - if (ret) - return ret; - } - regulator_disable(uphy->v3p3); regulator_disable(uphy->v1p8); clk_disable_unprepare(uphy->sleep_clk);