diff options
author | Hans De Goede <hdegoede@redhat.com> | 2016-12-12 17:03:13 +0100 |
---|---|---|
committer | Timo Aaltonen <tjaalton@debian.org> | 2018-02-13 10:32:27 +0200 |
commit | 4c7a7a319720d7ee33bbd1003d18f3c869e21488 (patch) | |
tree | 15d21fd1c35cdca297fab56647f8e27fcf4df4b1 /hw | |
parent | 7e2d6a6487803c8561099a05f71628a4ff10fa13 (diff) |
xfree86: Make OutputClassMatches take a xf86_platform_device
Make OutputClassMatches directly take a xf86_platform_device as argument,
rather then an index into xf86_platform_devices. This makes things
easier for callers which already have a xf86_platform_device pointer.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
(cherry picked from commit 08b84d72878e43401e99059c3c926dfa42a360c3)
Diffstat (limited to 'hw')
-rw-r--r-- | hw/xfree86/common/xf86platformBus.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c index 16d934f44..25a9040e6 100644 --- a/hw/xfree86/common/xf86platformBus.c +++ b/hw/xfree86/common/xf86platformBus.c @@ -214,9 +214,10 @@ MatchToken(const char *value, struct xorg_list *patterns, } static Bool -OutputClassMatches(const XF86ConfOutputClassPtr oclass, int index) +OutputClassMatches(const XF86ConfOutputClassPtr oclass, + struct xf86_platform_device *dev) { - char *driver = xf86_platform_odev_attributes(index)->driver; + char *driver = dev->attribs->driver; if (!MatchToken(driver, &oclass->match_driver, strcmp)) return FALSE; @@ -234,7 +235,7 @@ xf86OutputClassDriverList(int index, char *matches[], int nmatches) return 0; for (cl = xf86configptr->conf_outputclass_lst; cl; cl = cl->list.next) { - if (OutputClassMatches(cl, index)) { + if (OutputClassMatches(cl, &xf86_platform_devices[index])) { char *path = xf86_platform_odev_attributes(index)->path; xf86Msg(X_INFO, "Applying OutputClass \"%s\" to %s\n", |