Indentation fix, cleanup.
[AROS.git] / arch / m68k-amiga / hidd / keyboard / startup.c
blob0753d259df581204f023dcc0d9ebff3addd6bedd
1 /*
2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <aros/symbolsets.h>
7 #include <proto/oop.h>
9 #define HiddKbdBase (LIBBASE->ksd.hiddKbdBase)
11 #include <hidd/keyboard.h>
13 #include LC_LIBDEFS_FILE
15 static int init_kbd(LIBBASETYPEPTR LIBBASE)
17 OOP_Object *kbd;
18 OOP_Object *drv = NULL;
19 struct Library *OOPBase = LIBBASE->ksd.cs_OOPBase;
21 HiddKbdBase = OOP_GetMethodID(IID_Hidd_Kbd, 0);
23 kbd = OOP_NewObject(NULL, CLID_Hidd_Kbd, NULL);
24 if (kbd) {
25 drv = HIDD_Kbd_AddHardwareDriver(kbd, LIBBASE->ksd.kbdclass, NULL);
26 OOP_DisposeObject(kbd);
29 if (!drv)
30 return FALSE;
32 LIBBASE->library.lib_OpenCnt = 1;
33 return TRUE;
36 ADD2INITLIB(init_kbd, 40);