From patchwork Sat Feb 26 20:04:22 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sedat Dilek X-Patchwork-Id: 592831 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p1QK5Fwo025850 for ; Sat, 26 Feb 2011 20:05:36 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 820EE9F577 for ; Sat, 26 Feb 2011 12:05:14 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-fx0-f49.google.com (mail-fx0-f49.google.com [209.85.161.49]) by gabe.freedesktop.org (Postfix) with ESMTP id 2D83E9F083 for ; Sat, 26 Feb 2011 12:04:46 -0800 (PST) Received: by fxm16 with SMTP id 16so3035167fxm.36 for ; Sat, 26 Feb 2011 12:04:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer :mime-version:content-type:content-transfer-encoding; bh=FbZyn4/VCVCQjLiAucyxiyPc0CiGF3PIhcshCxYXQNg=; b=uznhWFY8KOpilKqMF1aBr3YlwKmgO2P7BU7He4NNvN76XS1E09TIYjMOVDlEmGhzct fSbyBWSppEIEO53O5e8DHsjzkgIEnAwhB5KnykTco8N6EERs9B9jZYlTiNrpUAwS58pL fn0ohqMJOlN/tQxUF9RBERwNCnxZiGC0pB3Jg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:mime-version :content-type:content-transfer-encoding; b=MHznOnEOf0ygrI/9A2KaZkbvnQlUMeyb/N9SqCFNUz+I+x/gJJCzSwWzQKBimtwBDf FoAFWw7sjDyso5k+v7CYDQVO7jfXwnIh5jx1dUviYdrzcgarFOOxL0wMgxZAHWVwl05v YN/c9IMNEuPrEotzb05oRc8ugO/ffSJme8SqI= Received: by 10.223.100.16 with SMTP id w16mr4413670fan.85.1298750681916; Sat, 26 Feb 2011 12:04:41 -0800 (PST) Received: from localhost.localdomain (p548B66A0.dip.t-dialin.net [84.139.102.160]) by mx.google.com with ESMTPS id 11sm863444faw.44.2011.02.26.12.04.40 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 26 Feb 2011 12:04:40 -0800 (PST) From: Sedat Dilek To: xorg-driver-ati@lists.x.org, dri-devel@lists.freedesktop.org Subject: [PATCH] kms: Fix warning XNFprintf is deprecated (v2) Date: Sat, 26 Feb 2011 21:04:22 +0100 Message-Id: <1298750662-14688-1-git-send-email-sedat.dilek@gmail.com> X-Mailer: git-send-email 1.7.4.1 MIME-Version: 1.0 Cc: Sedat Dilek , =?UTF-8?q?Michel=20D=C3=A4nzer?= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Sat, 26 Feb 2011 20:05:36 +0000 (UTC) X-MIME-Autoconverted: from base64 to 8bit by demeter1.kernel.org id p1QK5Fwo025850 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) {