diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c index fe78111e8..d7958806b 100644 --- a/hw/xfree86/drivers/modesetting/driver.c +++ b/hw/xfree86/drivers/modesetting/driver.c @@ -81,9 +81,11 @@ static Bool ScreenInit(ScreenPtr pScreen, int argc, char **argv); static Bool PreInit(ScrnInfoPtr pScrn, int flags); static Bool Probe(DriverPtr drv, int flags); +#ifdef XSERVER_LIBPCIACCESS static Bool ms_pci_probe(DriverPtr driver, int entity_num, struct pci_device *device, intptr_t match_data); +#endif static Bool ms_driver_func(ScrnInfoPtr scrn, xorgDriverFuncOp op, void *data); /* window wrapper functions used to get the notification when @@ -124,8 +126,13 @@ _X_EXPORT DriverRec modesetting = { NULL, 0, ms_driver_func, +#ifdef XSERVER_LIBPCIACCESS ms_device_match, ms_pci_probe, +#else + NULL, + NULL, +#endif #ifdef XSERVER_PLATFORM_BUS ms_platform_probe, #endif @@ -297,6 +304,7 @@ probe_hw(const char *dev, struct xf86_platform_device *platform_dev) return FALSE; } +#ifdef XSERVER_LIBPCIACCESS static char * ms_DRICreatePCIBusID(const struct pci_device *dev) { @@ -339,6 +347,7 @@ probe_hw_pci(const char *dev, struct pci_device *pdev) free(devid); return ret; } +#endif static const OptionInfoRec * AvailableOptions(int chipid, int busid) @@ -1176,14 +1185,11 @@ msShouldDoubleShadow(ScrnInfoPtr pScrn, modesettingPtr ms) static Bool ms_get_drm_master_fd(ScrnInfoPtr pScrn) { - EntityInfoPtr pEnt; - modesettingPtr ms; - modesettingEntPtr ms_ent; - - ms = modesettingPTR(pScrn); - ms_ent = ms_ent_priv(pScrn); - - pEnt = ms->pEnt; + modesettingPtr ms = modesettingPTR(pScrn); + modesettingEntPtr ms_ent = ms_ent_priv(pScrn); +#if defined(XSERVER_PLATFORM_BUS) || defined(XSERVER_LIBPCIACCESS) + EntityInfoPtr pEnt = ms->pEnt; +#endif if (ms_ent->fd) { xf86DrvMsg(pScrn->scrnIndex, X_INFO,