diff options
author | Emil Velikov <[email protected]> | 2020-03-05 14:30:51 +0000 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2020-04-01 16:57:22 +0100 |
commit | bf1838838a695f27d9d9c486e608a9412044a598 (patch) | |
tree | 6c951f146cd74470c3621eb2580dfafe074a4b92 /src/loader | |
parent | e3572f977fc662bdecdac4f525f415bdc7e62147 (diff) |
loader: move "using driver..." message to loader_get_kernel_driver_name
Move the message to the function which fetches the name.
While here use the same DEBUG/WARNING approach like in the PCI case. The
current method spam a tad much, plus isn't consistent.
Signed-off-by: Emil Velikov <[email protected]>
Reviewed-by: Adam Jackson <[email protected]>
Reviewed-by: Eric Engestrom <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4084>
Diffstat (limited to 'src/loader')
-rw-r--r-- | src/loader/loader.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/loader/loader.c b/src/loader/loader.c index a2e726465af..38d8752e26e 100644 --- a/src/loader/loader.c +++ b/src/loader/loader.c @@ -111,6 +111,8 @@ static char *loader_get_kernel_driver_name(int fd) } driver = strndup(version->name, version->name_len); + log_(driver ? _LOADER_DEBUG : _LOADER_WARNING, "using driver %s for %d\n", + driver, fd); drmFreeVersion(version); return driver; @@ -451,8 +453,6 @@ loader_get_driver_for_fd(int fd) if (!loader_get_pci_id_for_fd(fd, &vendor_id, &chip_id)) { driver = loader_get_kernel_driver_name(fd); - if (driver) - log_(_LOADER_INFO, "using driver %s for %d\n", driver, fd); return driver; } |