Module Name: src
Committed By: tsutsui
Date: Fri Jun 10 09:29:07 UTC 2011
Modified Files:
src/sys/arch/atari/vme: leo.c
Log Message:
- split device_t/softc
- struct proc -> struct lwp
XXX: this driver is not in the default kernels.
To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/atari/vme/leo.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/arch/atari/vme/leo.c
diff -u src/sys/arch/atari/vme/leo.c:1.17 src/sys/arch/atari/vme/leo.c:1.18
--- src/sys/arch/atari/vme/leo.c:1.17 Tue Apr 13 09:51:07 2010
+++ src/sys/arch/atari/vme/leo.c Fri Jun 10 09:29:07 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: leo.c,v 1.17 2010/04/13 09:51:07 tsutsui Exp $ */
+/* $NetBSD: leo.c,v 1.18 2011/06/10 09:29:07 tsutsui Exp $ */
/*-
* Copyright (c) 1997 maximum entropy <[email protected]>
@@ -47,7 +47,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: leo.c,v 1.17 2010/04/13 09:51:07 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: leo.c,v 1.18 2011/06/10 09:29:07 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -78,7 +78,7 @@
#define NLEOSTD (sizeof(leostd) / sizeof(leostd[0]))
struct leo_softc {
- struct device sc_dev; /* XXX what goes here? */
+ device_t sc_dev; /* XXX what goes here? */
bus_space_tag_t sc_iot;
bus_space_tag_t sc_memt;
bus_space_handle_t sc_ioh;
@@ -90,15 +90,15 @@
#define LEO_SC_FLAGS_INUSE 1
-static int leo_match(struct device *, struct cfdata *, void *);
-static void leo_attach(struct device *, struct device *, void *);
+static int leo_match(device_t, cfdata_t, void *);
+static void leo_attach(device_t, device_t, void *);
static int leo_probe(bus_space_tag_t *, bus_space_tag_t *,
bus_space_handle_t *, bus_space_handle_t *,
u_int, u_int);
static int leo_init(struct leo_softc *, int);
static int leo_scroll(struct leo_softc *, int);
-CFATTACH_DECL(leo, sizeof(struct leo_softc),
+CFATTACH_DECL_NEW(leo, sizeof(struct leo_softc),
leo_match, leo_attach, NULL, NULL);
dev_type_open(leoopen);
@@ -113,7 +113,7 @@
};
static int
-leo_match(struct device *parent, struct cfdata *cfp, void *aux)
+leo_match(device_t parent, cfdata_t cf, void *aux)
{
struct vme_attach_args *va = aux;
int i;
@@ -205,9 +205,9 @@
}
static void
-leo_attach(struct device *parent, struct device *self, void *aux)
+leo_attach(device_t parent, device_t self, void *aux)
{
- struct leo_softc *sc = (struct leo_softc *)self;
+ struct leo_softc *sc = device_private(self);
struct vme_attach_args *va = aux;
bus_space_handle_t ioh;
bus_space_handle_t memh;
@@ -215,6 +215,8 @@
int i;
#endif
+ sc->sc_dev = self;
+
printf("\n");
if (bus_space_map(va->va_iot, va->va_iobase, va->va_iosize, 0, &ioh))
panic("leo_attach: cannot map io area");
@@ -239,7 +241,7 @@
}
int
-leoopen(dev_t dev, int flags, int devtype, struct proc *p)
+leoopen(dev_t dev, int flags, int devtype, struct lwp *l)
{
struct leo_softc *sc;
int r;
@@ -328,7 +330,7 @@
}
int
-leoclose(dev_t dev, int flags, int devtype, struct proc *p)
+leoclose(dev_t dev, int flags, int devtype, struct lwp *l)
{
struct leo_softc *sc;
@@ -372,7 +374,7 @@
}
int
-leoioctl(dev_t dev, u_long cmd, void *data, int flags, struct proc *p)
+leoioctl(dev_t dev, u_long cmd, void *data, int flags, struct lwp *l)
{
struct leo_softc *sc;