From 2ac2f51d824efe120d99dc51098b7d76a78e5996 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Tue, 8 May 2007 20:43:08 +0000 Subject: repair com/fxp foo_detach() stuff, the hardest part being the pccom mess --- sys/dev/cardbus/com_cardbus.c | 32 ++++++++++++++++++++++++-------- sys/dev/cardbus/if_fxp_cardbus.c | 6 +++--- 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 #include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include #include +#include #include #include #include +#include +#if defined(__sparc64__) || !defined(__sparc__) +#include +#endif + +#if !defined(__sparc__) || defined(__sparc64__) +#define COM_CONSOLE +#include +#endif + #include "com.h" #ifdef i386 #include "pccom.h" #endif #include -#if NPCCOM > 0 -#include -#endif -#if NCOM > 0 #include -#endif #include #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) { -- cgit v1.2.3