Commit ee613711 authored by Chanwoo Choi's avatar Chanwoo Choi

usb: gadget: udc: Replace the deprecated extcon API

This patch replaces the deprecated extcon API as following:
- extcon_get_cable_state_() -> extcon_get_state()
Acked-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
parent 02026de8
...@@ -184,7 +184,7 @@ static int udc_plat_probe(struct platform_device *pdev) ...@@ -184,7 +184,7 @@ static int udc_plat_probe(struct platform_device *pdev)
goto exit_phy; goto exit_phy;
} }
ret = extcon_get_cable_state_(udc->edev, EXTCON_USB); ret = extcon_get_state(udc->edev, EXTCON_USB);
if (ret < 0) { if (ret < 0) {
dev_err(dev, "Can't get cable state\n"); dev_err(dev, "Can't get cable state\n");
goto exit_extcon; goto exit_extcon;
...@@ -273,7 +273,7 @@ static int udc_plat_suspend(struct device *dev) ...@@ -273,7 +273,7 @@ static int udc_plat_suspend(struct device *dev)
udc = dev_get_drvdata(dev); udc = dev_get_drvdata(dev);
stop_udc(udc); stop_udc(udc);
if (extcon_get_cable_state_(udc->edev, EXTCON_USB) > 0) { if (extcon_get_state(udc->edev, EXTCON_USB) > 0) {
dev_dbg(udc->dev, "device -> idle\n"); dev_dbg(udc->dev, "device -> idle\n");
stop_udc(udc); stop_udc(udc);
} }
...@@ -303,7 +303,7 @@ static int udc_plat_resume(struct device *dev) ...@@ -303,7 +303,7 @@ static int udc_plat_resume(struct device *dev)
return ret; return ret;
} }
if (extcon_get_cable_state_(udc->edev, EXTCON_USB) > 0) { if (extcon_get_state(udc->edev, EXTCON_USB) > 0) {
dev_dbg(udc->dev, "idle -> device\n"); dev_dbg(udc->dev, "idle -> device\n");
start_udc(udc); start_udc(udc);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment