Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/dreamcast/dev/maple Use device_t, device_private().
details: https://anonhg.NetBSD.org/src/rev/c9e3d1af2cef
branches: trunk
changeset: 752387:c9e3d1af2cef
user: dyoung <dyoung%NetBSD.org@localhost>
date: Wed Feb 24 22:58:45 2010 +0000
description:
Use device_t, device_private().
diffstat:
sys/arch/dreamcast/dev/maple/mlcd.c | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)
diffs (73 lines):
diff -r 5f9c0a258d00 -r c9e3d1af2cef sys/arch/dreamcast/dev/maple/mlcd.c
--- a/sys/arch/dreamcast/dev/maple/mlcd.c Wed Feb 24 22:37:54 2010 +0000
+++ b/sys/arch/dreamcast/dev/maple/mlcd.c Wed Feb 24 22:58:45 2010 +0000
@@ -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;
Home |
Main Index |
Thread Index |
Old Index