diff options
author | marha <marha@users.sourceforge.net> | 2014-07-19 15:12:53 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-07-19 15:12:53 +0200 |
commit | 61c36feba19d918885022042ea62d068a698c83d (patch) | |
tree | fd351953eb2193fe548e7d0e2dca06b34b7c4f4d /xorg-server/hw/xfree86/common/xf86platformBus.c | |
parent | 3865d60ef607cbb00c819e905e40d3628b8eca29 (diff) | |
parent | d0c30e7945e76ac119f6d867e27137c8a76f7e15 (diff) | |
download | vcxsrv-61c36feba19d918885022042ea62d068a698c83d.tar.gz vcxsrv-61c36feba19d918885022042ea62d068a698c83d.tar.bz2 vcxsrv-61c36feba19d918885022042ea62d068a698c83d.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
mesalib/src/glsl/ir.cpp
xorg-server/config/config.c
xorg-server/include/callback.h
xorg-server/include/colormap.h
xorg-server/include/cursor.h
xorg-server/include/dix.h
xorg-server/include/dixfont.h
xorg-server/include/dixgrabs.h
xorg-server/include/gc.h
xorg-server/include/gcstruct.h
xorg-server/include/input.h
xorg-server/include/os.h
xorg-server/include/pixmap.h
xorg-server/include/property.h
xorg-server/include/resource.h
xorg-server/include/scrnintstr.h
xorg-server/include/window.h
xorg-server/include/xkbsrv.h
xorg-server/mi/mi.h
Diffstat (limited to 'xorg-server/hw/xfree86/common/xf86platformBus.c')
-rw-r--r-- | xorg-server/hw/xfree86/common/xf86platformBus.c | 58 |
1 files changed, 10 insertions, 48 deletions
diff --git a/xorg-server/hw/xfree86/common/xf86platformBus.c b/xorg-server/hw/xfree86/common/xf86platformBus.c index eb1a3fb5d..22e4603e6 100644 --- a/xorg-server/hw/xfree86/common/xf86platformBus.c +++ b/xorg-server/hw/xfree86/common/xf86platformBus.c @@ -77,7 +77,7 @@ xf86_remove_platform_device(int dev_index) { int j; - config_odev_free_attribute_list(xf86_platform_devices[dev_index].attribs); + config_odev_free_attributes(xf86_platform_devices[dev_index].attribs); for (j = dev_index; j < xf86_num_platform_devices - 1; j++) memcpy(&xf86_platform_devices[j], &xf86_platform_devices[j + 1], sizeof(struct xf86_platform_device)); @@ -86,44 +86,6 @@ xf86_remove_platform_device(int dev_index) } Bool -xf86_add_platform_device_attrib(int index, int attrib_id, char *attrib_name) -{ - struct xf86_platform_device *device = &xf86_platform_devices[index]; - - return config_odev_add_attribute(device->attribs, attrib_id, attrib_name); -} - -Bool -xf86_add_platform_device_int_attrib(int index, int attrib_id, int attrib_value) -{ - return config_odev_add_int_attribute(xf86_platform_devices[index].attribs, attrib_id, attrib_value); -} - -char * -xf86_get_platform_attrib(int index, int attrib_id) -{ - return config_odev_get_attribute(xf86_platform_devices[index].attribs, attrib_id); -} - -char * -xf86_get_platform_device_attrib(struct xf86_platform_device *device, int attrib_id) -{ - return config_odev_get_attribute(device->attribs, attrib_id); -} - -int -xf86_get_platform_int_attrib(int index, int attrib_id, int def) -{ - return config_odev_get_int_attribute(xf86_platform_devices[index].attribs, attrib_id, def); -} - -int -xf86_get_platform_device_int_attrib(struct xf86_platform_device *device, int attrib_id, int def) -{ - return config_odev_get_int_attribute(device->attribs, attrib_id, def); -} - -Bool xf86_get_platform_device_unowned(int index) { return (xf86_platform_devices[index].flags & XF86_PDEV_UNOWNED) ? @@ -136,8 +98,8 @@ xf86_find_platform_device_by_devnum(int major, int minor) int i, attr_major, attr_minor; for (i = 0; i < xf86_num_platform_devices; i++) { - attr_major = xf86_get_platform_int_attrib(i, ODEV_ATTRIB_MAJOR, 0); - attr_minor = xf86_get_platform_int_attrib(i, ODEV_ATTRIB_MINOR, 0); + attr_major = xf86_platform_odev_attributes(i)->major; + attr_minor = xf86_platform_odev_attributes(i)->minor; if (attr_major == major && attr_minor == minor) return &xf86_platform_devices[i]; } @@ -240,7 +202,7 @@ MatchToken(const char *value, struct xorg_list *patterns, static Bool OutputClassMatches(const XF86ConfOutputClassPtr oclass, int index) { - char *driver = xf86_get_platform_attrib(index, ODEV_ATTRIB_DRIVER); + char *driver = xf86_platform_odev_attributes(index)->driver; if (!MatchToken(driver, &oclass->match_driver, strcmp)) return FALSE; @@ -259,7 +221,7 @@ xf86OutputClassDriverList(int index, char *matches[], int nmatches) for (cl = xf86configptr->conf_outputclass_lst; cl; cl = cl->list.next) { if (OutputClassMatches(cl, index)) { - char *path = xf86_get_platform_attrib(index, ODEV_ATTRIB_PATH); + char *path = xf86_platform_odev_attributes(index)->path; xf86Msg(X_INFO, "Applying OutputClass \"%s\" to %s\n", cl->identifier, path); @@ -324,7 +286,7 @@ xf86platformProbe(void) } for (i = 0; i < xf86_num_platform_devices; i++) { - char *busid = xf86_get_platform_attrib(i, ODEV_ATTRIB_BUSID); + char *busid = xf86_platform_odev_attributes(i)->busid; if (pci && (strncmp(busid, "pci:", 4) == 0)) { platform_find_pci_info(&xf86_platform_devices[i], busid); @@ -412,11 +374,11 @@ static Bool doPlatformProbe(struct xf86_platform_device *dev, DriverPtr drvp, if (entity != -1) { if ((dev->flags & XF86_PDEV_SERVER_FD) && (!drvp->driverFunc || !drvp->driverFunc(NULL, SUPPORTS_SERVER_FDS, NULL))) { - fd = xf86_get_platform_device_int_attrib(dev, ODEV_ATTRIB_FD, -1); - major = xf86_get_platform_device_int_attrib(dev, ODEV_ATTRIB_MAJOR, 0); - minor = xf86_get_platform_device_int_attrib(dev, ODEV_ATTRIB_MINOR, 0); + fd = dev->attribs->fd; + major = dev->attribs->major; + minor = dev->attribs->minor; systemd_logind_release_fd(major, minor, fd); - config_odev_add_int_attribute(dev->attribs, ODEV_ATTRIB_FD, -1); + dev->attribs->fd = -1; dev->flags &= ~XF86_PDEV_SERVER_FD; } |