Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/alpha/alpha Get the pointer to the driver name earl...
details: https://anonhg.NetBSD.org/src/rev/8e2a3afa420d
branches: trunk
changeset: 537086:8e2a3afa420d
user: thorpej <thorpej%NetBSD.org@localhost>
date: Thu Sep 26 19:04:59 2002 +0000
description:
Get the pointer to the driver name early, rather than always dereferencing
the cfdriver pointer.
diffstat:
sys/arch/alpha/alpha/api_up1000.c | 22 +++++++++++-----------
sys/arch/alpha/alpha/avalon_a12.c | 20 ++++++++++----------
sys/arch/alpha/alpha/dec_1000a.c | 20 ++++++++++----------
sys/arch/alpha/alpha/dec_2000_300.c | 22 +++++++++++-----------
sys/arch/alpha/alpha/dec_2100_a50.c | 20 ++++++++++----------
sys/arch/alpha/alpha/dec_2100_a500.c | 20 ++++++++++----------
sys/arch/alpha/alpha/dec_3000_300.c | 24 ++++++++++++------------
sys/arch/alpha/alpha/dec_3000_500.c | 24 ++++++++++++------------
sys/arch/alpha/alpha/dec_550.c | 22 +++++++++++-----------
sys/arch/alpha/alpha/dec_6600.c | 24 ++++++++++++------------
sys/arch/alpha/alpha/dec_alphabook1.c | 20 ++++++++++----------
sys/arch/alpha/alpha/dec_axppci_33.c | 20 ++++++++++----------
sys/arch/alpha/alpha/dec_eb164.c | 22 +++++++++++-----------
sys/arch/alpha/alpha/dec_eb64plus.c | 20 ++++++++++----------
sys/arch/alpha/alpha/dec_eb66.c | 20 ++++++++++----------
sys/arch/alpha/alpha/dec_kn20aa.c | 20 ++++++++++----------
sys/arch/alpha/alpha/dec_kn300.c | 20 ++++++++++----------
sys/arch/alpha/alpha/dec_kn8ae.c | 20 ++++++++++----------
18 files changed, 190 insertions(+), 190 deletions(-)
diffs (truncated from 1249 to 300 lines):
diff -r 1ad5d96ca38c -r 8e2a3afa420d sys/arch/alpha/alpha/api_up1000.c
--- a/sys/arch/alpha/alpha/api_up1000.c Thu Sep 26 18:54:30 2002 +0000
+++ b/sys/arch/alpha/alpha/api_up1000.c Thu Sep 26 19:04:59 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: api_up1000.c,v 1.10 2002/09/06 13:18:43 gehenna Exp $ */
+/* $NetBSD: api_up1000.c,v 1.11 2002/09/26 19:04:59 thorpej Exp $ */
/*
* Copyright (c) 1995, 1996, 1997 Carnegie-Mellon University.
@@ -34,7 +34,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: api_up1000.c,v 1.10 2002/09/06 13:18:43 gehenna Exp $");
+__KERNEL_RCSID(0, "$NetBSD: api_up1000.c,v 1.11 2002/09/26 19:04:59 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -180,7 +180,7 @@
struct bootdev_data *b = bootdev_data;
struct device *parent = dev->dv_parent;
struct cfdata *cf = dev->dv_cfdata;
- struct cfdriver *cd = cf->cf_driver;
+ const char *name = cf->cf_driver->cd_name;
if (found)
return;
@@ -201,7 +201,7 @@
}
if (pcidev == NULL) {
- if (strcmp(cd->cd_name, "pci"))
+ if (strcmp(name, "pci"))
return;
else {
struct pcibus_attach_args *pba = aux;
@@ -233,9 +233,9 @@
}
if ((ideboot || scsiboot) &&
- (!strcmp(cd->cd_name, "sd") ||
- !strcmp(cd->cd_name, "st") ||
- !strcmp(cd->cd_name, "cd"))) {
+ (!strcmp(name, "sd") ||
+ !strcmp(name, "st") ||
+ !strcmp(name, "cd"))) {
struct scsipibus_attach_args *sa = aux;
if (parent->dv_parent != scsipidev)
@@ -252,12 +252,12 @@
switch (b->boot_dev_type) {
case 0:
- if (strcmp(cd->cd_name, "sd") &&
- strcmp(cd->cd_name, "cd"))
+ if (strcmp(name, "sd") &&
+ strcmp(name, "cd"))
return;
break;
case 1:
- if (strcmp(cd->cd_name, "st"))
+ if (strcmp(name, "st"))
return;
break;
default:
@@ -273,7 +273,7 @@
/*
* Support to boot from IDE drives.
*/
- if ((ideboot || scsiboot) && !strcmp(cd->cd_name, "wd")) {
+ if ((ideboot || scsiboot) && !strcmp(name, "wd")) {
struct ata_device *adev = aux;
if ((strncmp("pciide", parent->dv_xname, 6) != 0)) {
return;
diff -r 1ad5d96ca38c -r 8e2a3afa420d sys/arch/alpha/alpha/avalon_a12.c
--- a/sys/arch/alpha/alpha/avalon_a12.c Thu Sep 26 18:54:30 2002 +0000
+++ b/sys/arch/alpha/alpha/avalon_a12.c Thu Sep 26 19:04:59 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: avalon_a12.c,v 1.7 2002/09/06 13:18:43 gehenna Exp $ */
+/* $NetBSD: avalon_a12.c,v 1.8 2002/09/26 19:04:59 thorpej Exp $ */
/* [Notice revision 2.2]
* Copyright (c) 1997, 1998 Avalon Computer Systems, Inc.
@@ -64,7 +64,7 @@
#include "opt_avalon_a12.h" /* Config options headers */
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: avalon_a12.c,v 1.7 2002/09/06 13:18:43 gehenna Exp $");
+__KERNEL_RCSID(0, "$NetBSD: avalon_a12.c,v 1.8 2002/09/26 19:04:59 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -155,7 +155,7 @@
struct bootdev_data *b = bootdev_data;
struct device *parent = dev->dv_parent;
struct cfdata *cf = dev->dv_cfdata;
- struct cfdriver *cd = cf->cf_driver;
+ const char *name = cf->cf_driver->cd_name;
if (found)
return;
@@ -171,7 +171,7 @@
}
if (pcidev == NULL) {
- if (strcmp(cd->cd_name, "pci"))
+ if (strcmp(name, "pci"))
return;
else {
struct pcibus_attach_args *pba = aux;
@@ -207,9 +207,9 @@
}
if (scsiboot &&
- (!strcmp(cd->cd_name, "sd") ||
- !strcmp(cd->cd_name, "st") ||
- !strcmp(cd->cd_name, "cd"))) {
+ (!strcmp(name, "sd") ||
+ !strcmp(name, "st") ||
+ !strcmp(name, "cd"))) {
struct scsipibus_attach_args *sa = aux;
if (parent->dv_parent != scsidev)
@@ -222,12 +222,12 @@
switch (b->boot_dev_type) {
case 0:
- if (strcmp(cd->cd_name, "sd") &&
- strcmp(cd->cd_name, "cd"))
+ if (strcmp(name, "sd") &&
+ strcmp(name, "cd"))
return;
break;
case 1:
- if (strcmp(cd->cd_name, "st"))
+ if (strcmp(name, "st"))
return;
break;
default:
diff -r 1ad5d96ca38c -r 8e2a3afa420d sys/arch/alpha/alpha/dec_1000a.c
--- a/sys/arch/alpha/alpha/dec_1000a.c Thu Sep 26 18:54:30 2002 +0000
+++ b/sys/arch/alpha/alpha/dec_1000a.c Thu Sep 26 19:04:59 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dec_1000a.c,v 1.15 2002/09/06 13:18:43 gehenna Exp $ */
+/* $NetBSD: dec_1000a.c,v 1.16 2002/09/26 19:04:59 thorpej Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: dec_1000a.c,v 1.15 2002/09/06 13:18:43 gehenna Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dec_1000a.c,v 1.16 2002/09/26 19:04:59 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -260,7 +260,7 @@
struct bootdev_data *b = bootdev_data;
struct device *parent = dev->dv_parent;
struct cfdata *cf = dev->dv_cfdata;
- struct cfdriver *cd = cf->cf_driver;
+ const char *name = cf->cf_driver->cd_name;
if (found)
return;
@@ -276,7 +276,7 @@
}
if (pcidev == NULL) {
- if (strcmp(cd->cd_name, "pci"))
+ if (strcmp(name, "pci"))
return;
else {
struct pcibus_attach_args *pba = aux;
@@ -312,9 +312,9 @@
}
if (scsiboot &&
- (!strcmp(cd->cd_name, "sd") ||
- !strcmp(cd->cd_name, "st") ||
- !strcmp(cd->cd_name, "cd"))) {
+ (!strcmp(name, "sd") ||
+ !strcmp(name, "st") ||
+ !strcmp(name, "cd"))) {
struct scsipibus_attach_args *sa = aux;
if (parent->dv_parent != scsidev)
@@ -327,12 +327,12 @@
switch (b->boot_dev_type) {
case 0:
- if (strcmp(cd->cd_name, "sd") &&
- strcmp(cd->cd_name, "cd"))
+ if (strcmp(name, "sd") &&
+ strcmp(name, "cd"))
return;
break;
case 1:
- if (strcmp(cd->cd_name, "st"))
+ if (strcmp(name, "st"))
return;
break;
default:
diff -r 1ad5d96ca38c -r 8e2a3afa420d sys/arch/alpha/alpha/dec_2000_300.c
--- a/sys/arch/alpha/alpha/dec_2000_300.c Thu Sep 26 18:54:30 2002 +0000
+++ b/sys/arch/alpha/alpha/dec_2000_300.c Thu Sep 26 19:04:59 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dec_2000_300.c,v 1.5 2002/09/06 13:18:43 gehenna Exp $ */
+/* $NetBSD: dec_2000_300.c,v 1.6 2002/09/26 19:04:59 thorpej Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: dec_2000_300.c,v 1.5 2002/09/06 13:18:43 gehenna Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dec_2000_300.c,v 1.6 2002/09/26 19:04:59 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -210,7 +210,7 @@
struct bootdev_data *b = bootdev_data;
struct device *parent = dev->dv_parent;
struct cfdata *cf = dev->dv_cfdata;
- struct cfdriver *cd = cf->cf_driver;
+ const char *name = cf->cf_driver->cd_name;
if (found)
return;
@@ -224,10 +224,10 @@
initted = 1;
}
- if (eisadev == NULL && strcmp(cd->cd_name, "eisa") == 0)
+ if (eisadev == NULL && strcmp(name, "eisa") == 0)
eisadev = dev;
- if (isadev == NULL && strcmp(cd->cd_name, "isa") == 0)
+ if (isadev == NULL && strcmp(name, "isa") == 0)
isadev = dev;
if (scsiboot && (scsidev == NULL)) {
@@ -248,9 +248,9 @@
}
if (scsiboot &&
- (!strcmp(cd->cd_name, "sd") ||
- !strcmp(cd->cd_name, "st") ||
- !strcmp(cd->cd_name, "cd"))) {
+ (!strcmp(name, "sd") ||
+ !strcmp(name, "st") ||
+ !strcmp(name, "cd"))) {
struct scsipibus_attach_args *sa = aux;
if (parent->dv_parent != scsidev)
@@ -263,12 +263,12 @@
switch (b->boot_dev_type) {
case 0:
- if (strcmp(cd->cd_name, "sd") &&
- strcmp(cd->cd_name, "cd"))
+ if (strcmp(name, "sd") &&
+ strcmp(name, "cd"))
return;
break;
case 1:
- if (strcmp(cd->cd_name, "st"))
+ if (strcmp(name, "st"))
return;
break;
default:
diff -r 1ad5d96ca38c -r 8e2a3afa420d sys/arch/alpha/alpha/dec_2100_a50.c
--- a/sys/arch/alpha/alpha/dec_2100_a50.c Thu Sep 26 18:54:30 2002 +0000
+++ b/sys/arch/alpha/alpha/dec_2100_a50.c Thu Sep 26 19:04:59 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dec_2100_a50.c,v 1.51 2002/09/06 13:18:43 gehenna Exp $ */
+/* $NetBSD: dec_2100_a50.c,v 1.52 2002/09/26 19:05:00 thorpej Exp $ */
/*
* Copyright (c) 1995, 1996, 1997 Carnegie-Mellon University.
@@ -34,7 +34,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: dec_2100_a50.c,v 1.51 2002/09/06 13:18:43 gehenna Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dec_2100_a50.c,v 1.52 2002/09/26 19:05:00 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -203,7 +203,7 @@
struct bootdev_data *b = bootdev_data;
struct device *parent = dev->dv_parent;
struct cfdata *cf = dev->dv_cfdata;
- struct cfdriver *cd = cf->cf_driver;
+ const char *name = cf->cf_driver->cd_name;
if (found)
return;
Home |
Main Index |
Thread Index |
Old Index