Only add the backlight device if it actually exists in OF.
MFC after: 1 week
This commit is contained in:
parent
f0bd82a11b
commit
427467b32e
@ -86,6 +86,8 @@ DRIVER_MODULE(atibl, vgapci, atibl_driver, atibl_devclass, 0, 0);
|
||||
static void
|
||||
atibl_identify(driver_t *driver, device_t parent)
|
||||
{
|
||||
if (OF_finddevice("mac-io/backlight") == -1)
|
||||
return;
|
||||
if (device_find_child(parent, "backlight", -1) == NULL)
|
||||
device_add_child(parent, "backlight", -1);
|
||||
}
|
||||
|
@ -82,6 +82,8 @@ DRIVER_MODULE(nvbl, vgapci, nvbl_driver, nvbl_devclass, 0, 0);
|
||||
static void
|
||||
nvbl_identify(driver_t *driver, device_t parent)
|
||||
{
|
||||
if (OF_finddevice("mac-io/backlight") == -1)
|
||||
return;
|
||||
if (device_find_child(parent, "backlight", -1) == NULL)
|
||||
device_add_child(parent, "backlight", -1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user