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 Remove barely used softc copy in uhci_intr_...



details:   https://anonhg.NetBSD.org/src/rev/1081a611fc04
branches:  nick-nhusb
changeset: 334292:1081a611fc04
user:      skrll <skrll%NetBSD.org@localhost>
date:      Tue Oct 27 08:02:31 2015 +0000

description:
Remove barely used softc copy in uhci_intr_info_t

diffstat:

 sys/dev/usb/uhci.c    |  11 +++++------
 sys/dev/usb/uhcivar.h |   3 +--
 2 files changed, 6 insertions(+), 8 deletions(-)

diffs (70 lines):

diff -r b37a4a99edbf -r 1081a611fc04 sys/dev/usb/uhci.c
--- a/sys/dev/usb/uhci.c        Sun Oct 25 09:50:06 2015 +0000
+++ b/sys/dev/usb/uhci.c        Tue Oct 27 08:02:31 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uhci.c,v 1.264.4.37 2015/10/20 15:31:21 skrll Exp $    */
+/*     $NetBSD: uhci.c,v 1.264.4.38 2015/10/27 08:02:31 skrll Exp $    */
 
 /*
  * Copyright (c) 1998, 2004, 2011, 2012 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.264.4.37 2015/10/20 15:31:21 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.264.4.38 2015/10/27 08:02:31 skrll Exp $");
 
 #include "opt_usb.h"
 
@@ -624,7 +624,6 @@
                memset(xfer, 0, sizeof(struct uhci_xfer));
 
                struct uhci_xfer *uxfer = UHCI_XFER2UXFER(xfer);
-               uxfer->iinfo.sc = sc;
 #ifdef DIAGNOSTIC
                uxfer->iinfo.isdone = true;
                xfer->ux_state = XFER_BUSY;
@@ -3011,7 +3010,7 @@
 uhci_device_intr_done(struct usbd_xfer *xfer)
 {
        uhci_intr_info_t *ii = &UHCI_XFER2UXFER(xfer)->iinfo;
-       uhci_softc_t *sc = ii->sc;
+       uhci_softc_t *sc = UHCI_XFER2SC(xfer);
        struct uhci_pipe *upipe = (struct uhci_pipe *)xfer->ux_pipe;
        uhci_soft_qh_t *sqh;
        int i, npoll, isread;
@@ -3091,7 +3090,7 @@
 uhci_device_ctrl_done(struct usbd_xfer *xfer)
 {
        uhci_intr_info_t *ii = &UHCI_XFER2UXFER(xfer)->iinfo;
-       uhci_softc_t *sc = ii->sc;
+       uhci_softc_t *sc = UHCI_XFER2SC(xfer);
        struct uhci_pipe *upipe = (struct uhci_pipe *)xfer->ux_pipe;
        int len = UGETW(xfer->ux_request.wLength);
        int isread = (xfer->ux_request.bmRequestType & UT_READ);
@@ -3130,7 +3129,7 @@
 uhci_device_bulk_done(struct usbd_xfer *xfer)
 {
        uhci_intr_info_t *ii = &UHCI_XFER2UXFER(xfer)->iinfo;
-       uhci_softc_t *sc = ii->sc;
+       uhci_softc_t *sc = UHCI_XFER2SC(xfer);
        struct uhci_pipe *upipe = (struct uhci_pipe *)xfer->ux_pipe;
 
        UHCIHIST_FUNC(); UHCIHIST_CALLED();
diff -r b37a4a99edbf -r 1081a611fc04 sys/dev/usb/uhcivar.h
--- a/sys/dev/usb/uhcivar.h     Sun Oct 25 09:50:06 2015 +0000
+++ b/sys/dev/usb/uhcivar.h     Tue Oct 27 08:02:31 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uhcivar.h,v 1.52.14.9 2015/10/22 11:15:42 skrll Exp $  */
+/*     $NetBSD: uhcivar.h,v 1.52.14.10 2015/10/27 08:02:31 skrll Exp $ */
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -67,7 +67,6 @@
  * searched at interrupt time.
  */
 typedef struct uhci_intr_info {
-       struct uhci_softc *sc;
        struct usbd_xfer *xfer;
        uhci_soft_td_t *stdstart;
        uhci_soft_td_t *stdend;



Home | Main Index | Thread Index | Old Index