Sat Aug 27 20:02:18 2011 UTC ()
I suppose mrg did mean to include this change in yesterday commit:
use CFATTACH_DECL_NEW for real.


(martin)
diff -r1.21 -r1.22 src/sys/dev/pci/igsfb_pci.c

cvs diff -r1.21 -r1.22 src/sys/dev/pci/igsfb_pci.c (expand / switch to unified diff)

--- src/sys/dev/pci/igsfb_pci.c 2011/07/26 08:59:37 1.21
+++ src/sys/dev/pci/igsfb_pci.c 2011/08/27 20:02:18 1.22
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: igsfb_pci.c,v 1.21 2011/07/26 08:59:37 mrg Exp $ */ 1/* $NetBSD: igsfb_pci.c,v 1.22 2011/08/27 20:02:18 martin Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2002, 2003 Valeriy E. Ushakov 4 * Copyright (c) 2002, 2003 Valeriy E. Ushakov
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -21,27 +21,27 @@ @@ -21,27 +21,27 @@
21 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
22 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */ 28 */
29 29
30/* 30/*
31 * Integraphics Systems IGA 168x and CyberPro series. 31 * Integraphics Systems IGA 168x and CyberPro series.
32 */ 32 */
33#include <sys/cdefs.h> 33#include <sys/cdefs.h>
34__KERNEL_RCSID(0, "$NetBSD: igsfb_pci.c,v 1.21 2011/07/26 08:59:37 mrg Exp $"); 34__KERNEL_RCSID(0, "$NetBSD: igsfb_pci.c,v 1.22 2011/08/27 20:02:18 martin Exp $");
35 35
36#include <sys/param.h> 36#include <sys/param.h>
37#include <sys/systm.h> 37#include <sys/systm.h>
38#include <sys/kernel.h> 38#include <sys/kernel.h>
39#include <sys/device.h> 39#include <sys/device.h>
40#include <sys/malloc.h> 40#include <sys/malloc.h>
41#include <sys/buf.h> 41#include <sys/buf.h>
42 42
43#ifdef __sparc__ /* XXX: this doesn't belong here */ 43#ifdef __sparc__ /* XXX: this doesn't belong here */
44#include <machine/autoconf.h> 44#include <machine/autoconf.h>
45#endif 45#endif
46#include <sys/bus.h> 46#include <sys/bus.h>
47#include <sys/intr.h> 47#include <sys/intr.h>
@@ -65,27 +65,27 @@ static int igsfb_pci_map_regs(struct igs @@ -65,27 +65,27 @@ static int igsfb_pci_map_regs(struct igs
65 bus_space_tag_t, bus_space_tag_t, 65 bus_space_tag_t, bus_space_tag_t,
66 pci_chipset_tag_t, 66 pci_chipset_tag_t,
67 pcitag_t, pci_product_id_t); 67 pcitag_t, pci_product_id_t);
68static int igsfb_pci_is_console(pci_chipset_tag_t, pcitag_t); 68static int igsfb_pci_is_console(pci_chipset_tag_t, pcitag_t);
69 69
70static int igsfb_pci_console = 0; 70static int igsfb_pci_console = 0;
71static pcitag_t igsfb_pci_constag; 71static pcitag_t igsfb_pci_constag;
72 72
73 73
74 74
75static int igsfb_pci_match(device_t, cfdata_t, void *); 75static int igsfb_pci_match(device_t, cfdata_t, void *);
76static void igsfb_pci_attach(device_t, device_t, void *); 76static void igsfb_pci_attach(device_t, device_t, void *);
77 77
78CFATTACH_DECL(igsfb_pci, sizeof(struct igsfb_softc), 78CFATTACH_DECL_NEW(igsfb_pci, sizeof(struct igsfb_softc),
79 igsfb_pci_match, igsfb_pci_attach, NULL, NULL); 79 igsfb_pci_match, igsfb_pci_attach, NULL, NULL);
80 80
81 81
82static int 82static int
83igsfb_pci_match_by_id(pcireg_t id) 83igsfb_pci_match_by_id(pcireg_t id)
84{ 84{
85 85
86 if (PCI_VENDOR(id) != PCI_VENDOR_INTEGRAPHICS) 86 if (PCI_VENDOR(id) != PCI_VENDOR_INTEGRAPHICS)
87 return 0; 87 return 0;
88 88
89 switch (PCI_PRODUCT(id)) { 89 switch (PCI_PRODUCT(id)) {
90 case PCI_PRODUCT_INTEGRAPHICS_IGA1682: /* FALLTHROUGH */ 90 case PCI_PRODUCT_INTEGRAPHICS_IGA1682: /* FALLTHROUGH */
91 case PCI_PRODUCT_INTEGRAPHICS_CYBERPRO2000: /* FALLTHROUGH */ 91 case PCI_PRODUCT_INTEGRAPHICS_CYBERPRO2000: /* FALLTHROUGH */