Do not add children (atkbd and psm) if they are disabled.

Approved by: jkh
This commit is contained in:
Kazutaka YOKOTA 2000-02-25 11:40:31 +00:00
parent d99cc1da8a
commit 9e6f8bee0e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=57481
3 changed files with 9 additions and 0 deletions

View file

@ -117,6 +117,9 @@ atkbdc_add_device(device_t dev, const char *name, int unit)
device_t child;
int t;
if (resource_int_value(name, unit, "disabled", &t) == 0 && t != 0)
return;
kdev = malloc(sizeof(struct atkbdc_device), M_ATKBDDEV, M_NOWAIT);
if (!kdev)
return;

View file

@ -117,6 +117,9 @@ atkbdc_add_device(device_t dev, const char *name, int unit)
device_t child;
int t;
if (resource_int_value(name, unit, "disabled", &t) == 0 && t != 0)
return;
kdev = malloc(sizeof(struct atkbdc_device), M_ATKBDDEV, M_NOWAIT);
if (!kdev)
return;

View file

@ -117,6 +117,9 @@ atkbdc_add_device(device_t dev, const char *name, int unit)
device_t child;
int t;
if (resource_int_value(name, unit, "disabled", &t) == 0 && t != 0)
return;
kdev = malloc(sizeof(struct atkbdc_device), M_ATKBDDEV, M_NOWAIT);
if (!kdev)
return;