Message ID | 22a9ca0e58ba2c3997b0b630890d7f0d45ffd33b.1562323443.git.msuchanek@suse.de |
---|---|
State | Superseded |
Delegated to: | Marek Vasut |
Headers | show |
Series | [U-Boot,v3,1/7] usb_kdb: only process events succesfully received | expand |
On Fri, Jul 5, 2019 at 6:44 PM Michal Suchanek <msuchanek@suse.de> wrote: > > This aligns naming with usb_bulk_msg and usb_control_msg. > > Signed-off-by: Michal Suchanek <msuchanek@suse.de> > --- > v2: new patch > --- > common/usb.c | 2 +- > common/usb_kbd.c | 6 +++--- > include/usb.h | 2 +- > 3 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/common/usb.c b/common/usb.c > index b70f614d244f..704937dec8a8 100644 > --- a/common/usb.c > +++ b/common/usb.c > @@ -194,7 +194,7 @@ int usb_disable_asynch(int disable) > /* > * submits an Interrupt Message > */ > -int usb_submit_int_msg(struct usb_device *dev, unsigned long pipe, > +int usb_int_msg(struct usb_device *dev, unsigned long pipe, > void *buffer, int transfer_len, int interval) nits: indentation > { > return submit_int_msg(dev, pipe, buffer, transfer_len, interval); > diff --git a/common/usb_kbd.c b/common/usb_kbd.c > index fc9419e0238a..4c23023d4e59 100644 > --- a/common/usb_kbd.c > +++ b/common/usb_kbd.c > @@ -339,7 +339,7 @@ static inline void usb_kbd_poll_for_event(struct usb_device *dev) > struct usb_kbd_pdata *data = dev->privptr; > > /* Submit a interrupt transfer request */ > - if (!usb_submit_int_msg(dev, data->intpipe, &data->new[0], > + if (!usb_int_msg(dev, data->intpipe, &data->new[0], > data->intpktsize, data->intinterval)) ditto > usb_kbd_irq_worker(dev); > #elif defined(CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP) || \ > @@ -503,8 +503,8 @@ static int usb_kbd_probe_dev(struct usb_device *dev, unsigned int ifnum) > if (usb_get_report(dev, iface->desc.bInterfaceNumber, > 1, 0, data->new, USB_KBD_BOOT_REPORT_SIZE) < 0) { > #else > - if (usb_submit_int_msg(dev, data->intpipe, data->new, data->intpktsize, > - data->intinterval) < 0) { > + if (usb_int_msg(dev, data->intpipe, data->new, data->intpktsize, > + data->intinterval) < 0) { > #endif > printf("Failed to get keyboard state from device %04x:%04x\n", > dev->descriptor.idVendor, dev->descriptor.idProduct); > diff --git a/include/usb.h b/include/usb.h > index 420a30e49fa1..8cd73863b876 100644 > --- a/include/usb.h > +++ b/include/usb.h > @@ -261,7 +261,7 @@ int usb_control_msg(struct usb_device *dev, unsigned int pipe, > void *data, unsigned short size, int timeout); > int usb_bulk_msg(struct usb_device *dev, unsigned int pipe, > void *data, int len, int *actual_length, int timeout); > -int usb_submit_int_msg(struct usb_device *dev, unsigned long pipe, > +int usb_int_msg(struct usb_device *dev, unsigned long pipe, > void *buffer, int transfer_len, int interval); ditto > int usb_disable_asynch(int disable); > int usb_maxpacket(struct usb_device *dev, unsigned long pipe); > -- Regards, Bin
On Fri, 5 Jul 2019 21:51:43 +0800 Bin Meng <bmeng.cn@gmail.com> wrote: > On Fri, Jul 5, 2019 at 6:44 PM Michal Suchanek <msuchanek@suse.de> wrote: > > > > This aligns naming with usb_bulk_msg and usb_control_msg. > > > > Signed-off-by: Michal Suchanek <msuchanek@suse.de> > > --- > > v2: new patch > > --- > > common/usb.c | 2 +- > > common/usb_kbd.c | 6 +++--- > > include/usb.h | 2 +- > > 3 files changed, 5 insertions(+), 5 deletions(-) > > > > diff --git a/common/usb.c b/common/usb.c > > index b70f614d244f..704937dec8a8 100644 > > --- a/common/usb.c > > +++ b/common/usb.c > > @@ -194,7 +194,7 @@ int usb_disable_asynch(int disable) > > /* > > * submits an Interrupt Message > > */ > > -int usb_submit_int_msg(struct usb_device *dev, unsigned long pipe, > > +int usb_int_msg(struct usb_device *dev, unsigned long pipe, > > void *buffer, int transfer_len, int interval) > > nits: indentation > > > { > > return submit_int_msg(dev, pipe, buffer, transfer_len, interval); > > diff --git a/common/usb_kbd.c b/common/usb_kbd.c > > index fc9419e0238a..4c23023d4e59 100644 > > --- a/common/usb_kbd.c > > +++ b/common/usb_kbd.c > > @@ -339,7 +339,7 @@ static inline void usb_kbd_poll_for_event(struct usb_device *dev) > > struct usb_kbd_pdata *data = dev->privptr; > > > > /* Submit a interrupt transfer request */ > > - if (!usb_submit_int_msg(dev, data->intpipe, &data->new[0], > > + if (!usb_int_msg(dev, data->intpipe, &data->new[0], > > data->intpktsize, data->intinterval)) > > ditto This is the correct indentation > > > usb_kbd_irq_worker(dev); > > #elif defined(CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP) || \ > > @@ -503,8 +503,8 @@ static int usb_kbd_probe_dev(struct usb_device *dev, unsigned int ifnum) > > if (usb_get_report(dev, iface->desc.bInterfaceNumber, > > 1, 0, data->new, USB_KBD_BOOT_REPORT_SIZE) < 0) { > > #else > > - if (usb_submit_int_msg(dev, data->intpipe, data->new, data->intpktsize, > > - data->intinterval) < 0) { > > + if (usb_int_msg(dev, data->intpipe, data->new, data->intpktsize, > > + data->intinterval) < 0) { > > #endif > > printf("Failed to get keyboard state from device %04x:%04x\n", > > dev->descriptor.idVendor, dev->descriptor.idProduct); > > diff --git a/include/usb.h b/include/usb.h > > index 420a30e49fa1..8cd73863b876 100644 > > --- a/include/usb.h > > +++ b/include/usb.h > > @@ -261,7 +261,7 @@ int usb_control_msg(struct usb_device *dev, unsigned int pipe, > > void *data, unsigned short size, int timeout); > > int usb_bulk_msg(struct usb_device *dev, unsigned int pipe, > > void *data, int len, int *actual_length, int timeout); > > -int usb_submit_int_msg(struct usb_device *dev, unsigned long pipe, > > +int usb_int_msg(struct usb_device *dev, unsigned long pipe, > > void *buffer, int transfer_len, int interval); > > ditto Here the indentation matches the surrounding declarations. Thanks Michal
diff --git a/common/usb.c b/common/usb.c index b70f614d244f..704937dec8a8 100644 --- a/common/usb.c +++ b/common/usb.c @@ -194,7 +194,7 @@ int usb_disable_asynch(int disable) /* * submits an Interrupt Message */ -int usb_submit_int_msg(struct usb_device *dev, unsigned long pipe, +int usb_int_msg(struct usb_device *dev, unsigned long pipe, void *buffer, int transfer_len, int interval) { return submit_int_msg(dev, pipe, buffer, transfer_len, interval); diff --git a/common/usb_kbd.c b/common/usb_kbd.c index fc9419e0238a..4c23023d4e59 100644 --- a/common/usb_kbd.c +++ b/common/usb_kbd.c @@ -339,7 +339,7 @@ static inline void usb_kbd_poll_for_event(struct usb_device *dev) struct usb_kbd_pdata *data = dev->privptr; /* Submit a interrupt transfer request */ - if (!usb_submit_int_msg(dev, data->intpipe, &data->new[0], + if (!usb_int_msg(dev, data->intpipe, &data->new[0], data->intpktsize, data->intinterval)) usb_kbd_irq_worker(dev); #elif defined(CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP) || \ @@ -503,8 +503,8 @@ static int usb_kbd_probe_dev(struct usb_device *dev, unsigned int ifnum) if (usb_get_report(dev, iface->desc.bInterfaceNumber, 1, 0, data->new, USB_KBD_BOOT_REPORT_SIZE) < 0) { #else - if (usb_submit_int_msg(dev, data->intpipe, data->new, data->intpktsize, - data->intinterval) < 0) { + if (usb_int_msg(dev, data->intpipe, data->new, data->intpktsize, + data->intinterval) < 0) { #endif printf("Failed to get keyboard state from device %04x:%04x\n", dev->descriptor.idVendor, dev->descriptor.idProduct); diff --git a/include/usb.h b/include/usb.h index 420a30e49fa1..8cd73863b876 100644 --- a/include/usb.h +++ b/include/usb.h @@ -261,7 +261,7 @@ int usb_control_msg(struct usb_device *dev, unsigned int pipe, void *data, unsigned short size, int timeout); int usb_bulk_msg(struct usb_device *dev, unsigned int pipe, void *data, int len, int *actual_length, int timeout); -int usb_submit_int_msg(struct usb_device *dev, unsigned long pipe, +int usb_int_msg(struct usb_device *dev, unsigned long pipe, void *buffer, int transfer_len, int interval); int usb_disable_asynch(int disable); int usb_maxpacket(struct usb_device *dev, unsigned long pipe);
This aligns naming with usb_bulk_msg and usb_control_msg. Signed-off-by: Michal Suchanek <msuchanek@suse.de> --- v2: new patch --- common/usb.c | 2 +- common/usb_kbd.c | 6 +++--- include/usb.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-)