summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/usb_port.h
diff options
context:
space:
mode:
authorjoe <joe@FreeBSD.org>2003-07-14 18:33:55 +0000
committerjoe <joe@FreeBSD.org>2003-07-14 18:33:55 +0000
commitdb1f3022aa84d356423957d0a1d82848480fa749 (patch)
tree0992d6e2ae3cb3067de32ba2a7842e1014ca6a6c /sys/dev/usb/usb_port.h
parent0be29d9f1865c625ed0790aa1b9f763e64751c74 (diff)
downloadFreeBSD-src-db1f3022aa84d356423957d0a1d82848480fa749.zip
FreeBSD-src-db1f3022aa84d356423957d0a1d82848480fa749.tar.gz
MFNetBSD:
date: 2002/10/01 01:25:25; author: thorpej; Use CFATTACH_DECL(). Not a functional change on FreeBSD.
Diffstat (limited to 'sys/dev/usb/usb_port.h')
-rw-r--r--sys/dev/usb/usb_port.h21
1 files changed, 13 insertions, 8 deletions
diff --git a/sys/dev/usb/usb_port.h b/sys/dev/usb/usb_port.h
index 89890c7..84c5acd 100644
--- a/sys/dev/usb/usb_port.h
+++ b/sys/dev/usb/usb_port.h
@@ -2,6 +2,11 @@
/* $NetBSD: usb_port.h,v 1.54 2002/03/28 21:49:19 ichiro Exp $ */
/* $FreeBSD$ */
+/* Also already merged from NetBSD:
+ * $NetBSD: usb_port.h,v 1.57 2002/09/27 20:42:01 thorpej Exp $
+ * $NetBSD: usb_port.h,v 1.58 2002/10/01 01:25:26 thorpej Exp $
+ */
+
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -95,6 +100,7 @@ typedef int usb_malloc_type;
#define logprintf printf
+#define USB_DNAME(dname) dname
#define USB_DECLARE_DRIVER(dname) \
int __CONCAT(dname,_match)(struct device *, struct cfdata *, void *); \
void __CONCAT(dname,_attach)(struct device *, struct device *, void *); \
@@ -103,13 +109,12 @@ int __CONCAT(dname,_activate)(struct device *, enum devact); \
\
extern struct cfdriver __CONCAT(dname,_cd); \
\
-struct cfattach __CONCAT(dname,_ca) = { \
- sizeof(struct __CONCAT(dname,_softc)), \
- __CONCAT(dname,_match), \
- __CONCAT(dname,_attach), \
- __CONCAT(dname,_detach), \
- __CONCAT(dname,_activate), \
-}
+CFATTACH_DECL(USB_DNAME(dname), \
+ sizeof(struct ___CONCAT(dname,_softc)), \
+ ___CONCAT(dname,_match), \
+ ___CONCAT(dname,_attach), \
+ ___CONCAT(dname,_detach), \
+ ___CONCAT(dname,_activate))
#define USB_MATCH(dname) \
int __CONCAT(dname,_match)(struct device *parent, struct cfdata *match, void *aux)
@@ -262,7 +267,7 @@ struct cfdriver __CONCAT(dname,_cd) = { \
NULL, #dname, DV_DULL \
}; \
\
-struct cfattach __CONCAT(dname,_ca) = { \
+const struct cfattach __CONCAT(dname,_ca) = { \
sizeof(struct __CONCAT(dname,_softc)), \
__CONCAT(dname,_match), \
__CONCAT(dname,_attach), \
OpenPOWER on IntegriCloud