summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryokota <yokota@FreeBSD.org>1999-05-09 04:59:24 +0000
committeryokota <yokota@FreeBSD.org>1999-05-09 04:59:24 +0000
commitb62c543b38f664a33b5ea25033d193a019eedbc5 (patch)
tree3b878f019316045b17ca639536c09b70521a3d58
parentaea63d1e76e7c3e4b8eee596a22e305243c847b7 (diff)
downloadFreeBSD-src-b62c543b38f664a33b5ea25033d193a019eedbc5.zip
FreeBSD-src-b62c543b38f664a33b5ea25033d193a019eedbc5.tar.gz
Minor tweak after the introduction of new-bus to i386; properly
check "disabled" and "flags" probe hints.
-rw-r--r--sys/dev/atkbdc/atkbd.c28
-rw-r--r--sys/dev/kbd/atkbd.c28
2 files changed, 28 insertions, 28 deletions
diff --git a/sys/dev/atkbdc/atkbd.c b/sys/dev/atkbdc/atkbd.c
index 80c81a5..4f7b8d6 100644
--- a/sys/dev/atkbdc/atkbd.c
+++ b/sys/dev/atkbdc/atkbd.c
@@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: atkbd.c,v 1.5 1999/03/10 10:36:52 yokota Exp $
+ * $Id: atkbd.c,v 1.6 1999/04/16 21:21:55 peter Exp $
*/
#include "atkbd.h"
@@ -380,22 +380,22 @@ atkbd_configure(int flags)
int arg[2];
int i;
- /* XXX: a kludge to obtain the device configuration flags */
- if (resource_int_value("atkbd", 0, "flags", &i) == 0) {
- flags |= i;
- /* if the driver is disabled, unregister the keyboard if any */
- if (resource_int_value("atkbd", 0, "disabled", &i) == 0
- && i != 0) {
- i = kbd_find_keyboard(ATKBD_DRIVER_NAME, ATKBD_DEFAULT);
- if (i >= 0) {
- kbd = kbd_get_keyboard(i);
- kbd_unregister(kbd);
- kbd->kb_flags &= ~KB_REGISTERED;
- return 0;
- }
+ /* if the driver is disabled, unregister the keyboard if any */
+ if ((resource_int_value("atkbd", ATKBD_DEFAULT, "disabled", &i) == 0)
+ && i != 0) {
+ i = kbd_find_keyboard(ATKBD_DRIVER_NAME, ATKBD_DEFAULT);
+ if (i >= 0) {
+ kbd = kbd_get_keyboard(i);
+ kbd_unregister(kbd);
+ kbd->kb_flags &= ~KB_REGISTERED;
+ return 0;
}
}
+ /* XXX: a kludge to obtain the device configuration flags */
+ if (resource_int_value("atkbd", ATKBD_DEFAULT, "flags", &i) == 0)
+ flags |= i;
+
/* probe the keyboard controller */
atkbdc_configure();
diff --git a/sys/dev/kbd/atkbd.c b/sys/dev/kbd/atkbd.c
index 80c81a5..4f7b8d6 100644
--- a/sys/dev/kbd/atkbd.c
+++ b/sys/dev/kbd/atkbd.c
@@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: atkbd.c,v 1.5 1999/03/10 10:36:52 yokota Exp $
+ * $Id: atkbd.c,v 1.6 1999/04/16 21:21:55 peter Exp $
*/
#include "atkbd.h"
@@ -380,22 +380,22 @@ atkbd_configure(int flags)
int arg[2];
int i;
- /* XXX: a kludge to obtain the device configuration flags */
- if (resource_int_value("atkbd", 0, "flags", &i) == 0) {
- flags |= i;
- /* if the driver is disabled, unregister the keyboard if any */
- if (resource_int_value("atkbd", 0, "disabled", &i) == 0
- && i != 0) {
- i = kbd_find_keyboard(ATKBD_DRIVER_NAME, ATKBD_DEFAULT);
- if (i >= 0) {
- kbd = kbd_get_keyboard(i);
- kbd_unregister(kbd);
- kbd->kb_flags &= ~KB_REGISTERED;
- return 0;
- }
+ /* if the driver is disabled, unregister the keyboard if any */
+ if ((resource_int_value("atkbd", ATKBD_DEFAULT, "disabled", &i) == 0)
+ && i != 0) {
+ i = kbd_find_keyboard(ATKBD_DRIVER_NAME, ATKBD_DEFAULT);
+ if (i >= 0) {
+ kbd = kbd_get_keyboard(i);
+ kbd_unregister(kbd);
+ kbd->kb_flags &= ~KB_REGISTERED;
+ return 0;
}
}
+ /* XXX: a kludge to obtain the device configuration flags */
+ if (resource_int_value("atkbd", ATKBD_DEFAULT, "flags", &i) == 0)
+ flags |= i;
+
/* probe the keyboard controller */
atkbdc_configure();
OpenPOWER on IntegriCloud