Skip to content

Commit 5c484ce

Browse files
committed
drm: Remove drm_driver->set_busid hook
The only special-case is pci devices, and we can easily handle this in the core. Do so and drop a pile of boilerplate from drivers. Acked-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170524145212.27837-5-daniel.vetter@ffwll.ch
1 parent 76bba2c commit 5c484ce

23 files changed

Lines changed: 3 additions & 31 deletions

File tree

‎drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,6 @@ static struct drm_driver kms_driver = {
734734
.open = amdgpu_driver_open_kms,
735735
.postclose = amdgpu_driver_postclose_kms,
736736
.lastclose = amdgpu_driver_lastclose_kms,
737-
.set_busid = drm_pci_set_busid,
738737
.unload = amdgpu_driver_unload_kms,
739738
.get_vblank_counter = amdgpu_get_vblank_counter_kms,
740739
.enable_vblank = amdgpu_enable_vblank_kms,

‎drivers/gpu/drm/ast/ast_drv.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,6 @@ static struct drm_driver driver = {
197197

198198
.load = ast_driver_load,
199199
.unload = ast_driver_unload,
200-
.set_busid = drm_pci_set_busid,
201200

202201
.fops = &ast_fops,
203202
.name = DRIVER_NAME,

‎drivers/gpu/drm/bochs/bochs_drv.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ static struct drm_driver bochs_driver = {
8484
.driver_features = DRIVER_GEM | DRIVER_MODESET,
8585
.load = bochs_load,
8686
.unload = bochs_unload,
87-
.set_busid = drm_pci_set_busid,
8887
.fops = &bochs_fops,
8988
.name = "bochs-drm",
9089
.desc = "bochs dispi vga interface (qemu stdvga)",

‎drivers/gpu/drm/cirrus/cirrus_drv.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ static struct drm_driver driver = {
132132
.driver_features = DRIVER_MODESET | DRIVER_GEM,
133133
.load = cirrus_driver_load,
134134
.unload = cirrus_driver_unload,
135-
.set_busid = drm_pci_set_busid,
136135
.fops = &cirrus_driver_fops,
137136
.name = DRIVER_NAME,
138137
.desc = DRIVER_DESC,

‎drivers/gpu/drm/drm_internal.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ void drm_lastclose(struct drm_device *dev);
3232
int drm_irq_by_busid(struct drm_device *dev, void *data,
3333
struct drm_file *file_priv);
3434
void drm_pci_agp_destroy(struct drm_device *dev);
35+
int drm_pci_set_busid(struct drm_device *dev, struct drm_master *master);
3536

3637
/* drm_prime.c */
3738
int drm_prime_handle_to_fd_ioctl(struct drm_device *dev, void *data,

‎drivers/gpu/drm/drm_ioctl.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ static int drm_set_busid(struct drm_device *dev, struct drm_file *file_priv)
143143
if (master->unique != NULL)
144144
drm_unset_busid(dev, master);
145145

146-
if (dev->driver->set_busid) {
147-
ret = dev->driver->set_busid(dev, master);
146+
if (dev_is_pci(dev->dev)) {
147+
ret = drm_pci_set_busid(dev, master);
148148
if (ret) {
149149
drm_unset_busid(dev, master);
150150
return ret;

‎drivers/gpu/drm/drm_pci.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@ int drm_pci_set_busid(struct drm_device *dev, struct drm_master *master)
149149
master->unique_len = strlen(master->unique);
150150
return 0;
151151
}
152-
EXPORT_SYMBOL(drm_pci_set_busid);
153152

154153
static int drm_pci_irq_by_busid(struct drm_device *dev, struct drm_irq_busid *p)
155154
{

‎drivers/gpu/drm/gma500/psb_drv.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,6 @@ static struct drm_driver driver = {
480480
.load = psb_driver_load,
481481
.unload = psb_driver_unload,
482482
.lastclose = psb_driver_lastclose,
483-
.set_busid = drm_pci_set_busid,
484483

485484
.num_ioctls = ARRAY_SIZE(psb_ioctls),
486485
.irq_preinstall = psb_irq_preinstall,

‎drivers/gpu/drm/i810/i810_drv.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ static struct drm_driver driver = {
5959
.load = i810_driver_load,
6060
.lastclose = i810_driver_lastclose,
6161
.preclose = i810_driver_preclose,
62-
.set_busid = drm_pci_set_busid,
6362
.dma_quiescent = i810_driver_dma_quiescent,
6463
.ioctls = i810_ioctls,
6564
.fops = &i810_driver_fops,

‎drivers/gpu/drm/i915/i915_drv.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2622,7 +2622,6 @@ static struct drm_driver driver = {
26222622
.open = i915_driver_open,
26232623
.lastclose = i915_driver_lastclose,
26242624
.postclose = i915_driver_postclose,
2625-
.set_busid = drm_pci_set_busid,
26262625

26272626
.gem_close_object = i915_gem_close_object,
26282627
.gem_free_object_unlocked = i915_gem_free_object,

0 commit comments

Comments
 (0)