diff options
author | Eamon Walsh <ewalsh@tycho.nsa.gov> | 2009-04-29 01:04:37 -0400 |
---|---|---|
committer | Eamon Walsh <ewalsh@tycho.nsa.gov> | 2009-04-29 01:04:37 -0400 |
commit | 57aff88c7d0761e590806d07bee1c9410680c89f (patch) | |
tree | 48f05f58a72183556af3b0a7f3f286959d7e096a /Xext/xvdix.h | |
parent | 1abe0ee3da5e1268c7315f841d31337ea6524cf0 (diff) |
Fix most remaining deprecated resource lookups.
Callsites updated to use dixLookupResourceBy{Type,Class}.
TODO: Audit access modes to make sure they reflect the usage.
Diffstat (limited to 'Xext/xvdix.h')
-rw-r--r-- | Xext/xvdix.h | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/Xext/xvdix.h b/Xext/xvdix.h index 265c03ddf..44f8f6b18 100644 --- a/Xext/xvdix.h +++ b/Xext/xvdix.h @@ -201,17 +201,13 @@ typedef struct _XvPortRec { DevUnion devPriv; } XvPortRec, *XvPortPtr; -#define LOOKUP_PORT(_id, client)\ - ((XvPortPtr)LookupIDByType(_id, XvRTPort)) - -#define LOOKUP_ENCODING(_id, client)\ - ((XvEncodingPtr)LookupIDByType(_id, XvRTEncoding)) - -#define LOOKUP_VIDEONOTIFY_LIST(_id, client)\ - ((XvVideoNotifyPtr)LookupIDByType(_id, XvRTVideoNotifyList)) - -#define LOOKUP_PORTNOTIFY_LIST(_id, client)\ - ((XvPortNotifyPtr)LookupIDByType(_id, XvRTPortNotifyList)) +#define VALIDATE_XV_PORT(portID, pPort, mode)\ + {\ + int rc = dixLookupResourceByType((pointer *)&(pPort), portID,\ + XvRTPort, client, mode);\ + if (rc != Success)\ + return (rc == BadValue) ? _XvBadPort : rc;\ + } typedef struct { int version, revision; |