[PATCH] kms: Fix warning XNFprintf is deprecated (v2)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The first take of my patch missed the breakage against pre-1.10
xservers and now I know XNFasprintf() is not a 1:1 replacement
for XNFprintf().
The idea for the fix seemed to be so obvious, but as usual "really"
test the patch you are sending to any ML.
I am awfully sorry for the overhasty bad hack.
Thanks to Alan and Alex for the help to fix it correctly, now.

Tested-By: Sedat Dilek <sedat.dilek@xxxxxxxxx>
CC: Alan Coopersmith <alan.coopersmith@xxxxxxxxxx>
CC: Alex Deucher <alexdeucher@xxxxxxxxx>
CC: Michel DÃnzer <michel@xxxxxxxxxxx>
Signed-off-by: Sedat Dilek <sedat.dilek@xxxxxxxxx>
---
 src/radeon_kms.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index 158dc57..adf9b70 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -409,8 +409,13 @@ static Bool radeon_open_drm_master(ScrnInfoPtr pScrn)
 	goto out;
     }
 
+#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,9,99,901,0)
+    XNFasprintf(&busid, "pci:%04x:%02x:%02x.%d",
+                dev->domain, dev->bus, dev->dev, dev->func);
+#else
     busid = XNFprintf("pci:%04x:%02x:%02x.%d",
 		      dev->domain, dev->bus, dev->dev, dev->func);
+#endif
 
     info->dri2.drm_fd = drmOpen("radeon", busid);
     if (info->dri2.drm_fd == -1) {
-- 
1.7.4.1

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux