Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/nick-nhusb]: src/sys/dev/usb KNF



details:   https://anonhg.NetBSD.org/src/rev/90c60b93f2c0
branches:  nick-nhusb
changeset: 334338:90c60b93f2c0
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sat Dec 19 10:04:35 2015 +0000

description:
KNF

diffstat:

 sys/dev/usb/usbdi.c |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (58 lines):

diff -r 671968a06402 -r 90c60b93f2c0 sys/dev/usb/usbdi.c
--- a/sys/dev/usb/usbdi.c       Sat Dec 19 09:59:03 2015 +0000
+++ b/sys/dev/usb/usbdi.c       Sat Dec 19 10:04:35 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: usbdi.c,v 1.162.2.33 2015/10/21 07:36:31 skrll Exp $   */
+/*     $NetBSD: usbdi.c,v 1.162.2.34 2015/12/19 10:04:35 skrll Exp $   */
 
 /*
  * Copyright (c) 1998, 2012, 2015 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.162.2.33 2015/10/21 07:36:31 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.162.2.34 2015/12/19 10:04:35 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -630,6 +630,7 @@
 usb_endpoint_descriptor_t *
 usbd_interface2endpoint_descriptor(struct usbd_interface *iface, uint8_t index)
 {
+
        if (index >= iface->ui_idesc->bNumEndpoints)
                return NULL;
        return iface->ui_endpoints[index].ue_edesc;
@@ -713,6 +714,7 @@
 void
 usbd_clear_endpoint_toggle(struct usbd_pipe *pipe)
 {
+
        pipe->up_methods->upm_cleartoggle(pipe);
 }
 
@@ -729,6 +731,7 @@
 usbd_status
 usbd_interface_count(struct usbd_device *dev, uint8_t *count)
 {
+
        if (dev->ud_cdesc == NULL)
                return USBD_NOT_CONFIGURED;
        *count = dev->ud_cdesc->bNumInterface;
@@ -739,6 +742,7 @@
 usbd_interface2device_handle(struct usbd_interface *iface,
                             struct usbd_device **dev)
 {
+
        *dev = iface->ui_dev;
 }
 
@@ -746,6 +750,7 @@
 usbd_device2interface_handle(struct usbd_device *dev,
                             uint8_t ifaceno, struct usbd_interface **iface)
 {
+
        if (dev->ud_cdesc == NULL)
                return USBD_NOT_CONFIGURED;
        if (ifaceno >= dev->ud_cdesc->bNumInterface)



Home | Main Index | Thread Index | Old Index