Deleted Added
full compact
26c26
< * $FreeBSD: head/sys/dev/atkbdc/atkbd_atkbdc.c 56836 2000-01-29 15:08:56Z peter $
---
> * $FreeBSD: head/sys/dev/atkbdc/atkbd_atkbdc.c 58271 2000-03-19 03:25:13Z yokota $
34,35d33
< #include <sys/conf.h>
< #include <sys/tty.h>
36a35
>
37a37
> #include <machine/resource.h>
40,41d39
< #include <machine/resource.h>
<
48a47,51
> typedef struct {
> struct resource *intr;
> void *ih;
> } atkbd_softc_t;
>
64c67
< 1,
---
> sizeof(atkbd_softc_t),
70d72
< uintptr_t port;
77d78
< BUS_READ_IVAR(device_get_parent(dev), dev, KBDC_IVAR_PORT, &port);
82c83,85
< return atkbd_probe_unit(device_get_unit(dev), port, irq, flags);
---
> return atkbd_probe_unit(device_get_unit(dev),
> device_get_unit(device_get_parent(dev)),
> irq, flags);
87a91
> atkbd_softc_t *sc;
89d92
< uintptr_t port;
92,94c95
< struct resource *res;
< void *ih;
< int zero = 0;
---
> int rid;
97c98,99
< BUS_READ_IVAR(device_get_parent(dev), dev, KBDC_IVAR_PORT, &port);
---
> sc = device_get_softc(dev);
>
101c103,105
< error = atkbd_attach_unit(device_get_unit(dev), &kbd, port, irq, flags);
---
> error = atkbd_attach_unit(device_get_unit(dev), &kbd,
> device_get_unit(device_get_parent(dev)),
> irq, flags);
106,109c110,114
< res = bus_alloc_resource(dev, SYS_RES_IRQ, &zero, irq, irq, 1,
< RF_SHAREABLE | RF_ACTIVE);
< BUS_SETUP_INTR(device_get_parent(dev), dev, res, INTR_TYPE_TTY,
< atkbd_isa_intr, kbd, &ih);
---
> rid = 0;
> sc->intr = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, irq, irq, 1,
> RF_SHAREABLE | RF_ACTIVE);
> BUS_SETUP_INTR(device_get_parent(dev), dev, sc->intr, INTR_TYPE_TTY,
> atkbd_isa_intr, kbd, &sc->ih);