From patchwork Fri Dec 30 04:08:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanwoo Choi X-Patchwork-Id: 9491723 X-Patchwork-Delegate: geert@linux-m68k.org 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 1441B60838 for ; Fri, 30 Dec 2016 04:09:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 03DA31FFD6 for ; Fri, 30 Dec 2016 04:09:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ECBC825250; Fri, 30 Dec 2016 04:09:29 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9A5AF1FFD6 for ; Fri, 30 Dec 2016 04:09:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753282AbcL3EI4 (ORCPT ); Thu, 29 Dec 2016 23:08:56 -0500 Received: from mailout2.samsung.com ([203.254.224.25]:56998 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753471AbcL3EIY (ORCPT ); Thu, 29 Dec 2016 23:08:24 -0500 Received: from epcas1p4.samsung.com (unknown [182.195.41.48]) by mailout2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OIZ02DYQCTTOZC0@mailout2.samsung.com>; Fri, 30 Dec 2016 13:08:17 +0900 (KST) Received: from epsmges5p5.samsung.com (unknown [182.195.40.69]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20161230040817epcas1p2bd777009da846b1a4d1d6ef50a7afcba~U7R_h3yYY2735527355epcas1p2l; Fri, 30 Dec 2016 04:08:17 +0000 (GMT) Received: from epcas5p2.samsung.com ( [182.195.41.40]) by epsmges5p5.samsung.com (EPCPMTA) with SMTP id 3A.9F.12277.1BDD5685; Fri, 30 Dec 2016 13:08:17 +0900 (KST) Received: from epcpsbgm2new.samsung.com (u27.gpu120.samsung.co.kr [203.254.230.27]) by epcas5p4.samsung.com (KnoxPortal) with ESMTP id 20161230040817epcas5p430bfef6b76d46ab5e69d5f45816b1af4~U7R_NDNJA0078200782epcas5p4O; Fri, 30 Dec 2016 04:08:17 +0000 (GMT) X-AuditID: b6c32a59-f79486d000002ff5-fe-5865ddb1861a Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2new.samsung.com (EPCPMTA) with SMTP id 08.A1.28332.0BDD5685; Fri, 30 Dec 2016 13:08:17 +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 <0OIZ0030ECTSVT80@mmp2.samsung.com>; Fri, 30 Dec 2016 13:08:16 +0900 (KST) From: Chanwoo Choi To: balbi@kernel.org, gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, linux-omap@vger.kernel.org, linux-renesas-soc@vger.kernel.org, chanwoo@kernel.org, Chanwoo Choi Subject: [PATCH v2 4/6] usb: phy: qcom-8x16-usb: Replace the extcon API Date: Fri, 30 Dec 2016 13:08:13 +0900 Message-id: <1483070895-8213-5-git-send-email-cw00.choi@samsung.com> X-Mailer: git-send-email 1.8.0 In-reply-to: <1483070895-8213-1-git-send-email-cw00.choi@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrDKsWRmVeSWpSXmKPExsWy7bCmhu7Gu6kRBjvOi1sca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Fte/PGe1aF68ns3i8q45bBazl/SzWGx9+Y7JYtGyVmYHDo9NqzrZPPbPXcPu0bdlFaPH501y ASxRbjYZqYkpqUUKqXnJ+SmZeem2SqEhbroWSgp5ibmptkoRur4hQUoKZYk5pUCekQEacHAO cA9W0rdLcMv4evEOW8EHgYo5TyexNTAu5uti5OCQEDCRWD9RtYuRE8gUk7hwbz1bFyMXh5DA LEaJjmfHGSGcH4wS3be+sIFUsQloSex/cYMNpFlEwECi7YYYSA2zwA5GiXlLT4PFhQXcJdac dgUxWQRUJU7stgbp5BVwkdh7fhkLxC45iQ97HrGD2JwCrhLvtp1jBbGFgGqWnznDPoGRdwEj wypGidSC5ILipPRco7zUcr3ixNzi0rx0veT83E2M4HB+Jr2D8fAu90OMAhyMSjy8P8pSI4RY E8uKK3MPMUpwMCuJ8BbeBgrxpiRWVqUW5ccXleakFh9iNAW6ayKzlGhyPjDW8kriDU3MTcyN DSzMLS1NjJTEeRtnPwsXEkhPLEnNTk0tSC2C6WPi4JRqYJz/aPnlbr8DN/cHJFroWamonVoW 2LVFs6k1Uak4+XHqfrvudt4X2+eU/WbLudDBldIp9alVxmCt8vp57+0NFJiLxMLbj8tufn3L THyHwkuTO8IbNA/9VWTjvsB0Yjf3+aURWgd+XTwf+f6Rj5l0iMUR3pMieRdnXj52t7Wj7vHy Ncnh13fMmqDEUpyRaKjFXFScCAAgZPLQfQIAAA== X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20161230040817epcas5p430bfef6b76d46ab5e69d5f45816b1af4 X-Msg-Generator: CA X-Sender-IP: 203.254.230.27 X-Local-Sender: =?UTF-8?B?7LWc7LCs7JqwG1RpemVuIFBsYXRmb3JtIExhYihTL1fshLw=?= =?UTF-8?B?7YSwKRvsgrzshLHsoITsnpAbUzUo7LGF7J6EKS9DaGFuZ2UgQWdlbnQ=?= X-Global-Sender: =?UTF-8?B?Q2hhbndvbyBDaG9pG1RpemVuIFBsYXRmb3JtIExhYi4bU2Ft?= =?UTF-8?B?c3VuZyBFbGVjdHJvbmljcxtTNS9TZW5pb3IgRW5naW5lZXI=?= X-Sender-Code: =?UTF-8?B?QzEwG1NUQUYbQzEwVjgxMTE=?= CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-HopCount: 7 X-CMS-RootMailID: 20161230040817epcas5p430bfef6b76d46ab5e69d5f45816b1af4 X-RootMTR: 20161230040817epcas5p430bfef6b76d46ab5e69d5f45816b1af4 References: <1483070895-8213-1-git-send-email-cw00.choi@samsung.com> Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.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: - extcon_get_cable_state_() -> extcon_get_state() Signed-off-by: Chanwoo Choi Acked-by: Felipe Balbi --- drivers/usb/phy/phy-qcom-8x16-usb.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/usb/phy/phy-qcom-8x16-usb.c b/drivers/usb/phy/phy-qcom-8x16-usb.c index d8593adb3621..fdf686398772 100644 --- a/drivers/usb/phy/phy-qcom-8x16-usb.c +++ b/drivers/usb/phy/phy-qcom-8x16-usb.c @@ -187,7 +187,7 @@ static int phy_8x16_init(struct usb_phy *phy) val = ULPI_PWR_OTG_COMP_DISABLE; usb_phy_io_write(phy, val, ULPI_SET(ULPI_PWR_CLK_MNG_REG)); - state = extcon_get_cable_state_(qphy->vbus_edev, EXTCON_USB); + state = extcon_get_state(qphy->vbus_edev, EXTCON_USB); if (state) phy_8x16_vbus_on(qphy); else @@ -316,23 +316,20 @@ static int phy_8x16_probe(struct platform_device *pdev) goto off_clks; qphy->vbus_notify.notifier_call = phy_8x16_vbus_notify; - ret = extcon_register_notifier(qphy->vbus_edev, EXTCON_USB, - &qphy->vbus_notify); + ret = devm_extcon_register_notifier(&pdev->dev, qphy->vbus_edev, + EXTCON_USB, &qphy->vbus_notify); if (ret < 0) goto off_power; ret = usb_add_phy_dev(&qphy->phy); if (ret) - goto off_extcon; + goto off_power; qphy->reboot_notify.notifier_call = phy_8x16_reboot_notify; register_reboot_notifier(&qphy->reboot_notify); return 0; -off_extcon: - extcon_unregister_notifier(qphy->vbus_edev, EXTCON_USB, - &qphy->vbus_notify); off_power: regulator_bulk_disable(ARRAY_SIZE(qphy->regulator), qphy->regulator); off_clks: @@ -347,8 +344,6 @@ static int phy_8x16_remove(struct platform_device *pdev) struct phy_8x16 *qphy = platform_get_drvdata(pdev); unregister_reboot_notifier(&qphy->reboot_notify); - extcon_unregister_notifier(qphy->vbus_edev, EXTCON_USB, - &qphy->vbus_notify); /* * Ensure that D+/D- lines are routed to uB connector, so