Do not add children (atkbd and psm) if they are disabled.
Approved by: jkh
This commit is contained in:
parent
d99cc1da8a
commit
9e6f8bee0e
@ -117,6 +117,9 @@ atkbdc_add_device(device_t dev, const char *name, int unit)
|
|||||||
device_t child;
|
device_t child;
|
||||||
int t;
|
int t;
|
||||||
|
|
||||||
|
if (resource_int_value(name, unit, "disabled", &t) == 0 && t != 0)
|
||||||
|
return;
|
||||||
|
|
||||||
kdev = malloc(sizeof(struct atkbdc_device), M_ATKBDDEV, M_NOWAIT);
|
kdev = malloc(sizeof(struct atkbdc_device), M_ATKBDDEV, M_NOWAIT);
|
||||||
if (!kdev)
|
if (!kdev)
|
||||||
return;
|
return;
|
||||||
|
@ -117,6 +117,9 @@ atkbdc_add_device(device_t dev, const char *name, int unit)
|
|||||||
device_t child;
|
device_t child;
|
||||||
int t;
|
int t;
|
||||||
|
|
||||||
|
if (resource_int_value(name, unit, "disabled", &t) == 0 && t != 0)
|
||||||
|
return;
|
||||||
|
|
||||||
kdev = malloc(sizeof(struct atkbdc_device), M_ATKBDDEV, M_NOWAIT);
|
kdev = malloc(sizeof(struct atkbdc_device), M_ATKBDDEV, M_NOWAIT);
|
||||||
if (!kdev)
|
if (!kdev)
|
||||||
return;
|
return;
|
||||||
|
@ -117,6 +117,9 @@ atkbdc_add_device(device_t dev, const char *name, int unit)
|
|||||||
device_t child;
|
device_t child;
|
||||||
int t;
|
int t;
|
||||||
|
|
||||||
|
if (resource_int_value(name, unit, "disabled", &t) == 0 && t != 0)
|
||||||
|
return;
|
||||||
|
|
||||||
kdev = malloc(sizeof(struct atkbdc_device), M_ATKBDDEV, M_NOWAIT);
|
kdev = malloc(sizeof(struct atkbdc_device), M_ATKBDDEV, M_NOWAIT);
|
||||||
if (!kdev)
|
if (!kdev)
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user