Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci remove an unnecessary cast.
details: https://anonhg.NetBSD.org/src/rev/c6eb923b9f8e
branches: trunk
changeset: 782341:c6eb923b9f8e
user: chs <chs%NetBSD.org@localhost>
date: Mon Oct 29 12:59:43 2012 +0000
description:
remove an unnecessary cast.
use the standard name for the third arg to attach.
adjust some whitespace.
diffstat:
sys/dev/pci/coram.c | 21 +++++++++++----------
1 files changed, 11 insertions(+), 10 deletions(-)
diffs (72 lines):
diff -r ce63005c49fe -r c6eb923b9f8e sys/dev/pci/coram.c
--- a/sys/dev/pci/coram.c Mon Oct 29 12:55:41 2012 +0000
+++ b/sys/dev/pci/coram.c Mon Oct 29 12:59:43 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: coram.c,v 1.10 2012/01/30 19:41:18 drochner Exp $ */
+/* $NetBSD: coram.c,v 1.11 2012/10/29 12:59:43 chs Exp $ */
/*
* Copyright (c) 2008, 2011 Jonathan A. Kollasch
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: coram.c,v 1.10 2012/01/30 19:41:18 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: coram.c,v 1.11 2012/10/29 12:59:43 chs Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -157,10 +157,10 @@
}
static void
-coram_attach(device_t parent, device_t self, void *v)
+coram_attach(device_t parent, device_t self, void *aux)
{
struct coram_softc *sc = device_private(self);
- const struct pci_attach_args *pa = v;
+ const struct pci_attach_args *pa = aux;
pci_intr_handle_t ih;
pcireg_t reg;
const char *intrstr;
@@ -193,8 +193,7 @@
return;
}
intrstr = pci_intr_string(pa->pa_pc, ih);
- sc->sc_ih = pci_intr_establish(pa->pa_pc, ih, IPL_VM,
- coram_intr, (void *)self);
+ sc->sc_ih = pci_intr_establish(pa->pa_pc, ih, IPL_VM, coram_intr, self);
if (sc->sc_ih == NULL) {
aprint_error_dev(self, "couldn't establish interrupt");
if (intrstr != NULL)
@@ -214,7 +213,8 @@
cic = &sc->sc_iic[i];
cic->cic_sc = sc;
- if(bus_space_subregion(sc->sc_memt, sc->sc_memh, I2C_BASE + (I2C_SIZE * i), I2C_SIZE, &cic->cic_regh))
+ if (bus_space_subregion(sc->sc_memt, sc->sc_memh,
+ I2C_BASE + (I2C_SIZE * i), I2C_SIZE, &cic->cic_regh))
panic("failed to subregion i2c");
mutex_init(&cic->cic_busmutex, MUTEX_DRIVER, IPL_NONE);
@@ -228,8 +228,8 @@
memset(&iba, 0, sizeof(iba));
iba.iba_tag = &cic->cic_i2c;
iba.iba_type = I2C_TYPE_SMBUS;
- cic->cic_i2cdev = config_found_ia(self, "i2cbus",
- &iba, iicbus_print);
+ cic->cic_i2cdev = config_found_ia(self, "i2cbus", &iba,
+ iicbus_print);
#endif
}
@@ -251,7 +251,8 @@
// seeprom_bootstrap_read(&sc->sc_i2c, 0x50, 0, 256, foo, 256);
iic_acquire_bus(&sc->sc_i2c, I2C_F_POLL);
- iic_exec(&sc->sc_i2c, I2C_OP_READ_WITH_STOP, 0x50, &bar, 1, foo, 256, I2C_F_POLL);
+ iic_exec(&sc->sc_i2c, I2C_OP_READ_WITH_STOP, 0x50, &bar, 1, foo, 256,
+ I2C_F_POLL);
iic_release_bus(&sc->sc_i2c, I2C_F_POLL);
printf("\n");
Home |
Main Index |
Thread Index |
Old Index