xfree86: Remove DriverRec1 compat struct

The idea here is that the driver might have once been old enough to not
have the driverFunc slot in DriverRec, with the module ABI not having
changed when it was added. That was ages ago, and drivers always declare
themselves with DriverRec not DriverRec1, so uninitialized slots will
simply be zero.

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
Adam Jackson 2016-07-14 15:42:18 -04:00
parent 2e3ad7e250
commit 5c577da5f3
2 changed files with 1 additions and 18 deletions

View File

@ -79,14 +79,7 @@ xf86AddDriver(DriverPtr driver, void *module, int flags)
xf86DriverList = xnfreallocarray(xf86DriverList,
xf86NumDrivers, sizeof(DriverPtr));
xf86DriverList[xf86NumDrivers - 1] = xnfalloc(sizeof(DriverRec));
if (flags & HaveDriverFuncs)
*xf86DriverList[xf86NumDrivers - 1] = *driver;
else {
(void) memset(xf86DriverList[xf86NumDrivers - 1], 0, sizeof(DriverRec));
(void) memcpy(xf86DriverList[xf86NumDrivers - 1], driver,
sizeof(DriverRec1));
}
*xf86DriverList[xf86NumDrivers - 1] = *driver;
xf86DriverList[xf86NumDrivers - 1]->module = module;
xf86DriverList[xf86NumDrivers - 1]->refCount = 0;
}

View File

@ -209,16 +209,6 @@ typedef CARD32 xorgHWFlags;
*/
struct _DriverRec;
typedef struct {
int driverVersion;
const char *driverName;
void (*Identify) (int flags);
Bool (*Probe) (struct _DriverRec * drv, int flags);
const OptionInfoRec *(*AvailableOptions) (int chipid, int bustype);
void *module;
int refCount;
} DriverRec1;
struct _SymTabRec;
struct _PciChipsets;