Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/scsipi Delete do-nothing device-activation hooks.



details:   https://anonhg.NetBSD.org/src/rev/da3bd81245ec
branches:  trunk
changeset: 749737:da3bd81245ec
user:      dyoung <dyoung%NetBSD.org@localhost>
date:      Sun Dec 06 22:48:17 2009 +0000

description:
Delete do-nothing device-activation hooks.

diffstat:

 sys/dev/scsipi/cd.c       |  26 +++-----------------------
 sys/dev/scsipi/ss.c       |  26 +++-----------------------
 sys/dev/scsipi/st.c       |  23 ++---------------------
 sys/dev/scsipi/st_atapi.c |   6 +++---
 sys/dev/scsipi/st_scsi.c  |   6 +++---
 sys/dev/scsipi/stvar.h    |   3 +--
 sys/dev/scsipi/uk.c       |  27 +++------------------------
 7 files changed, 18 insertions(+), 99 deletions(-)

diffs (290 lines):

diff -r f4ea8fae00ba -r da3bd81245ec sys/dev/scsipi/cd.c
--- a/sys/dev/scsipi/cd.c       Sun Dec 06 22:44:55 2009 +0000
+++ b/sys/dev/scsipi/cd.c       Sun Dec 06 22:48:17 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cd.c,v 1.295 2009/10/21 21:12:05 rmind Exp $   */
+/*     $NetBSD: cd.c,v 1.296 2009/12/06 22:48:17 dyoung Exp $  */
 
 /*-
  * Copyright (c) 1998, 2001, 2003, 2004, 2005, 2008 The NetBSD Foundation,
@@ -50,7 +50,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cd.c,v 1.295 2009/10/21 21:12:05 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cd.c,v 1.296 2009/12/06 22:48:17 dyoung Exp $");
 
 #include "rnd.h"
 
@@ -171,7 +171,6 @@
 
 static int     cdmatch(device_t, cfdata_t, void *);
 static void    cdattach(device_t, device_t, void *);
-static int     cdactivate(device_t, enum devact);
 static int     cddetach(device_t, int);
 
 static int     mmc_getdiscinfo(struct scsipi_periph *, struct mmc_discinfo *);
@@ -182,7 +181,7 @@
 static void    cd_set_properties(struct cd_softc *);
 
 CFATTACH_DECL3_NEW(cd, sizeof(struct cd_softc), cdmatch, cdattach, cddetach,
-    cdactivate, NULL, NULL, DVF_DETACH_SHUTDOWN);
+    NULL, NULL, NULL, DVF_DETACH_SHUTDOWN);
 
 extern struct cfdriver cd_cd;
 
@@ -299,25 +298,6 @@
 }
 
 static int
-cdactivate(device_t self, enum devact act)
-{
-       int rv = 0;
-
-       switch (act) {
-       case DVACT_ACTIVATE:
-               rv = EOPNOTSUPP;
-               break;
-
-       case DVACT_DEACTIVATE:
-               /*
-                * Nothing to do; we key off the device's DVF_ACTIVE.
-                */
-               break;
-       }
-       return (rv);
-}
-
-static int
 cddetach(device_t self, int flags)
 {
        struct cd_softc *cd = device_private(self);
diff -r f4ea8fae00ba -r da3bd81245ec sys/dev/scsipi/ss.c
--- a/sys/dev/scsipi/ss.c       Sun Dec 06 22:44:55 2009 +0000
+++ b/sys/dev/scsipi/ss.c       Sun Dec 06 22:48:17 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ss.c,v 1.79 2009/11/23 02:13:47 rmind Exp $    */
+/*     $NetBSD: ss.c,v 1.80 2009/12/06 22:48:17 dyoung Exp $   */
 
 /*
  * Copyright (c) 1995 Kenneth Stailey.  All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ss.c,v 1.79 2009/11/23 02:13:47 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ss.c,v 1.80 2009/12/06 22:48:17 dyoung Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -71,10 +71,9 @@
 static int     ssmatch(device_t, cfdata_t, void *);
 static void    ssattach(device_t, device_t, void *);
 static int     ssdetach(device_t self, int flags);
-static int     ssactivate(device_t self, enum devact act);
 
 CFATTACH_DECL(ss, sizeof(struct ss_softc),
-    ssmatch, ssattach, ssdetach, ssactivate);
+    ssmatch, ssattach, ssdetach, NULL);
 
 extern struct cfdriver ss_cd;
 
@@ -215,25 +214,6 @@
        return (0);
 }
 
-static int
-ssactivate(device_t self, enum devact act)
-{
-       int rv = 0;
-
-       switch (act) {
-       case DVACT_ACTIVATE:
-               rv = EOPNOTSUPP;
-               break;
-
-       case DVACT_DEACTIVATE:
-               /*
-                * Nothing to do; we key off the device's DVF_ACTIVE.
-                */
-               break;
-       }
-       return (rv);
-}
-
 /*
  * open the device.
  */
diff -r f4ea8fae00ba -r da3bd81245ec sys/dev/scsipi/st.c
--- a/sys/dev/scsipi/st.c       Sun Dec 06 22:44:55 2009 +0000
+++ b/sys/dev/scsipi/st.c       Sun Dec 06 22:48:17 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: st.c,v 1.215 2009/12/05 22:34:43 pooka Exp $ */
+/*     $NetBSD: st.c,v 1.216 2009/12/06 22:48:17 dyoung Exp $ */
 
 /*-
  * Copyright (c) 1998, 2004 The NetBSD Foundation, Inc.
@@ -50,7 +50,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: st.c,v 1.215 2009/12/05 22:34:43 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: st.c,v 1.216 2009/12/06 22:48:17 dyoung Exp $");
 
 #include "opt_scsi.h"
 
@@ -417,25 +417,6 @@
 }
 
 int
-stactivate(device_t self, enum devact act)
-{
-       int rv = 0;
-
-       switch (act) {
-       case DVACT_ACTIVATE:
-               rv = EOPNOTSUPP;
-               break;
-
-       case DVACT_DEACTIVATE:
-               /*
-                * Nothing to do; we key off the device's DVF_ACTIVE.
-                */
-               break;
-       }
-       return (rv);
-}
-
-int
 stdetach(device_t self, int flags)
 {
        struct st_softc *st = device_private(self);
diff -r f4ea8fae00ba -r da3bd81245ec sys/dev/scsipi/st_atapi.c
--- a/sys/dev/scsipi/st_atapi.c Sun Dec 06 22:44:55 2009 +0000
+++ b/sys/dev/scsipi/st_atapi.c Sun Dec 06 22:48:17 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: st_atapi.c,v 1.25 2009/10/21 21:12:06 rmind Exp $ */
+/*     $NetBSD: st_atapi.c,v 1.26 2009/12/06 22:48:17 dyoung Exp $ */
 
 /*
  * Copyright (c) 2001 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: st_atapi.c,v 1.25 2009/10/21 21:12:06 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: st_atapi.c,v 1.26 2009/12/06 22:48:17 dyoung Exp $");
 
 #include "opt_scsi.h"
 #include "rnd.h"
@@ -48,7 +48,7 @@
 static int     st_atapibus_mode_sense(struct st_softc *, int);
 
 CFATTACH_DECL(st_atapibus, sizeof(struct st_softc),
-    st_atapibus_match, st_atapibus_attach, stdetach, stactivate);
+    st_atapibus_match, st_atapibus_attach, stdetach, NULL);
 
 static const struct scsipi_inquiry_pattern st_atapibus_patterns[] = {
        {T_SEQUENTIAL, T_REMOV,
diff -r f4ea8fae00ba -r da3bd81245ec sys/dev/scsipi/st_scsi.c
--- a/sys/dev/scsipi/st_scsi.c  Sun Dec 06 22:44:55 2009 +0000
+++ b/sys/dev/scsipi/st_scsi.c  Sun Dec 06 22:48:17 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: st_scsi.c,v 1.31 2009/10/21 21:12:06 rmind Exp $ */
+/*     $NetBSD: st_scsi.c,v 1.32 2009/12/06 22:48:17 dyoung Exp $ */
 
 /*-
  * Copyright (c) 1998, 2004 The NetBSD Foundation, Inc.
@@ -50,7 +50,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: st_scsi.c,v 1.31 2009/10/21 21:12:06 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: st_scsi.c,v 1.32 2009/12/06 22:48:17 dyoung Exp $");
 
 #include "opt_scsi.h"
 #include "rnd.h"
@@ -75,7 +75,7 @@
 static int     st_scsibus_cmprss(struct st_softc *, int, int);
 
 CFATTACH_DECL(st_scsibus, sizeof(struct st_softc),
-    st_scsibus_match, st_scsibus_attach, stdetach, stactivate);
+    st_scsibus_match, st_scsibus_attach, stdetach, NULL);
 
 static const struct scsipi_inquiry_pattern st_scsibus_patterns[] = {
        {T_SEQUENTIAL, T_REMOV,
diff -r f4ea8fae00ba -r da3bd81245ec sys/dev/scsipi/stvar.h
--- a/sys/dev/scsipi/stvar.h    Sun Dec 06 22:44:55 2009 +0000
+++ b/sys/dev/scsipi/stvar.h    Sun Dec 06 22:48:17 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: stvar.h,v 1.20 2009/08/15 12:44:55 pgoyette Exp $ */
+/*     $NetBSD: stvar.h,v 1.21 2009/12/06 22:48:17 dyoung Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -179,7 +179,6 @@
                         ST_2FM_AT_EOD | ST_PER_ACTION | ST_POSUPDATED)
 
 void   stattach(device_t, struct st_softc *, void *);
-int    stactivate(device_t, enum devact);
 int    stdetach(device_t, int);
 int    st_mode_select(struct st_softc *, int);
 
diff -r f4ea8fae00ba -r da3bd81245ec sys/dev/scsipi/uk.c
--- a/sys/dev/scsipi/uk.c       Sun Dec 06 22:44:55 2009 +0000
+++ b/sys/dev/scsipi/uk.c       Sun Dec 06 22:48:17 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uk.c,v 1.58 2009/05/12 14:44:31 cegger Exp $   */
+/*     $NetBSD: uk.c,v 1.59 2009/12/06 22:48:17 dyoung Exp $   */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uk.c,v 1.58 2009/05/12 14:44:31 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uk.c,v 1.59 2009/12/06 22:48:17 dyoung Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -60,12 +60,10 @@
 
 static int     ukmatch(device_t, cfdata_t, void *);
 static void    ukattach(device_t, device_t, void *);
-static int     ukactivate(device_t, enum devact);
 static int     ukdetach(device_t, int);
 
 
-CFATTACH_DECL(uk, sizeof(struct uk_softc), ukmatch, ukattach, ukdetach,
-    ukactivate);
+CFATTACH_DECL(uk, sizeof(struct uk_softc), ukmatch, ukattach, ukdetach, NULL);
 
 extern struct cfdriver uk_cd;
 
@@ -109,25 +107,6 @@
 }
 
 static int
-ukactivate(device_t self, enum devact act)
-{
-       int rv = 0;
-
-       switch (act) {
-       case DVACT_ACTIVATE:
-               rv = EOPNOTSUPP;
-               break;
-
-       case DVACT_DEACTIVATE:
-               /*
-                * Nothing to do; we key off the device's DVF_ACTIVE.
-                */
-               break;
-       }
-       return (rv);
-}
-
-static int
 ukdetach(device_t self, int flags)
 {
        /*struct uk_softc *uk = device_private(self);*/



Home | Main Index | Thread Index | Old Index