Source-Changes-HG archive

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

[src/trunk]: src/sys/dev midi_attach() does not actually ever use the parent ...



details:   https://anonhg.NetBSD.org/src/rev/3d302248b0c4
branches:  trunk
changeset: 778583:3d302248b0c4
user:      plunky <plunky%NetBSD.org@localhost>
date:      Thu Apr 05 20:25:53 2012 +0000

description:
midi_attach() does not actually ever use the parent device
pointer, so no need to store it in sc_dev. Further, remove
the sc_dev field entirely since it is easily confused with
the dev field, which is the 'self' device pointer. Fix the
comment.

diffstat:

 sys/dev/midi.c    |  5 ++---
 sys/dev/midivar.h |  5 ++---
 2 files changed, 4 insertions(+), 6 deletions(-)

diffs (48 lines):

diff -r ea7ed804977a -r 3d302248b0c4 sys/dev/midi.c
--- a/sys/dev/midi.c    Thu Apr 05 20:17:24 2012 +0000
+++ b/sys/dev/midi.c    Thu Apr 05 20:25:53 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: midi.c,v 1.76 2012/04/05 20:13:34 plunky Exp $ */
+/*     $NetBSD: midi.c,v 1.77 2012/04/05 20:25:53 plunky Exp $ */
 
 /*
  * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: midi.c,v 1.76 2012/04/05 20:13:34 plunky Exp $");
+__KERNEL_RCSID(0, "$NetBSD: midi.c,v 1.77 2012/04/05 20:25:53 plunky Exp $");
 
 #include "midi.h"
 #include "sequencer.h"
@@ -261,7 +261,6 @@
 
        sc->dying = 0;
        sc->isopen = 0;
-       sc->sc_dev = parent;
 
        mutex_enter(&hwif_softc_lock);
        mutex_enter(sc->lock);
diff -r ea7ed804977a -r 3d302248b0c4 sys/dev/midivar.h
--- a/sys/dev/midivar.h Thu Apr 05 20:17:24 2012 +0000
+++ b/sys/dev/midivar.h Thu Apr 05 20:25:53 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: midivar.h,v 1.18 2011/11/23 23:07:31 jmcneill Exp $    */
+/*     $NetBSD: midivar.h,v 1.19 2012/04/05 20:25:53 plunky Exp $      */
 
 /*
  * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
@@ -179,11 +179,10 @@
 };
 
 struct midi_softc {
-       device_t dev;
+       device_t dev;           /* Hardware device struct */
        void    *hw_hdl;        /* Hardware driver handle */
        const struct    midi_hw_if *hw_if; /* Hardware interface */
        const struct    midi_hw_if_ext *hw_if_ext; /* see midi_if.h */
-       device_t sc_dev;        /* Hardware device struct */
        int     isopen;         /* Open indicator */
        int     flags;          /* Open flags */
        int     dying;



Home | Main Index | Thread Index | Old Index