Skip to content

Commit

Permalink
drm/pci: Unexport drm_get_pci_dev
Browse files Browse the repository at this point in the history
Only user left is the shadow attach for legacy drivers.

v2: Shift the #ifdef CONFIG_DRM_LEGACY to now also include
drm_get_pci_dev() (Thomas)

Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Emil Velikov <emil.velikov@collabora.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200225165835.2394442-1-daniel.vetter@ffwll.ch
  • Loading branch information
Daniel Vetter committed Mar 6, 2020
1 parent 8ff1d62 commit c393fba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 32 deletions.
26 changes: 5 additions & 21 deletions drivers/gpu/drm/drm_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ drm_dma_handle_t *drm_pci_alloc(struct drm_device * dev, size_t size, size_t ali

return dmah;
}

EXPORT_SYMBOL(drm_pci_alloc);

/**
Expand Down Expand Up @@ -191,23 +190,11 @@ void drm_pci_agp_destroy(struct drm_device *dev)
}
}

/**
* drm_get_pci_dev - Register a PCI device with the DRM subsystem
* @pdev: PCI device
* @ent: entry from the PCI ID table that matches @pdev
* @driver: DRM device driver
*
* Attempt to gets inter module "drm" information. If we are first
* then register the character device and inter module information.
* Try and register, if we fail to register, backout previous work.
*
* NOTE: This function is deprecated, please use drm_dev_alloc() and
* drm_dev_register() instead and remove your &drm_driver.load callback.
*
* Return: 0 on success or a negative error code on failure.
*/
int drm_get_pci_dev(struct pci_dev *pdev, const struct pci_device_id *ent,
struct drm_driver *driver)
#ifdef CONFIG_DRM_LEGACY

static int drm_get_pci_dev(struct pci_dev *pdev,
const struct pci_device_id *ent,
struct drm_driver *driver)
{
struct drm_device *dev;
int ret;
Expand Down Expand Up @@ -250,9 +237,6 @@ int drm_get_pci_dev(struct pci_dev *pdev, const struct pci_device_id *ent,
drm_dev_put(dev);
return ret;
}
EXPORT_SYMBOL(drm_get_pci_dev);

#ifdef CONFIG_DRM_LEGACY

/**
* drm_legacy_pci_init - shadow-attach a legacy DRM PCI driver
Expand Down
11 changes: 0 additions & 11 deletions include/drm/drm_pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ struct drm_dma_handle *drm_pci_alloc(struct drm_device *dev, size_t size,
size_t align);
void drm_pci_free(struct drm_device *dev, struct drm_dma_handle * dmah);

int drm_get_pci_dev(struct pci_dev *pdev,
const struct pci_device_id *ent,
struct drm_driver *driver);

#else

static inline struct drm_dma_handle *drm_pci_alloc(struct drm_device *dev,
Expand All @@ -62,13 +58,6 @@ static inline void drm_pci_free(struct drm_device *dev,
{
}

static inline int drm_get_pci_dev(struct pci_dev *pdev,
const struct pci_device_id *ent,
struct drm_driver *driver)
{
return -ENOSYS;
}

#endif

#endif /* _DRM_PCI_H_ */

0 comments on commit c393fba

Please sign in to comment.