Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1688583
| From | Chanwoo Choi <cw00.choi@samsung.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3/5] phy: phy-bcm-ns2-usbdrd: Replace the deprecated extcon API |
| Date | 2017-07-17 03:30 +0200 |
| Message-ID | <u431h-6LV-31@gated-at.bofh.it> (permalink) |
| References | <u431g-6LV-3@gated-at.bofh.it> <u431h-6LV-33@gated-at.bofh.it> <u431g-6LV-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
This patch replaces the deprecated extcon API as following:
- extcon_set_cable_state_() -> extcon_get_state()
Cc: Kishon Vijay Abraham I <kishon@ti.com>
Cc: Raviteja Garimella <raviteja.garimella@broadcom.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
---
drivers/phy/broadcom/phy-bcm-ns2-usbdrd.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/phy/broadcom/phy-bcm-ns2-usbdrd.c b/drivers/phy/broadcom/phy-bcm-ns2-usbdrd.c
index 9ae59e223131..d099a0c8cee5 100644
--- a/drivers/phy/broadcom/phy-bcm-ns2-usbdrd.c
+++ b/drivers/phy/broadcom/phy-bcm-ns2-usbdrd.c
@@ -253,16 +253,16 @@ static void extcon_work(struct work_struct *work)
vbus = gpiod_get_value_cansleep(driver->vbus_gpiod);
if (!id && vbus) { /* Host connected */
- extcon_set_cable_state_(driver->edev, EXTCON_USB_HOST, true);
+ extcon_set_state_sync(driver->edev, EXTCON_USB_HOST, true);
pr_debug("Host cable connected\n");
driver->data->new_state = EVT_HOST;
connect_change(driver);
} else if (id && !vbus) { /* Disconnected */
- extcon_set_cable_state_(driver->edev, EXTCON_USB_HOST, false);
- extcon_set_cable_state_(driver->edev, EXTCON_USB, false);
+ extcon_set_state_sync(driver->edev, EXTCON_USB_HOST, false);
+ extcon_set_state_sync(driver->edev, EXTCON_USB, false);
pr_debug("Cable disconnected\n");
} else if (id && vbus) { /* Device connected */
- extcon_set_cable_state_(driver->edev, EXTCON_USB, true);
+ extcon_set_state_sync(driver->edev, EXTCON_USB, true);
pr_debug("Device cable connected\n");
driver->data->new_state = EVT_DEVICE;
connect_change(driver);
--
1.9.1
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/5] phy: Replace the deprecated extcon API Chanwoo Choi <cw00.choi@samsung.com> - 2017-07-17 03:30 +0200 [PATCH 4/5] usb: gadget: udc: Replace the deprecated extcon API Chanwoo Choi <cw00.choi@samsung.com> - 2017-07-17 03:30 +0200 [PATCH 2/5] phy: rockchip-inno-usb2: Replace the extcon API Chanwoo Choi <cw00.choi@samsung.com> - 2017-07-17 03:30 +0200 [PATCH 3/5] phy: phy-bcm-ns2-usbdrd: Replace the deprecated extcon API Chanwoo Choi <cw00.choi@samsung.com> - 2017-07-17 03:30 +0200 [PATCH 1/5] phy: qcom-usb-hs: Replace the extcon API Chanwoo Choi <cw00.choi@samsung.com> - 2017-07-17 03:30 +0200
csiph-web