diff options
author | Thierry Reding <treding@nvidia.com> | 2014-08-05 15:37:47 +0400 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2014-11-13 12:43:50 +0300 |
commit | a9e3c90c9fa39ed00e3223dc8f93c9cd12abb750 (patch) | |
tree | 623b34902131cc75c0b53a1b119f9467e4b323b1 /include/drm/drmP.h | |
parent | 34eab43ed2483e69bc79fd2e3aaf5adfae771907 (diff) | |
download | linux-a9e3c90c9fa39ed00e3223dc8f93c9cd12abb750.tar.xz |
drm: Implement drm_get_pci_dev() dummy for !PCI
Implementing a dummy of this function allows drivers that use it to be
built on platforms that don't have PCI. This can happen for example if
the nouveau driver is built on Tegra without PCI enabled (or on 64-bit
ARM where PCI is not yet implemented).
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'include/drm/drmP.h')
-rw-r--r-- | include/drm/drmP.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 75b259492a8d..87aac391c605 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -1028,10 +1028,25 @@ void drm_pci_agp_destroy(struct drm_device *dev); extern int drm_pci_init(struct drm_driver *driver, struct pci_driver *pdriver); extern void drm_pci_exit(struct drm_driver *driver, struct pci_driver *pdriver); +#ifdef CONFIG_PCI extern int drm_get_pci_dev(struct pci_dev *pdev, const struct pci_device_id *ent, struct drm_driver *driver); extern int drm_pci_set_busid(struct drm_device *dev, struct drm_master *master); +#else +static inline int drm_get_pci_dev(struct pci_dev *pdev, + const struct pci_device_id *ent, + struct drm_driver *driver) +{ + return -ENOSYS; +} + +static inline int drm_pci_set_busid(struct drm_device *dev, + struct drm_master *master) +{ + return -ENOSYS; +} +#endif #define DRM_PCIE_SPEED_25 1 #define DRM_PCIE_SPEED_50 2 |