Constify pci_attach_args.

This commit is contained in:
dyoung 2011-05-11 00:12:41 +00:00
parent 25441706c1
commit e778d5fdd6
2 changed files with 10 additions and 10 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: chipsfb.c,v 1.28 2011/04/05 23:25:00 dyoung Exp $ */ /* $NetBSD: chipsfb.c,v 1.29 2011/05/11 00:12:41 dyoung Exp $ */
/* /*
* Copyright (c) 2006 Michael Lorenz * Copyright (c) 2006 Michael Lorenz
@ -31,7 +31,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: chipsfb.c,v 1.28 2011/04/05 23:25:00 dyoung Exp $"); __KERNEL_RCSID(0, "$NetBSD: chipsfb.c,v 1.29 2011/05/11 00:12:41 dyoung Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <sys/systm.h> #include <sys/systm.h>
@ -69,7 +69,7 @@ CFATTACH_DECL_NEW(chipsfb_pci, sizeof(struct chipsfb_pci_softc),
static int static int
chipsfb_pci_match(device_t parent, cfdata_t match, void *aux) chipsfb_pci_match(device_t parent, cfdata_t match, void *aux)
{ {
struct pci_attach_args *pa = (struct pci_attach_args *)aux; const struct pci_attach_args *pa = (const struct pci_attach_args *)aux;
if (PCI_CLASS(pa->pa_class) != PCI_CLASS_DISPLAY || if (PCI_CLASS(pa->pa_class) != PCI_CLASS_DISPLAY ||
PCI_SUBCLASS(pa->pa_class) != PCI_SUBCLASS_DISPLAY_VGA) PCI_SUBCLASS(pa->pa_class) != PCI_SUBCLASS_DISPLAY_VGA)
@ -88,7 +88,7 @@ chipsfb_pci_attach(device_t parent, device_t self, void *aux)
{ {
struct chipsfb_pci_softc *scp = device_private(self); struct chipsfb_pci_softc *scp = device_private(self);
struct chipsfb_softc *sc = &scp->sc_chips; struct chipsfb_softc *sc = &scp->sc_chips;
struct pci_attach_args *pa = aux; const struct pci_attach_args *pa = aux;
char devinfo[256]; char devinfo[256];
pcireg_t screg; pcireg_t screg;

View File

@ -1,4 +1,4 @@
/* $NetBSD: radeonfb.c,v 1.43 2011/04/15 21:47:39 dyoung Exp $ */ /* $NetBSD: radeonfb.c,v 1.44 2011/05/11 00:17:55 dyoung Exp $ */
/*- /*-
* Copyright (c) 2006 Itronix Inc. * Copyright (c) 2006 Itronix Inc.
@ -70,7 +70,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: radeonfb.c,v 1.43 2011/04/15 21:47:39 dyoung Exp $"); __KERNEL_RCSID(0, "$NetBSD: radeonfb.c,v 1.44 2011/05/11 00:17:55 dyoung Exp $");
#define RADEONFB_DEFAULT_DEPTH 8 #define RADEONFB_DEFAULT_DEPTH 8
@ -107,7 +107,7 @@ static int radeonfb_ioctl(void *, void *, unsigned long, void *, int,
static paddr_t radeonfb_mmap(void *, void *, off_t, int); static paddr_t radeonfb_mmap(void *, void *, off_t, int);
static int radeonfb_scratch_test(struct radeonfb_softc *, int, uint32_t); static int radeonfb_scratch_test(struct radeonfb_softc *, int, uint32_t);
static void radeonfb_loadbios(struct radeonfb_softc *, static void radeonfb_loadbios(struct radeonfb_softc *,
struct pci_attach_args *); const struct pci_attach_args *);
static uintmax_t radeonfb_getprop_num(struct radeonfb_softc *, const char *, static uintmax_t radeonfb_getprop_num(struct radeonfb_softc *, const char *,
uintmax_t); uintmax_t);
@ -416,7 +416,7 @@ CFATTACH_DECL(radeonfb, sizeof (struct radeonfb_softc),
static int static int
radeonfb_match(device_t parent, cfdata_t match, void *aux) radeonfb_match(device_t parent, cfdata_t match, void *aux)
{ {
struct pci_attach_args *pa = aux; const struct pci_attach_args *pa = aux;
int i; int i;
if (PCI_VENDOR(pa->pa_id) != PCI_VENDOR_ATI) if (PCI_VENDOR(pa->pa_id) != PCI_VENDOR_ATI)
@ -434,7 +434,7 @@ static void
radeonfb_attach(device_t parent, device_t dev, void *aux) radeonfb_attach(device_t parent, device_t dev, void *aux)
{ {
struct radeonfb_softc *sc = device_private(dev); struct radeonfb_softc *sc = device_private(dev);
struct pci_attach_args *pa = aux; const struct pci_attach_args *pa = aux;
const char *mptr; const char *mptr;
bus_size_t bsz; bus_size_t bsz;
pcireg_t screg; pcireg_t screg;
@ -1151,7 +1151,7 @@ radeonfb_mmap(void *v, void *vs, off_t offset, int prot)
} }
static void static void
radeonfb_loadbios(struct radeonfb_softc *sc, struct pci_attach_args *pa) radeonfb_loadbios(struct radeonfb_softc *sc, const struct pci_attach_args *pa)
{ {
bus_space_tag_t romt; bus_space_tag_t romt;
bus_space_handle_t romh, biosh; bus_space_handle_t romh, biosh;