From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: drm: fix building on non-PCI platforms Date: Wed, 8 Sep 2010 17:15:02 +0200 Message-ID: <201009081715.02297.arnd@arndb.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.10]) by gabe.freedesktop.org (Postfix) with ESMTP id C8F069E880 for ; Wed, 8 Sep 2010 08:15:07 -0700 (PDT) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Dave Airlie Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org BenH's fix to correct building on multi-domain systems broke building DRM for platforms without PCI support. This makes the call to pci_domain_nr conditional in order to fix compilation. Signed-off-by: Arnd Bergmann diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 7809d23..5ff5819 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -1099,7 +1099,11 @@ static inline int drm_get_pci_domain(struct drm_device *dev) return 0; #endif /* __alpha__ */ +#ifdef CONFIG_PCI return pci_domain_nr(dev->pdev->bus); +#else + return 0; +#endif } #if __OS_HAS_AGP