Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev make joy code consistent (avoid games with pointers)...
details: https://anonhg.NetBSD.org/src/rev/38633038aedf
branches: trunk
changeset: 771883:38633038aedf
user: christos <christos%NetBSD.org@localhost>
date: Mon Dec 05 19:20:54 2011 +0000
description:
make joy code consistent (avoid games with pointers), and fix the isa softc
declaration
diffstat:
sys/dev/isa/joy_isa.c | 8 ++++----
sys/dev/isapnp/joy_isapnp.c | 6 +++---
sys/dev/pci/joy_pci.c | 6 +++---
3 files changed, 10 insertions(+), 10 deletions(-)
diffs (93 lines):
diff -r 1df06900161b -r 38633038aedf sys/dev/isa/joy_isa.c
--- a/sys/dev/isa/joy_isa.c Mon Dec 05 15:04:27 2011 +0000
+++ b/sys/dev/isa/joy_isa.c Mon Dec 05 19:20:54 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: joy_isa.c,v 1.13 2011/11/23 23:07:32 jmcneill Exp $ */
+/* $NetBSD: joy_isa.c,v 1.14 2011/12/05 19:20:54 christos Exp $ */
/*-
* Copyright (c) 1995 Jean-Marc Zucconi
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: joy_isa.c,v 1.13 2011/11/23 23:07:32 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: joy_isa.c,v 1.14 2011/12/05 19:20:54 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -49,7 +49,7 @@
#define JOY_NPORTS 1
struct joy_isa_softc {
- struct joy_softc *sc;
+ struct joy_softc sc_joy;
kmutex_t sc_lock;
};
@@ -101,8 +101,8 @@
static void
joy_isa_attach(device_t parent, device_t self, void *aux)
{
- struct joy_softc *sc = device_private(self);
struct joy_isa_softc *isc = device_private(self);
+ struct joy_softc *sc = &isc->sc_joy;
struct isa_attach_args *ia = aux;
aprint_normal("\n");
diff -r 1df06900161b -r 38633038aedf sys/dev/isapnp/joy_isapnp.c
--- a/sys/dev/isapnp/joy_isapnp.c Mon Dec 05 15:04:27 2011 +0000
+++ b/sys/dev/isapnp/joy_isapnp.c Mon Dec 05 19:20:54 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: joy_isapnp.c,v 1.13 2011/11/23 23:07:33 jmcneill Exp $ */
+/* $NetBSD: joy_isapnp.c,v 1.14 2011/12/05 19:20:54 christos Exp $ */
/*-
* Copyright (c) 1996, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: joy_isapnp.c,v 1.13 2011/11/23 23:07:33 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: joy_isapnp.c,v 1.14 2011/12/05 19:20:54 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -71,8 +71,8 @@
static void
joy_isapnp_attach(device_t parent, device_t self, void *aux)
{
- struct joy_softc *sc = device_private(self);
struct joy_isapnp_softc *isc = device_private(self);
+ struct joy_softc *sc = &isc->sc_joy;
struct isapnp_attach_args *ipa = aux;
bus_space_handle_t ioh;
diff -r 1df06900161b -r 38633038aedf sys/dev/pci/joy_pci.c
--- a/sys/dev/pci/joy_pci.c Mon Dec 05 15:04:27 2011 +0000
+++ b/sys/dev/pci/joy_pci.c Mon Dec 05 19:20:54 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: joy_pci.c,v 1.18 2011/11/23 23:07:35 jmcneill Exp $ */
+/* $NetBSD: joy_pci.c,v 1.19 2011/12/05 19:20:55 christos Exp $ */
/*-
* Copyright (c) 2000, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: joy_pci.c,v 1.18 2011/11/23 23:07:35 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: joy_pci.c,v 1.19 2011/12/05 19:20:55 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -88,8 +88,8 @@
static void
joy_pci_attach(device_t parent, device_t self, void *aux)
{
- struct joy_softc *sc = device_private(self);
struct joy_pci_softc *psc = device_private(self);
+ struct joy_softc *sc = &psc->sc_joy;
struct pci_attach_args *pa = aux;
char devinfo[256];
bus_size_t mapsize;
Home |
Main Index |
Thread Index |
Old Index