Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/tc Move small storage for ev_name string into tcds_s...
details: https://anonhg.NetBSD.org/src/rev/3adce0469ef3
branches: trunk
changeset: 514082:3adce0469ef3
user: nisimura <nisimura%NetBSD.org@localhost>
date: Wed Aug 22 05:00:27 2001 +0000
description:
Move small storage for ev_name string into tcds_softc.
diffstat:
sys/dev/tc/tcds.c | 14 ++++++--------
sys/dev/tc/tcdsvar.h | 3 ++-
2 files changed, 8 insertions(+), 9 deletions(-)
diffs (62 lines):
diff -r 0f87960fa2ba -r 3adce0469ef3 sys/dev/tc/tcds.c
--- a/sys/dev/tc/tcds.c Wed Aug 22 03:15:48 2001 +0000
+++ b/sys/dev/tc/tcds.c Wed Aug 22 05:00:27 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tcds.c,v 1.1 2000/07/04 02:22:19 nisimura Exp $ */
+/* $NetBSD: tcds.c,v 1.2 2001/08/22 05:00:27 nisimura Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: tcds.c,v 1.1 2000/07/04 02:22:19 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcds.c,v 1.2 2001/08/22 05:00:27 nisimura Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -172,7 +172,6 @@
bus_space_handle_t sbsh[2];
int i, gpi2;
const struct evcnt *pevcnt;
- char *cp;
td = tcds_lookup(ta->ta_modname);
if (td == NULL)
@@ -235,14 +234,13 @@
/* fill in common information first */
for (i = 0; i < 2; i++) {
+ char *cp;
+
slotc = &sc->sc_slots[i];
-
bzero(slotc, sizeof *slotc); /* clear everything */
- cp = malloc(12, M_DEVBUF, M_NOWAIT);
- if (cp == NULL)
- panic("tcdsattach");
- sprintf(cp, "chip %d", i);
+ cp = slotc->sc_name;
+ snprintf(cp, sizeof(slotc->sc_name), "chip %d", i);
evcnt_attach_dynamic(&slotc->sc_evcnt, EVCNT_TYPE_INTR,
pevcnt, sc->sc_dv.dv_xname, cp);
diff -r 0f87960fa2ba -r 3adce0469ef3 sys/dev/tc/tcdsvar.h
--- a/sys/dev/tc/tcdsvar.h Wed Aug 22 03:15:48 2001 +0000
+++ b/sys/dev/tc/tcdsvar.h Wed Aug 22 05:00:27 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tcdsvar.h,v 1.1 2000/07/04 02:22:21 nisimura Exp $ */
+/* $NetBSD: tcdsvar.h,v 1.2 2001/08/22 05:00:27 nisimura Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -39,6 +39,7 @@
int (*sc_intrhand) __P((void *)); /* intr. handler */
void *sc_intrarg; /* intr. handler arg. */
struct evcnt sc_evcnt; /* intr. count */
+ char sc_name[8]; /* ev_name */
/*
* Sets of bits in TCDS CIR and IMER that enable/check
Home |
Main Index |
Thread Index |
Old Index