summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2007-05-08 20:43:08 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2007-05-08 20:43:08 +0000
commit2ac2f51d824efe120d99dc51098b7d76a78e5996 (patch)
tree5cfc8272c2f57a1c27592e84d3311aceee529a1e
parentbfb8d33073f1def18a887dd4edb529f97e36c49f (diff)
repair com/fxp foo_detach() stuff, the hardest part being the pccom mess
-rw-r--r--sys/dev/cardbus/com_cardbus.c32
-rw-r--r--sys/dev/cardbus/if_fxp_cardbus.c6
2 files changed, 27 insertions, 11 deletions
diff --git a/sys/dev/cardbus/com_cardbus.c b/sys/dev/cardbus/com_cardbus.c
index afc5f2d6608..fb3b1ad3a2e 100644
--- a/sys/dev/cardbus/com_cardbus.c
+++ b/sys/dev/cardbus/com_cardbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: com_cardbus.c,v 1.27 2007/05/08 20:33:07 deraadt Exp $ */
+/* $OpenBSD: com_cardbus.c,v 1.28 2007/05/08 20:43:07 deraadt Exp $ */
/* $NetBSD: com_cardbus.c,v 1.4 2000/04/17 09:21:59 joda Exp $ */
/*
@@ -48,26 +48,41 @@
#include <sys/param.h>
#include <sys/systm.h>
+#include <sys/ioctl.h>
+#include <sys/selinfo.h>
#include <sys/tty.h>
+#include <sys/proc.h>
+#include <sys/user.h>
+#include <sys/conf.h>
+#include <sys/file.h>
+#include <sys/uio.h>
+#include <sys/kernel.h>
+#include <sys/syslog.h>
#include <sys/device.h>
+#include <sys/vnode.h>
#include <dev/cardbus/cardbusvar.h>
#include <dev/pci/pcidevs.h>
#include <dev/pcmcia/pcmciareg.h>
+#include <machine/bus.h>
+#if defined(__sparc64__) || !defined(__sparc__)
+#include <machine/intr.h>
+#endif
+
+#if !defined(__sparc__) || defined(__sparc64__)
+#define COM_CONSOLE
+#include <dev/cons.h>
+#endif
+
#include "com.h"
#ifdef i386
#include "pccom.h"
#endif
#include <dev/ic/comreg.h>
-#if NPCCOM > 0
-#include <i386/isa/pccomvar.h>
-#endif
-#if NCOM > 0
#include <dev/ic/comvar.h>
-#endif
#include <dev/ic/ns16550reg.h>
#define com_lcr com_cfcr
@@ -371,6 +386,9 @@ com_cardbus_disable(struct com_softc *sc)
Cardbus_function_disable(csc->cc_ct);
}
+int com_detach(struct device *, int);
+int comopen(dev_t dev, int flag, int mode, struct proc *p);
+
int
com_detach(self, flags)
struct device *self;
@@ -410,8 +428,6 @@ com_detach(self, flags)
return (0);
}
-int com_detach(struct device *, int);
-
int
com_cardbus_detach(struct device *self, int flags)
{
diff --git a/sys/dev/cardbus/if_fxp_cardbus.c b/sys/dev/cardbus/if_fxp_cardbus.c
index 1a3f97dc964..b70ca56fd5f 100644
--- a/sys/dev/cardbus/if_fxp_cardbus.c
+++ b/sys/dev/cardbus/if_fxp_cardbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_fxp_cardbus.c,v 1.19 2007/05/08 20:33:07 deraadt Exp $ */
+/* $OpenBSD: if_fxp_cardbus.c,v 1.20 2007/05/08 20:43:07 deraadt Exp $ */
/* $NetBSD: if_fxp_cardbus.c,v 1.12 2000/05/08 18:23:36 thorpej Exp $ */
/*
@@ -226,6 +226,8 @@ fxp_cardbus_setup(struct fxp_softc *sc)
cardbus_conf_write(cc, cf, csc->ct_tag, CARDBUS_COMMAND_STATUS_REG, command);
}
+int fxp_detach(struct fxp_softc *);
+
int
fxp_detach(struct fxp_softc *sc)
{
@@ -252,8 +254,6 @@ fxp_detach(struct fxp_softc *sc)
return (0);
}
-int fxp_detach(struct fxp_softc *);
-
int
fxp_cardbus_detach(struct device *self, int flags)
{