forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/usb/class/cdc-wdm.c
....@@ -755,6 +755,7 @@
755755 poison_urbs(desc);
756756 spin_lock_irq(&desc->iuspin);
757757 desc->resp_count = 0;
758
+ clear_bit(WDM_RESPONDING, &desc->flags);
758759 spin_unlock_irq(&desc->iuspin);
759760 desc->manage_power(desc->intf, 0);
760761 unpoison_urbs(desc);
....@@ -794,7 +795,7 @@
794795 .release = wdm_release,
795796 .poll = wdm_poll,
796797 .unlocked_ioctl = wdm_ioctl,
797
- .compat_ioctl = wdm_ioctl,
798
+ .compat_ioctl = compat_ptr_ioctl,
798799 .llseek = noop_llseek,
799800 };
800801
....@@ -1000,7 +1001,8 @@
10001001 * @intf: usb interface the subdriver will associate with
10011002 * @ep: interrupt endpoint to monitor for notifications
10021003 * @bufsize: maximum message size to support for read/write
1003
- *
1004
+ * @manage_power: call-back invoked during open and release to
1005
+ * manage the device's power
10041006 * Create WDM usb class character device and associate it with intf
10051007 * without binding, allowing another driver to manage the interface.
10061008 *
....@@ -1019,7 +1021,7 @@
10191021 int bufsize,
10201022 int (*manage_power)(struct usb_interface *, int))
10211023 {
1022
- int rv = -EINVAL;
1024
+ int rv;
10231025
10241026 rv = wdm_create(intf, ep, bufsize, manage_power);
10251027 if (rv < 0)