[PATCH] remove unused struct member

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] remove unused struct member

Kevin Lo
Hi,

This diff removes an unused member sc_iface_number of the softc.  Ok?

Index: sys/dev/usb/uticom.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/uticom.c,v
retrieving revision 1.32
diff -u -p -u -p -r1.32 uticom.c
--- sys/dev/usb/uticom.c 8 Apr 2017 02:57:25 -0000 1.32
+++ sys/dev/usb/uticom.c 14 Mar 2018 07:34:55 -0000
@@ -120,8 +120,6 @@ struct uticom_softc {
  struct usbd_device *sc_udev; /* device */
  struct usbd_interface *sc_iface; /* interface */
 
- int sc_iface_number; /* interface number */
-
  struct usbd_interface *sc_intr_iface; /* interrupt interface */
  int sc_intr_number; /* interrupt number */
  struct usbd_pipe *sc_intr_pipe; /* interrupt pipe */
@@ -271,7 +269,6 @@ uticom_attach_hook(struct device *self)
 
  /* Find the bulk out interface used to upload firmware. */
  id = usbd_get_interface_descriptor(sc->sc_iface);
- sc->sc_iface_number = id->bInterfaceNumber;
 
  for (i = 0; i < id->bNumEndpoints; i++) {
  ed = usbd_interface2endpoint_descriptor(sc->sc_iface, i);
@@ -351,7 +348,6 @@ fwload_done:
 
  /* Find the interrupt endpoints. */
  id = usbd_get_interface_descriptor(sc->sc_iface);
- sc->sc_iface_number = id->bInterfaceNumber;
 
  for (i = 0; i < id->bNumEndpoints; i++) {
  ed = usbd_interface2endpoint_descriptor(sc->sc_iface, i);
@@ -382,7 +378,6 @@ fwload_done:
 
  /* Find the bulk{in,out} endpoints. */
  id = usbd_get_interface_descriptor(sc->sc_iface);
- sc->sc_iface_number = id->bInterfaceNumber;
 
  for (i = 0; i < id->bNumEndpoints; i++) {
  ed = usbd_interface2endpoint_descriptor(sc->sc_iface, i);
Index: sys/dev/usb/uts.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/uts.c,v
retrieving revision 1.40
diff -u -p -u -p -r1.40 uts.c
--- sys/dev/usb/uts.c 8 Apr 2017 02:57:25 -0000 1.40
+++ sys/dev/usb/uts.c 14 Mar 2018 07:34:55 -0000
@@ -57,7 +57,6 @@ struct uts_softc {
  struct device sc_dev;
  struct usbd_device *sc_udev;
  struct usbd_interface *sc_iface;
- int sc_iface_number;
  int sc_product;
  int sc_vendor;
 
@@ -180,7 +179,6 @@ uts_attach(struct device *parent, struct
 
  /* Find the interrupt endpoint */
  id = usbd_get_interface_descriptor(sc->sc_iface);
- sc->sc_iface_number = id->bInterfaceNumber;
 
  for (i = 0; i < id->bNumEndpoints; i++) {
  ed = usbd_interface2endpoint_descriptor(sc->sc_iface, i);
Index: sys/dev/usb/uvscom.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/uvscom.c,v
retrieving revision 1.35
diff -u -p -u -p -r1.35 uvscom.c
--- sys/dev/usb/uvscom.c 8 Apr 2017 02:57:25 -0000 1.35
+++ sys/dev/usb/uvscom.c 14 Mar 2018 07:34:55 -0000
@@ -130,7 +130,6 @@ struct uvscom_softc {
  struct device sc_dev; /* base device */
  struct usbd_device *sc_udev; /* USB device */
  struct usbd_interface *sc_iface; /* interface */
- int sc_iface_number;/* interface number */
 
  struct usbd_interface *sc_intr_iface; /* interrupt interface */
  int sc_intr_number; /* interrupt number */
@@ -269,7 +268,6 @@ uvscom_attach(struct device *parent, str
  }
 
  id = usbd_get_interface_descriptor(sc->sc_iface);
- sc->sc_iface_number = id->bInterfaceNumber;
 
  /* Find endpoints */
  for (i = 0; i < id->bNumEndpoints; i++) {