mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-30 21:54:50 +00:00
Do not add children (atkbd and psm) if they are disabled.
Approved by: jkh
This commit is contained in:
parent
d99cc1da8a
commit
9e6f8bee0e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=57481
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue