Deleted Added
full compact
atkbdc_isa.c (160091) atkbdc_isa.c (188160)
1/*-
2 * Copyright (c) 1999 Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1999 Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/sys/dev/atkbdc/atkbdc_isa.c 160091 2006-07-03 23:40:58Z jkim $");
28__FBSDID("$FreeBSD: head/sys/dev/atkbdc/atkbdc_isa.c 188160 2009-02-05 18:38:39Z imp $");
29
30#include "opt_kbd.h"
31
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/kernel.h>
35#include <sys/module.h>
36#include <sys/bus.h>

--- 5 unchanged lines hidden (view full) ---

42#include <dev/atkbdc/atkbdc_subr.h>
43#include <dev/atkbdc/atkbdcreg.h>
44
45#include <isa/isareg.h>
46#include <isa/isavar.h>
47
48static int atkbdc_isa_probe(device_t dev);
49static int atkbdc_isa_attach(device_t dev);
29
30#include "opt_kbd.h"
31
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/kernel.h>
35#include <sys/module.h>
36#include <sys/bus.h>

--- 5 unchanged lines hidden (view full) ---

42#include <dev/atkbdc/atkbdc_subr.h>
43#include <dev/atkbdc/atkbdcreg.h>
44
45#include <isa/isareg.h>
46#include <isa/isavar.h>
47
48static int atkbdc_isa_probe(device_t dev);
49static int atkbdc_isa_attach(device_t dev);
50static device_t atkbdc_isa_add_child(device_t bus, int order, char *name,
51 int unit);
50static device_t atkbdc_isa_add_child(device_t bus, int order, const char *name,
51 int unit);
52
53static device_method_t atkbdc_isa_methods[] = {
54 DEVMETHOD(device_probe, atkbdc_isa_probe),
55 DEVMETHOD(device_attach, atkbdc_isa_attach),
56 DEVMETHOD(device_suspend, bus_generic_suspend),
57 DEVMETHOD(device_resume, bus_generic_resume),
58
59 DEVMETHOD(bus_add_child, atkbdc_isa_add_child),

--- 162 unchanged lines hidden (view full) ---

222 *(atkbdc_softc_t **)device_get_softc(dev) = sc;
223
224 bus_generic_attach(dev);
225
226 return 0;
227}
228
229static device_t
52
53static device_method_t atkbdc_isa_methods[] = {
54 DEVMETHOD(device_probe, atkbdc_isa_probe),
55 DEVMETHOD(device_attach, atkbdc_isa_attach),
56 DEVMETHOD(device_suspend, bus_generic_suspend),
57 DEVMETHOD(device_resume, bus_generic_resume),
58
59 DEVMETHOD(bus_add_child, atkbdc_isa_add_child),

--- 162 unchanged lines hidden (view full) ---

222 *(atkbdc_softc_t **)device_get_softc(dev) = sc;
223
224 bus_generic_attach(dev);
225
226 return 0;
227}
228
229static device_t
230atkbdc_isa_add_child(device_t bus, int order, char *name, int unit)
230atkbdc_isa_add_child(device_t bus, int order, const char *name, int unit)
231{
232 atkbdc_device_t *ivar;
233 device_t child;
234 int t;
235
236 ivar = malloc(sizeof(struct atkbdc_device), M_ATKBDDEV,
237 M_NOWAIT | M_ZERO);
238 if (!ivar)

--- 35 unchanged lines hidden ---
231{
232 atkbdc_device_t *ivar;
233 device_t child;
234 int t;
235
236 ivar = malloc(sizeof(struct atkbdc_device), M_ATKBDDEV,
237 M_NOWAIT | M_ZERO);
238 if (!ivar)

--- 35 unchanged lines hidden ---