[Spice-devel] [RFCv2 07/21] xspice: use spiceqxl as name of xspice driver

Alon Levy alevy at redhat.com
Fri Apr 29 02:49:45 PDT 2011


Fixes a few places that have hardcoded "qxl" to use the already defined
QXL_DRIVER_NAME.
---
 src/qxl.h        |    5 +++++
 src/qxl_driver.c |    6 +++---
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/qxl.h b/src/qxl.h
index 8f16261..35afc5c 100644
--- a/src/qxl.h
+++ b/src/qxl.h
@@ -49,8 +49,13 @@
 
 #define hidden _X_HIDDEN
 
+#ifdef XSPICE
+#define QXL_NAME		"spiceqxl"
+#define QXL_DRIVER_NAME		"spiceqxl"
+#else
 #define QXL_NAME		"qxl"
 #define QXL_DRIVER_NAME		"qxl"
+#endif
 #define PCI_VENDOR_RED_HAT	0x1b36
 
 #define PCI_CHIP_QXL_0100	0x0100
diff --git a/src/qxl_driver.c b/src/qxl_driver.c
index 14676ce..b3e2094 100644
--- a/src/qxl_driver.c
+++ b/src/qxl_driver.c
@@ -1382,7 +1382,7 @@ static void
 qxl_init_scrn(ScrnInfoPtr pScrn)
 {
     pScrn->driverVersion    = 0;
-    pScrn->driverName	    = pScrn->name = "qxl";
+    pScrn->driverName	    = pScrn->name = QXL_DRIVER_NAME;
     pScrn->PreInit	    = qxl_pre_init;
     pScrn->ScreenInit	    = qxl_screen_init;
     pScrn->SwitchMode	    = qxl_switch_mode;
@@ -1462,7 +1462,7 @@ qxl_pci_probe(DriverPtr drv, int entity, struct pci_device *dev, intptr_t match)
 
 static DriverRec qxl_driver = {
     0,
-    "qxl",
+    QXL_DRIVER_NAME,
     qxl_identify,
     qxl_probe,
     NULL,
@@ -1492,7 +1492,7 @@ qxl_setup(pointer module, pointer opts, int *errmaj, int *errmin)
 }
 
 static XF86ModuleVersionInfo qxl_module_info = {
-    "qxl",
+    QXL_DRIVER_NAME,
     MODULEVENDORSTRING,
     MODINFOSTRING1,
     MODINFOSTRING2,
-- 
1.7.4.4



More information about the Spice-devel mailing list