Module Name:    src
Committed By:   plunky
Date:           Thu Apr  5 20:25:53 UTC 2012

Modified Files:
        src/sys/dev: midi.c midivar.h

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.77 src/sys/dev/midi.c
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/midivar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/midi.c
diff -u src/sys/dev/midi.c:1.76 src/sys/dev/midi.c:1.77
--- src/sys/dev/midi.c:1.76	Thu Apr  5 20:13:34 2012
+++ src/sys/dev/midi.c	Thu Apr  5 20:25:53 2012
@@ -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 @@ midi_attach(struct midi_softc *sc, devic
 
 	sc->dying = 0;
 	sc->isopen = 0;
-	sc->sc_dev = parent;
 
 	mutex_enter(&hwif_softc_lock);
 	mutex_enter(sc->lock);

Index: src/sys/dev/midivar.h
diff -u src/sys/dev/midivar.h:1.18 src/sys/dev/midivar.h:1.19
--- src/sys/dev/midivar.h:1.18	Wed Nov 23 23:07:31 2011
+++ src/sys/dev/midivar.h	Thu Apr  5 20:25:53 2012
@@ -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_state {
 };
 
 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;

Reply via email to