Module Name: src Committed By: dyoung Date: Wed Feb 24 22:58:45 UTC 2010
Modified Files: src/sys/arch/dreamcast/dev/maple: mlcd.c Log Message: Use device_t, device_private(). To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/dreamcast/dev/maple/mlcd.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/dreamcast/dev/maple/mlcd.c diff -u src/sys/arch/dreamcast/dev/maple/mlcd.c:1.11 src/sys/arch/dreamcast/dev/maple/mlcd.c:1.12 --- src/sys/arch/dreamcast/dev/maple/mlcd.c:1.11 Wed Jun 11 14:55:30 2008 +++ src/sys/arch/dreamcast/dev/maple/mlcd.c Wed Feb 24 22:58:45 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: mlcd.c,v 1.11 2008/06/11 14:55:30 tsutsui Exp $ */ +/* $NetBSD: mlcd.c,v 1.12 2010/02/24 22:58:45 dyoung Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mlcd.c,v 1.11 2008/06/11 14:55:30 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mlcd.c,v 1.12 2010/02/24 22:58:45 dyoung Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -93,7 +93,7 @@ struct mlcd_softc { struct device sc_dev; - struct device *sc_parent; + device_t sc_parent; struct maple_unit *sc_unit; int sc_direction; enum mlcd_stat { @@ -148,9 +148,9 @@ #define MLCD_UNIT(dev) (minor(dev) >> 8) #define MLCD_MINOR(unit, part) (((unit) << 8) | (part)) -static int mlcdmatch(struct device *, struct cfdata *, void *); -static void mlcdattach(struct device *, struct device *, void *); -static int mlcddetach(struct device *, int); +static int mlcdmatch(device_t, struct cfdata *, void *); +static void mlcdattach(device_t, device_t, void *); +static int mlcddetach(device_t, int); static void mlcd_intr(void *, struct maple_response *, int, int); static void mlcd_printerror(const char *, uint32_t); static struct mlcd_buf *mlcd_buf_alloc(int /*dev*/, int /*flags*/); @@ -198,7 +198,7 @@ /* ARGSUSED */ static int -mlcdmatch(struct device *parent, struct cfdata *cf, void *aux) +mlcdmatch(device_t parent, struct cfdata *cf, void *aux) { struct maple_attach_args *ma = aux; @@ -206,9 +206,9 @@ } static void -mlcdattach(struct device *parent, struct device *self, void *aux) +mlcdattach(device_t parent, device_t self, void *aux) { - struct mlcd_softc *sc = (void *) self; + struct mlcd_softc *sc = device_private(self); struct maple_attach_args *ma = aux; int i; union { @@ -282,9 +282,9 @@ /* ARGSUSED1 */ static int -mlcddetach(struct device *self, int flags) +mlcddetach(device_t self, int flags) { - struct mlcd_softc *sc = (struct mlcd_softc *) self; + struct mlcd_softc *sc = device_private(self); struct mlcd_buf *bp; int minor_l, minor_h;