summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorjmcneill <jmcneill@NetBSD.org>2008-03-27 12:14:54 +0000
committerjmcneill <jmcneill@NetBSD.org>2008-03-27 12:14:54 +0000
commit0a866f575478a06d2437b2e43eb5236f042f92d0 (patch)
treec76e2b6ec59799c33e3d89189ec3526ff6774a78 /sys/dev
parent3e2ac0a3707c3aa16763bb79000718c21462f440 (diff)
Use device_t, cfdata_t
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/i2c/xbseeprom.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/sys/dev/i2c/xbseeprom.c b/sys/dev/i2c/xbseeprom.c
index 95734ed324e..c53683a8cf3 100644
--- a/sys/dev/i2c/xbseeprom.c
+++ b/sys/dev/i2c/xbseeprom.c
@@ -1,4 +1,4 @@
-/* $NetBSD: xbseeprom.c,v 1.2 2008/03/27 12:08:37 jmcneill Exp $ */
+/* $NetBSD: xbseeprom.c,v 1.3 2008/03/27 12:14:54 jmcneill Exp $ */
/*-
* Copyright (c) 2007, 2008 Jared D. McNeill <jmcneill@invisible.ca>
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xbseeprom.c,v 1.2 2008/03/27 12:08:37 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xbseeprom.c,v 1.3 2008/03/27 12:14:54 jmcneill Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -50,8 +50,8 @@ __KERNEL_RCSID(0, "$NetBSD: xbseeprom.c,v 1.2 2008/03/27 12:08:37 jmcneill Exp $
#include <dev/i2c/i2cvar.h>
-static int xbseeprom_match(struct device *, struct cfdata *, void *);
-static void xbseeprom_attach(struct device *, struct device *, void *);
+static int xbseeprom_match(device_t, cfdata_t, void *);
+static void xbseeprom_attach(device_t, device_t, void *);
struct xbseeprom_data {
/* factory settings */
@@ -111,11 +111,9 @@ CFATTACH_DECL(xbseeprom, sizeof(struct xbseeprom_softc),
xbseeprom_match, xbseeprom_attach, NULL, NULL);
static int
-xbseeprom_match(struct device *parent, struct cfdata *cf, void *opaque)
+xbseeprom_match(device_t parent, cfdata_t cf, void *opaque)
{
- struct i2c_attach_args *ia;
-
- ia = (struct i2c_attach_args *)opaque;
+ struct i2c_attach_args *ia = opaque;
/* Serial EEPROM always lives at 0x54 on Xbox */
if (ia->ia_addr == 0x54)
@@ -125,15 +123,13 @@ xbseeprom_match(struct device *parent, struct cfdata *cf, void *opaque)
}
static void
-xbseeprom_attach(struct device *parent, struct device *self, void *opaque)
+xbseeprom_attach(device_t parent, device_t self, void *opaque)
{
struct xbseeprom_softc *sc = device_private(self);
- struct i2c_attach_args *ia;
+ struct i2c_attach_args *ia = opaque;
uint8_t *ptr;
int i;
- ia = (struct i2c_attach_args *)opaque;
-
sc->sc_dev = self;
sc->sc_tag = ia->ia_tag;
sc->sc_addr = ia->ia_addr;