mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-03-13 12:58:20 +03:00
backlight: fix detection of multiple graphic cards
Follow-up for e0504dd011189d97a1ea813aabfe1e696742bcf5. Hopefully, devices in PCI subsystem have some properties, thus have their udev database file. But, that may not be true. Here, we only read sysattrs of enumerated devices, hence it is not necessary to check if the device is initialized or not. (cherry picked from commit 9990552f9a26cfb07ef3edaad846543bdd013b10) (cherry picked from commit 029341790ced0a82bbf075c923c196d405732541) (cherry picked from commit e6e77739eb0b214ed9615d9e34d36d7c59e96f97)
This commit is contained in:
parent
5a44056792
commit
3d8ec4633a
@ -55,6 +55,10 @@ static int has_multiple_graphics_cards(void) {
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
r = sd_device_enumerator_allow_uninitialized(e);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
r = sd_device_enumerator_add_match_subsystem(e, "pci", /* match = */ true);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
Loading…
x
Reference in New Issue
Block a user