Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump/dev use config_init_component()
details: https://anonhg.NetBSD.org/src/rev/cca72b2a9467
branches: trunk
changeset: 753391:cca72b2a9467
user: pooka <pooka%NetBSD.org@localhost>
date: Thu Mar 25 19:54:08 2010 +0000
description:
use config_init_component()
diffstat:
sys/rump/dev/lib/libubt/ubt_at_usb.c | 17 +------------
sys/rump/dev/lib/libucom/ucom_at_usb.c | 24 ++-----------------
sys/rump/dev/lib/libugenhc/ugenhc_at_mainbus.c | 15 ++---------
sys/rump/dev/lib/libulpt/ulpt_at_usb.c | 15 ++---------
sys/rump/dev/lib/libumass/sd_at_scsibus_at_umass.c | 27 ++-------------------
sys/rump/dev/lib/libusb/usb_at_ugenhc.c | 17 +------------
sys/rump/dev/lib/libwscons/component.c | 18 ++------------
sys/rump/dev/wip/libukbd/ukbd_at_usb.c | 21 ++--------------
sys/rump/dev/wip/libums/ums_at_usb.c | 18 ++------------
9 files changed, 25 insertions(+), 147 deletions(-)
diffs (truncated from 334 to 300 lines):
diff -r 12986c8aaf31 -r cca72b2a9467 sys/rump/dev/lib/libubt/ubt_at_usb.c
--- a/sys/rump/dev/lib/libubt/ubt_at_usb.c Thu Mar 25 19:39:05 2010 +0000
+++ b/sys/rump/dev/lib/libubt/ubt_at_usb.c Thu Mar 25 19:54:08 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ubt_at_usb.c,v 1.2 2010/03/22 14:47:02 pooka Exp $ */
+/* $NetBSD: ubt_at_usb.c,v 1.3 2010/03/25 19:54:08 pooka Exp $ */
#include <sys/param.h>
#include <sys/types.h>
@@ -11,21 +11,8 @@
#include "rump_private.h"
#include "rump_dev_private.h"
-#define FLAWLESSCALL(call) \
-do { \
- int att_error; \
- if ((att_error = call) != 0) \
- panic("\"%s\" failed", #call); \
-} while (/*CONSTCOND*/0)
-
RUMP_COMPONENT(RUMP_COMPONENT_DEV)
{
- FLAWLESSCALL(config_cfdata_attach(cfdata_ubt, 0));
-
- FLAWLESSCALL(config_cfdriver_attach(&ubt_cd));
- FLAWLESSCALL(config_cfattach_attach("ubt", &ubt_ca));
-
- FLAWLESSCALL(config_cfdriver_attach(&bthub_cd));
- FLAWLESSCALL(config_cfattach_attach("bthub", &bthub_ca));
+ config_init_component(cfdriver_comp_ubt, cfattach_comp_ubt, cfdata_ubt);
}
diff -r 12986c8aaf31 -r cca72b2a9467 sys/rump/dev/lib/libucom/ucom_at_usb.c
--- a/sys/rump/dev/lib/libucom/ucom_at_usb.c Thu Mar 25 19:39:05 2010 +0000
+++ b/sys/rump/dev/lib/libucom/ucom_at_usb.c Thu Mar 25 19:54:08 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ucom_at_usb.c,v 1.5 2010/03/08 10:24:37 pooka Exp $ */
+/* $NetBSD: ucom_at_usb.c,v 1.6 2010/03/25 19:54:08 pooka Exp $ */
#include <sys/param.h>
#include <sys/types.h>
@@ -13,13 +13,6 @@
#include "rump_dev_private.h"
#include "rump_vfs_private.h"
-#define FLAWLESSCALL(call) \
-do { \
- int att_error; \
- if ((att_error = call) != 0) \
- panic("\"%s\" failed", #call); \
-} while (/*CONSTCOND*/0)
-
void tty_init(void);
RUMP_COMPONENT(RUMP_COMPONENT_DEV)
@@ -27,19 +20,8 @@
extern struct cdevsw ucom_cdevsw;
devmajor_t cmaj, bmaj;
- FLAWLESSCALL(config_cfdata_attach(cfdata_ucom, 0));
-
- FLAWLESSCALL(config_cfdriver_attach(&uplcom_cd));
- FLAWLESSCALL(config_cfattach_attach("uplcom", &uplcom_ca));
-
- FLAWLESSCALL(config_cfdriver_attach(&u3ginit_cd));
- FLAWLESSCALL(config_cfattach_attach("u3ginit", &u3ginit_ca));
-
- FLAWLESSCALL(config_cfdriver_attach(&u3g_cd));
- FLAWLESSCALL(config_cfattach_attach("u3g", &u3g_ca));
-
- FLAWLESSCALL(config_cfdriver_attach(&ucom_cd));
- FLAWLESSCALL(config_cfattach_attach("ucom", &ucom_ca));
+ config_init_component(cfdriver_comp_ucom,
+ cfattach_comp_ucom, cfdata_ucom);
bmaj = cmaj = -1;
FLAWLESSCALL(devsw_attach("ucom", NULL, &bmaj, &ucom_cdevsw, &cmaj));
diff -r 12986c8aaf31 -r cca72b2a9467 sys/rump/dev/lib/libugenhc/ugenhc_at_mainbus.c
--- a/sys/rump/dev/lib/libugenhc/ugenhc_at_mainbus.c Thu Mar 25 19:39:05 2010 +0000
+++ b/sys/rump/dev/lib/libugenhc/ugenhc_at_mainbus.c Thu Mar 25 19:54:08 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ugenhc_at_mainbus.c,v 1.1 2010/03/08 10:24:37 pooka Exp $ */
+/* $NetBSD: ugenhc_at_mainbus.c,v 1.2 2010/03/25 19:54:08 pooka Exp $ */
#include <sys/param.h>
#include <sys/types.h>
@@ -12,20 +12,11 @@
#include "rump_private.h"
#include "rump_dev_private.h"
-#define FLAWLESSCALL(call) \
-do { \
- int att_error; \
- if ((att_error = call) != 0) \
- panic("\"%s\" failed", #call); \
-} while (/*CONSTCOND*/0)
-
void tty_init(void);
RUMP_COMPONENT(RUMP_COMPONENT_DEV)
{
- FLAWLESSCALL(config_cfdata_attach(cfdata_ugenhc, 0));
-
- FLAWLESSCALL(config_cfdriver_attach(&ugenhc_cd));
- FLAWLESSCALL(config_cfattach_attach("ugenhc", &ugenhc_ca));
+ config_init_component(cfdriver_comp_ugenhc,
+ cfattach_comp_ugenhc, cfdata_ugenhc);
}
diff -r 12986c8aaf31 -r cca72b2a9467 sys/rump/dev/lib/libulpt/ulpt_at_usb.c
--- a/sys/rump/dev/lib/libulpt/ulpt_at_usb.c Thu Mar 25 19:39:05 2010 +0000
+++ b/sys/rump/dev/lib/libulpt/ulpt_at_usb.c Thu Mar 25 19:54:08 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ulpt_at_usb.c,v 1.3 2010/03/08 10:30:17 pooka Exp $ */
+/* $NetBSD: ulpt_at_usb.c,v 1.4 2010/03/25 19:54:08 pooka Exp $ */
#include <sys/param.h>
#include <sys/conf.h>
@@ -12,22 +12,13 @@
#include "rump_dev_private.h"
#include "rump_vfs_private.h"
-#define FLAWLESSCALL(call) \
-do { \
- int att_error; \
- if ((att_error = call) != 0) \
- panic("\"%s\" failed", #call); \
-} while (/*CONSTCOND*/0)
-
RUMP_COMPONENT(RUMP_COMPONENT_DEV)
{
extern struct cdevsw ulpt_cdevsw;
devmajor_t bmaj, cmaj;
- FLAWLESSCALL(config_cfdata_attach(cfdata_ulpt, 0));
-
- FLAWLESSCALL(config_cfdriver_attach(&ulpt_cd));
- FLAWLESSCALL(config_cfattach_attach("ulpt", &ulpt_ca));
+ config_init_component(cfdriver_comp_ulpt,
+ cfattach_comp_ulpt, cfdata_ulpt);
bmaj = cmaj = -1;
FLAWLESSCALL(devsw_attach("ulpt", NULL, &bmaj, &ulpt_cdevsw, &cmaj));
diff -r 12986c8aaf31 -r cca72b2a9467 sys/rump/dev/lib/libumass/sd_at_scsibus_at_umass.c
--- a/sys/rump/dev/lib/libumass/sd_at_scsibus_at_umass.c Thu Mar 25 19:39:05 2010 +0000
+++ b/sys/rump/dev/lib/libumass/sd_at_scsibus_at_umass.c Thu Mar 25 19:54:08 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sd_at_scsibus_at_umass.c,v 1.3 2010/03/08 10:24:37 pooka Exp $ */
+/* $NetBSD: sd_at_scsibus_at_umass.c,v 1.4 2010/03/25 19:54:08 pooka Exp $ */
#include <sys/param.h>
#include <sys/conf.h>
@@ -12,13 +12,6 @@
#include "rump_dev_private.h"
#include "rump_vfs_private.h"
-#define FLAWLESSCALL(call) \
-do { \
- int att_error; \
- if ((att_error = call) != 0) \
- panic("\"%s\" failed", #call); \
-} while (/*CONSTCOND*/0)
-
RUMP_COMPONENT(RUMP_COMPONENT_DEV)
{
extern struct cfattach umass_ca;
@@ -27,22 +20,8 @@
extern struct cdevsw sd_cdevsw, cd_cdevsw;
devmajor_t bmaj, cmaj;
- FLAWLESSCALL(config_cfdata_attach(cfdata_umass, 0));
-
- FLAWLESSCALL(config_cfdriver_attach(&umass_cd));
- FLAWLESSCALL(config_cfattach_attach("umass", &umass_ca));
-
- FLAWLESSCALL(config_cfdriver_attach(&scsibus_cd));
- FLAWLESSCALL(config_cfattach_attach("scsibus", &scsibus_ca));
-
- FLAWLESSCALL(config_cfdriver_attach(&atapibus_cd));
- FLAWLESSCALL(config_cfattach_attach("atapibus", &atapibus_ca));
-
- FLAWLESSCALL(config_cfdriver_attach(&sd_cd));
- FLAWLESSCALL(config_cfattach_attach("sd", &sd_ca));
-
- FLAWLESSCALL(config_cfdriver_attach(&cd_cd));
- FLAWLESSCALL(config_cfattach_attach("cd", &cd_ca));
+ config_init_component(cfdriver_comp_umass,
+ cfattach_comp_umass, cfdata_umass);
bmaj = cmaj = -1;
FLAWLESSCALL(devsw_attach("sd", &sd_bdevsw, &bmaj, &sd_cdevsw, &cmaj));
diff -r 12986c8aaf31 -r cca72b2a9467 sys/rump/dev/lib/libusb/usb_at_ugenhc.c
--- a/sys/rump/dev/lib/libusb/usb_at_ugenhc.c Thu Mar 25 19:39:05 2010 +0000
+++ b/sys/rump/dev/lib/libusb/usb_at_ugenhc.c Thu Mar 25 19:54:08 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: usb_at_ugenhc.c,v 1.1 2010/03/08 10:24:37 pooka Exp $ */
+/* $NetBSD: usb_at_ugenhc.c,v 1.2 2010/03/25 19:54:08 pooka Exp $ */
#include <sys/param.h>
#include <sys/types.h>
@@ -12,23 +12,10 @@
#include "rump_private.h"
#include "rump_dev_private.h"
-#define FLAWLESSCALL(call) \
-do { \
- int att_error; \
- if ((att_error = call) != 0) \
- panic("\"%s\" failed", #call); \
-} while (/*CONSTCOND*/0)
-
void tty_init(void);
RUMP_COMPONENT(RUMP_COMPONENT_DEV)
{
- FLAWLESSCALL(config_cfdata_attach(cfdata_usb, 0));
-
- FLAWLESSCALL(config_cfdriver_attach(&usb_cd));
- FLAWLESSCALL(config_cfattach_attach("usb", &usb_ca));
-
- FLAWLESSCALL(config_cfdriver_attach(&uhub_cd));
- FLAWLESSCALL(config_cfattach_attach("uhub", &uroothub_ca));
+ config_init_component(cfdriver_comp_usb, cfattach_comp_usb, cfdata_usb);
}
diff -r 12986c8aaf31 -r cca72b2a9467 sys/rump/dev/lib/libwscons/component.c
--- a/sys/rump/dev/lib/libwscons/component.c Thu Mar 25 19:39:05 2010 +0000
+++ b/sys/rump/dev/lib/libwscons/component.c Thu Mar 25 19:54:08 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: component.c,v 1.3 2010/03/08 10:54:21 pooka Exp $ */
+/* $NetBSD: component.c,v 1.4 2010/03/25 19:54:08 pooka Exp $ */
#include <sys/param.h>
#include <sys/conf.h>
@@ -12,25 +12,13 @@
#include "rump_dev_private.h"
#include "rump_vfs_private.h"
-#define FLAWLESSCALL(call) \
-do { \
- int att_error; \
- if ((att_error = call) != 0) \
- panic("\"%s\" failed", #call); \
-} while (/*CONSTCOND*/0)
-
RUMP_COMPONENT(RUMP_COMPONENT_DEV)
{
extern struct cdevsw wskbd_cdevsw, wsmouse_cdevsw;
devmajor_t bmaj, cmaj;
- FLAWLESSCALL(config_cfdata_attach(cfdata_wscons, 0));
-
- FLAWLESSCALL(config_cfdriver_attach(&wskbd_cd));
- FLAWLESSCALL(config_cfattach_attach("wskbd", &wskbd_ca));
-
- FLAWLESSCALL(config_cfdriver_attach(&wsmouse_cd));
- FLAWLESSCALL(config_cfattach_attach("wsmouse", &wsmouse_ca));
+ config_init_component(cfdriver_comp_wscons,
+ cfattach_comp_wscons, cfdata_wscons);
bmaj = cmaj = -1;
FLAWLESSCALL(devsw_attach("wskbd", NULL, &bmaj, &wskbd_cdevsw, &cmaj));
diff -r 12986c8aaf31 -r cca72b2a9467 sys/rump/dev/wip/libukbd/ukbd_at_usb.c
--- a/sys/rump/dev/wip/libukbd/ukbd_at_usb.c Thu Mar 25 19:39:05 2010 +0000
+++ b/sys/rump/dev/wip/libukbd/ukbd_at_usb.c Thu Mar 25 19:54:08 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ukbd_at_usb.c,v 1.4 2010/03/08 10:57:25 pooka Exp $ */
+/* $NetBSD: ukbd_at_usb.c,v 1.5 2010/03/25 19:54:08 pooka Exp $ */
#include <sys/param.h>
#include <sys/conf.h>
@@ -7,27 +7,12 @@
#include "ioconf.c"
-#include <sys/stat.h>
-
#include "rump_private.h"
#include "rump_dev_private.h"
-#include "rump_vfs_private.h"
-
-#define FLAWLESSCALL(call) \
-do { \
- int att_error; \
- if ((att_error = call) != 0) \
- panic("\"%s\" failed", #call); \
-} while (/*CONSTCOND*/0)
RUMP_COMPONENT(RUMP_COMPONENT_DEV)
{
- FLAWLESSCALL(config_cfdata_attach(cfdata_ukbd, 0));
-
- FLAWLESSCALL(config_cfdriver_attach(&uhidev_cd));
- FLAWLESSCALL(config_cfattach_attach("uhidev", &uhidev_ca));
-
- FLAWLESSCALL(config_cfdriver_attach(&ukbd_cd));
- FLAWLESSCALL(config_cfattach_attach("ukbd", &ukbd_ca));
+ config_init_component(cfdriver_comp_ukbd,
+ cfattach_comp_ukbd, cfdata_ukbd);
Home |
Main Index |
Thread Index |
Old Index