Date: Fri, 11 Jan 2013 23:42:24 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245317 - head/sys/pc98/cbus Message-ID: <201301112342.r0BNgO1f003974@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Fri Jan 11 23:42:24 2013 New Revision: 245317 URL: http://svnweb.freebsd.org/changeset/base/245317 Log: MFi386: Make similar changes that were made to atkbdc in r245315. Modified: head/sys/pc98/cbus/pckbd.c Modified: head/sys/pc98/cbus/pckbd.c ============================================================================== --- head/sys/pc98/cbus/pckbd.c Fri Jan 11 23:08:19 2013 (r245316) +++ head/sys/pc98/cbus/pckbd.c Fri Jan 11 23:42:24 2013 (r245317) @@ -77,9 +77,9 @@ DRIVER_MODULE(pckbd, isa, pckbd_driver, static bus_addr_t pckbd_iat[] = {0, 2}; -static int pckbd_probe_unit(int unit, int port, int irq, +static int pckbd_probe_unit(device_t dev, int port, int irq, int flags); -static int pckbd_attach_unit(int unit, keyboard_t **kbd, +static int pckbd_attach_unit(device_t dev, keyboard_t **kbd, int port, int irq, int flags); static timeout_t pckbd_timeout; @@ -103,7 +103,7 @@ pckbdprobe(device_t dev) return ENXIO; isa_load_resourcev(res, pckbd_iat, 2); - error = pckbd_probe_unit(device_get_unit(dev), + error = pckbd_probe_unit(dev, isa_get_port(dev), (1 << isa_get_irq(dev)), device_get_flags(dev)); @@ -128,7 +128,7 @@ pckbdattach(device_t dev) return ENXIO; isa_load_resourcev(res, pckbd_iat, 2); - error = pckbd_attach_unit(device_get_unit(dev), &kbd, + error = pckbd_attach_unit(dev, &kbd, isa_get_port(dev), (1 << isa_get_irq(dev)), device_get_flags(dev)); @@ -164,7 +164,7 @@ pckbd_isa_intr(void *arg) } static int -pckbd_probe_unit(int unit, int port, int irq, int flags) +pckbd_probe_unit(device_t dev, int port, int irq, int flags) { keyboard_switch_t *sw; int args[2]; @@ -176,24 +176,26 @@ pckbd_probe_unit(int unit, int port, int args[0] = port; args[1] = irq; - error = (*sw->probe)(unit, args, flags); + error = (*sw->probe)(device_get_unit(dev), args, flags); if (error) return error; return 0; } static int -pckbd_attach_unit(int unit, keyboard_t **kbd, int port, int irq, int flags) +pckbd_attach_unit(device_t dev, keyboard_t **kbd, int port, int irq, int flags) { keyboard_switch_t *sw; int args[2]; int error; + int unit; sw = kbd_get_switch(DRIVER_NAME); if (sw == NULL) return ENXIO; /* reset, initialize and enable the device */ + unit = device_get_unit(dev); args[0] = port; args[1] = irq; *kbd = NULL;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201301112342.r0BNgO1f003974>