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 --- 12 unchanged lines hidden (view full) --- 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 28#include <sys/cdefs.h> |
29__FBSDID("$FreeBSD: head/sys/dev/atkbdc/atkbd.c 158041 2006-04-26 06:05:16Z sobomax $"); |
30 31#include "opt_kbd.h" 32#include "opt_atkbd.h" 33 34#include <sys/param.h> 35#include <sys/systm.h> 36#include <sys/kernel.h> 37#include <sys/bus.h> --- 239 unchanged lines hidden (view full) --- 277 */ 278static int 279atkbd_configure(int flags) 280{ 281 keyboard_t *kbd; 282 int arg[2]; 283 int i; 284 |
285 /* 286 * Probe the keyboard controller, if not present or if the driver 287 * is disabled, unregister the keyboard if any. 288 */ 289 if (atkbdc_configure() != 0 || 290 resource_disabled("atkbd", ATKBD_DEFAULT)) { |
291 i = kbd_find_keyboard(ATKBD_DRIVER_NAME, ATKBD_DEFAULT); 292 if (i >= 0) { 293 kbd = kbd_get_keyboard(i); 294 kbd_unregister(kbd); 295 kbd->kb_flags &= ~KB_REGISTERED; 296 } 297 return 0; 298 } --- 1173 unchanged lines hidden --- |