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

Approved by: jkh
This commit is contained in:
yokota 2000-02-25 11:40:31 +00:00
parent 45c27cda58
commit 4f4742024f
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;