forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f9004dbfff8a3fbbd7e2a88c8a4327c7f2f8e5b2
kernel/drivers/usb/renesas_usbhs/mod_gadget.c
....@@ -3,6 +3,7 @@
33 * Renesas USB driver
44 *
55 * Copyright (C) 2011 Renesas Solutions Corp.
6
+ * Copyright (C) 2019 Renesas Electronics Corporation
67 * Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
78 */
89 #include <linux/delay.h>
....@@ -264,7 +265,7 @@
264265 case USB_DEVICE_TEST_MODE:
265266 usbhsg_recip_handler_std_control_done(priv, uep, ctrl);
266267 udelay(100);
267
- usbhs_sys_set_test_mode(priv, le16_to_cpu(ctrl->wIndex >> 8));
268
+ usbhs_sys_set_test_mode(priv, le16_to_cpu(ctrl->wIndex) >> 8);
268269 break;
269270 default:
270271 usbhsg_recip_handler_std_control_done(priv, uep, ctrl);
....@@ -314,7 +315,7 @@
314315 struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(dcp);
315316 struct device *dev = usbhsg_gpriv_to_dev(gpriv);
316317 struct usb_request *req;
317
- unsigned short *buf;
318
+ __le16 *buf;
318319
319320 /* alloc new usb_request for recip */
320321 req = usb_ep_alloc_request(&dcp->ep, GFP_ATOMIC);
....@@ -508,7 +509,7 @@
508509 case READ_STATUS_STAGE:
509510 case WRITE_STATUS_STAGE:
510511 usbhs_dcp_control_transfer_done(pipe);
511
- /* fall through */
512
+ fallthrough;
512513 default:
513514 return ret;
514515 }
....@@ -932,8 +933,8 @@
932933 {
933934 struct usbhs_mod_info *info = &priv->mod_info;
934935
935
- info->irq_vbus = NULL;
936
- priv->pfunc.get_vbus = usbhsm_phy_get_vbus;
936
+ info->irq_vbus = NULL;
937
+ info->get_vbus = usbhsm_phy_get_vbus;
937938
938939 usbhs_irq_callback_update(priv, NULL);
939940 }
....@@ -1041,7 +1042,7 @@
10411042
10421043 gpriv->vbus_active = !!is_active;
10431044
1044
- renesas_usbhs_call_notify_hotplug(pdev);
1045
+ usbhsc_schedule_notify_hotplug(pdev);
10451046
10461047 return 0;
10471048 }