summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMarcus Glocker <mglocker@cvs.openbsd.org>2007-02-26 14:36:12 +0000
committerMarcus Glocker <mglocker@cvs.openbsd.org>2007-02-26 14:36:12 +0000
commit39a85438175c913a68cb8710860091f7b074ecc1 (patch)
tree19d6e2bc44d5fd9aa56924f7413a4d925f5229e6 /sys
parent2ba882e72fb0b0bfaa3935276e9787280a84820b (diff)
Some KNF.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/cardbus/if_bcw_cardbus.c40
-rw-r--r--sys/dev/pci/if_bcw_pci.c41
2 files changed, 39 insertions, 42 deletions
diff --git a/sys/dev/cardbus/if_bcw_cardbus.c b/sys/dev/cardbus/if_bcw_cardbus.c
index ab84a4a9466..296127b9b08 100644
--- a/sys/dev/cardbus/if_bcw_cardbus.c
+++ b/sys/dev/cardbus/if_bcw_cardbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bcw_cardbus.c,v 1.9 2007/02/26 14:14:02 mglocker Exp $ */
+/* $OpenBSD: if_bcw_cardbus.c,v 1.10 2007/02/26 14:36:11 mglocker Exp $ */
/*
* Copyright (c) 2006 Jon Simola <jsimola@gmail.com>
@@ -45,27 +45,27 @@
#include <dev/ic/bcwvar.h>
struct bcw_cardbus_softc {
- struct bcw_softc sc_bcw;
+ struct bcw_softc sc_bcw;
/* cardbus specific goo */
- cardbus_devfunc_t sc_ct;
- cardbustag_t sc_tag;
+ cardbus_devfunc_t sc_ct;
+ cardbustag_t sc_tag;
void *sc_ih;
- bus_size_t sc_mapsize;
- pcireg_t sc_bar_val;
- int sc_intrline;
+ bus_size_t sc_mapsize;
+ pcireg_t sc_bar_val;
+ int sc_intrline;
};
-int bcw_cardbus_match(struct device *, void *, void *);
-void bcw_cardbus_attach(struct device *, struct device *, void *);
-int bcw_cardbus_detach(struct device *, int);
-void bcw_cardbus_power(struct bcw_softc *, int);
-void bcw_cardbus_setup(struct bcw_cardbus_softc *);
-int bcw_cardbus_enable(struct bcw_softc *);
-void bcw_cardbus_disable(struct bcw_softc *);
-void bcw_cardbus_conf_write(struct bcw_softc *, u_int32_t, u_int32_t);
-u_int32_t bcw_cardbus_conf_read(struct bcw_softc *, u_int32_t);
+int bcw_cardbus_match(struct device *, void *, void *);
+void bcw_cardbus_attach(struct device *, struct device *, void *);
+int bcw_cardbus_detach(struct device *, int);
+void bcw_cardbus_power(struct bcw_softc *, int);
+void bcw_cardbus_setup(struct bcw_cardbus_softc *);
+int bcw_cardbus_enable(struct bcw_softc *);
+void bcw_cardbus_disable(struct bcw_softc *);
+void bcw_cardbus_conf_write(struct bcw_softc *, uint32_t, uint32_t);
+uint32_t bcw_cardbus_conf_read(struct bcw_softc *, uint32_t);
struct cfattach bcw_cardbus_ca = {
sizeof (struct bcw_cardbus_softc), bcw_cardbus_match,
@@ -258,13 +258,13 @@ bcw_cardbus_disable(struct bcw_softc *sc)
}
void
-bcw_cardbus_conf_write(struct bcw_softc *sc, u_int32_t reg, u_int32_t val)
+bcw_cardbus_conf_write(struct bcw_softc *sc, uint32_t reg, uint32_t val)
{
Cardbus_conf_write(sc->sc_ca.ca_ct, sc->sc_ca.ca_tag, reg, val);
}
-u_int32_t
-bcw_cardbus_conf_read(struct bcw_softc *sc, u_int32_t reg)
+uint32_t
+bcw_cardbus_conf_read(struct bcw_softc *sc, uint32_t reg)
{
- return Cardbus_conf_read(sc->sc_ca.ca_ct, sc->sc_ca.ca_tag, reg);
+ return (Cardbus_conf_read(sc->sc_ca.ca_ct, sc->sc_ca.ca_tag, reg));
}
diff --git a/sys/dev/pci/if_bcw_pci.c b/sys/dev/pci/if_bcw_pci.c
index 48eeb428604..2caa93e9b05 100644
--- a/sys/dev/pci/if_bcw_pci.c
+++ b/sys/dev/pci/if_bcw_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bcw_pci.c,v 1.11 2007/02/26 14:28:19 mglocker Exp $ */
+/* $OpenBSD: if_bcw_pci.c,v 1.12 2007/02/26 14:36:11 mglocker Exp $ */
/*
* Copyright (c) 2006 Jon Simola <jsimola@gmail.com>
@@ -81,30 +81,28 @@ const struct pci_matchid bcw_pci_devices[] = {
{ PCI_VENDOR_BROADCOM, PCI_PRODUCT_BROADCOM_BCM43XG }
};
-
struct bcw_pci_softc {
- struct bcw_softc psc_bcw; /* Real softc */
- pci_intr_handle_t psc_ih; /* interrupt handle */
+ struct bcw_softc psc_bcw; /* Real softc */
+ pci_intr_handle_t psc_ih; /* interrupt handle */
void *psc_intrcookie;
- pci_chipset_tag_t psc_pc; /* our PCI chipset */
- pcitag_t psc_pcitag; /* our PCI tag */
+ pci_chipset_tag_t psc_pc; /* our PCI chipset */
+ pcitag_t psc_pcitag; /* our PCI tag */
};
int bcw_pci_match(struct device *, void *, void *);
void bcw_pci_attach(struct device *, struct device *, void *);
-void bcw_pci_conf_write(struct bcw_softc *, u_int32_t, u_int32_t);
-u_int32_t bcw_pci_conf_read(struct bcw_softc *, u_int32_t);
+void bcw_pci_conf_write(struct bcw_softc *, uint32_t, uint32_t);
+uint32_t bcw_pci_conf_read(struct bcw_softc *, uint32_t);
struct cfattach bcw_pci_ca = {
sizeof(struct bcw_pci_softc), bcw_pci_match, bcw_pci_attach
};
-
int
bcw_pci_match(struct device *parent, void *match, void *aux)
{
- return pci_matchbyid((struct pci_attach_args *)aux, bcw_pci_devices,
- sizeof(bcw_pci_devices) / sizeof(bcw_pci_devices[0]));
+ return (pci_matchbyid((struct pci_attach_args *)aux, bcw_pci_devices,
+ sizeof(bcw_pci_devices) / sizeof(bcw_pci_devices[0])));
}
void
@@ -114,11 +112,11 @@ bcw_pci_attach(struct device *parent, struct device *self, void *aux)
struct bcw_softc *sc = &psc->psc_bcw;
struct pci_attach_args *pa = (struct pci_attach_args *)aux;
pci_chipset_tag_t pc = pa->pa_pc;
- pcireg_t memtype;
- bus_addr_t memaddr;
- bus_size_t memsize;
- int pmreg;
- pcireg_t pmode;
+ pcireg_t memtype;
+ bus_addr_t memaddr;
+ bus_size_t memsize;
+ int pmreg;
+ pcireg_t pmode;
psc->psc_pc = pa->pa_pc;
psc->psc_pcitag = pa->pa_tag;
@@ -211,24 +209,23 @@ bcw_pci_attach(struct device *parent, struct device *self, void *aux)
pci_conf_write(pa->pa_pc, pa->pa_tag,
PCI_COMMAND_STATUS_REG,
pci_conf_read(pa->pa_pc, pa->pa_tag,
- PCI_COMMAND_STATUS_REG)
+ PCI_COMMAND_STATUS_REG)
& ~PCI_STATUS_TARGET_TARGET_ABORT);
/*
* Finish the attach
*/
-
bcw_attach(sc);
}
void
-bcw_pci_conf_write(struct bcw_softc *sc, u_int32_t reg, u_int32_t val)
+bcw_pci_conf_write(struct bcw_softc *sc, uint32_t reg, uint32_t val)
{
pci_conf_write(sc->sc_pa.pa_pc, sc->sc_pa.pa_tag, reg, val);
}
-u_int32_t
-bcw_pci_conf_read(struct bcw_softc *sc, u_int32_t reg)
+uint32_t
+bcw_pci_conf_read(struct bcw_softc *sc, uint32_t reg)
{
- return pci_conf_read(sc->sc_pa.pa_pc, sc->sc_pa.pa_tag, reg);
+ return (pci_conf_read(sc->sc_pa.pa_pc, sc->sc_pa.pa_tag, reg));
}