Module Name: src Committed By: chs Date: Mon Oct 29 12:59:44 UTC 2012
Modified Files: src/sys/dev/pci: coram.c Log Message: remove an unnecessary cast. use the standard name for the third arg to attach. adjust some whitespace. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/dev/pci/coram.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/pci/coram.c diff -u src/sys/dev/pci/coram.c:1.10 src/sys/dev/pci/coram.c:1.11 --- src/sys/dev/pci/coram.c:1.10 Mon Jan 30 19:41:18 2012 +++ src/sys/dev/pci/coram.c Mon Oct 29 12:59:43 2012 @@ -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 @@ coram_match(device_t parent, cfdata_t ma } 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 @@ coram_attach(device_t parent, device_t s 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 @@ coram_attach(device_t parent, device_t s 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 @@ coram_attach(device_t parent, device_t s 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 @@ coram_attach(device_t parent, device_t s // 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");