summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2016-07-14 15:42:18 -0400
committerAdam Jackson <ajax@redhat.com>2017-01-25 14:22:05 -0500
commit5c577da5f3a65c68d2ee12e4afca8f20c3e8ccf4 (patch)
tree211df1ffadb01a879f84839c915c91578ce7d8e4 /hw
parent2e3ad7e2506d9eb6667a5f229b5213d215451a5a (diff)
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>
Diffstat (limited to 'hw')
-rw-r--r--hw/xfree86/common/xf86Helper.c9
-rw-r--r--hw/xfree86/common/xf86str.h10
2 files changed, 1 insertions, 18 deletions
diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
index f48af75dd..b4648641c 100644
--- a/hw/xfree86/common/xf86Helper.c
+++ b/hw/xfree86/common/xf86Helper.c
@@ -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;
}
diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h
index bfcb75ec0..74c65baa8 100644
--- a/hw/xfree86/common/xf86str.h
+++ b/hw/xfree86/common/xf86str.h
@@ -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;