diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2010-08-23 16:53:27 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-08-29 19:38:50 -0400 |
commit | 793a97e4cc38f834e0488ccc1ecbfe52ff6f5b84 (patch) | |
tree | 418e5c4eef9c7566625829ddc823fa36c6a0d65e | |
parent | 690bb51b54a986e48c7b8b2dba51a3cd262a7266 (diff) |
drm: kill drm_map_ofs callbacks
All drivers happily copy&pasted the default implementation without
checking whether this callback is used at all. It's not. Sigh.
Kill it.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | drivers/gpu/drm/drm_vm.c | 7 | ||||
-rw-r--r-- | drivers/gpu/drm/i810/i810_drv.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/i830/i830_drv.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/mga/mga_drv.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_drv.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/r128/r128_drv.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_drv.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/savage/savage_drv.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/sis/sis_drv.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/tdfx/tdfx_drv.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/via/via_drv.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 1 | ||||
-rw-r--r-- | include/drm/drmP.h | 2 |
14 files changed, 0 insertions, 22 deletions
diff --git a/drivers/gpu/drm/drm_vm.c b/drivers/gpu/drm/drm_vm.c index fda67468e603..2fea2e63a313 100644 --- a/drivers/gpu/drm/drm_vm.c +++ b/drivers/gpu/drm/drm_vm.c | |||
@@ -515,13 +515,6 @@ static int drm_mmap_dma(struct file *filp, struct vm_area_struct *vma) | |||
515 | return 0; | 515 | return 0; |
516 | } | 516 | } |
517 | 517 | ||
518 | resource_size_t drm_core_get_map_ofs(struct drm_local_map * map) | ||
519 | { | ||
520 | return map->offset; | ||
521 | } | ||
522 | |||
523 | EXPORT_SYMBOL(drm_core_get_map_ofs); | ||
524 | |||
525 | resource_size_t drm_core_get_reg_ofs(struct drm_device *dev) | 518 | resource_size_t drm_core_get_reg_ofs(struct drm_device *dev) |
526 | { | 519 | { |
527 | #ifdef __alpha__ | 520 | #ifdef __alpha__ |
diff --git a/drivers/gpu/drm/i810/i810_drv.c b/drivers/gpu/drm/i810/i810_drv.c index b4250b2cac1f..084a85c3d5d5 100644 --- a/drivers/gpu/drm/i810/i810_drv.c +++ b/drivers/gpu/drm/i810/i810_drv.c | |||
@@ -52,7 +52,6 @@ static struct drm_driver driver = { | |||
52 | .device_is_agp = i810_driver_device_is_agp, | 52 | .device_is_agp = i810_driver_device_is_agp, |
53 | .reclaim_buffers_locked = i810_driver_reclaim_buffers_locked, | 53 | .reclaim_buffers_locked = i810_driver_reclaim_buffers_locked, |
54 | .dma_quiescent = i810_driver_dma_quiescent, | 54 | .dma_quiescent = i810_driver_dma_quiescent, |
55 | .get_map_ofs = drm_core_get_map_ofs, | ||
56 | .get_reg_ofs = drm_core_get_reg_ofs, | 55 | .get_reg_ofs = drm_core_get_reg_ofs, |
57 | .ioctls = i810_ioctls, | 56 | .ioctls = i810_ioctls, |
58 | .fops = { | 57 | .fops = { |
diff --git a/drivers/gpu/drm/i830/i830_drv.c b/drivers/gpu/drm/i830/i830_drv.c index a5c66aa82f0c..16352954311c 100644 --- a/drivers/gpu/drm/i830/i830_drv.c +++ b/drivers/gpu/drm/i830/i830_drv.c | |||
@@ -57,7 +57,6 @@ static struct drm_driver driver = { | |||
57 | .device_is_agp = i830_driver_device_is_agp, | 57 | .device_is_agp = i830_driver_device_is_agp, |
58 | .reclaim_buffers_locked = i830_driver_reclaim_buffers_locked, | 58 | .reclaim_buffers_locked = i830_driver_reclaim_buffers_locked, |
59 | .dma_quiescent = i830_driver_dma_quiescent, | 59 | .dma_quiescent = i830_driver_dma_quiescent, |
60 | .get_map_ofs = drm_core_get_map_ofs, | ||
61 | .get_reg_ofs = drm_core_get_reg_ofs, | 60 | .get_reg_ofs = drm_core_get_reg_ofs, |
62 | #if USE_IRQS | 61 | #if USE_IRQS |
63 | .irq_preinstall = i830_driver_irq_preinstall, | 62 | .irq_preinstall = i830_driver_irq_preinstall, |
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 00befce8fbb7..d079f7b86cca 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c | |||
@@ -524,7 +524,6 @@ static struct drm_driver driver = { | |||
524 | .irq_uninstall = i915_driver_irq_uninstall, | 524 | .irq_uninstall = i915_driver_irq_uninstall, |
525 | .irq_handler = i915_driver_irq_handler, | 525 | .irq_handler = i915_driver_irq_handler, |
526 | .reclaim_buffers = drm_core_reclaim_buffers, | 526 | .reclaim_buffers = drm_core_reclaim_buffers, |
527 | .get_map_ofs = drm_core_get_map_ofs, | ||
528 | .get_reg_ofs = drm_core_get_reg_ofs, | 527 | .get_reg_ofs = drm_core_get_reg_ofs, |
529 | .master_create = i915_master_create, | 528 | .master_create = i915_master_create, |
530 | .master_destroy = i915_master_destroy, | 529 | .master_destroy = i915_master_destroy, |
diff --git a/drivers/gpu/drm/mga/mga_drv.c b/drivers/gpu/drm/mga/mga_drv.c index 26d0d8ced80d..e9c0cbc21fe2 100644 --- a/drivers/gpu/drm/mga/mga_drv.c +++ b/drivers/gpu/drm/mga/mga_drv.c | |||
@@ -60,7 +60,6 @@ static struct drm_driver driver = { | |||
60 | .irq_uninstall = mga_driver_irq_uninstall, | 60 | .irq_uninstall = mga_driver_irq_uninstall, |
61 | .irq_handler = mga_driver_irq_handler, | 61 | .irq_handler = mga_driver_irq_handler, |
62 | .reclaim_buffers = drm_core_reclaim_buffers, | 62 | .reclaim_buffers = drm_core_reclaim_buffers, |
63 | .get_map_ofs = drm_core_get_map_ofs, | ||
64 | .get_reg_ofs = drm_core_get_reg_ofs, | 63 | .get_reg_ofs = drm_core_get_reg_ofs, |
65 | .ioctls = mga_ioctls, | 64 | .ioctls = mga_ioctls, |
66 | .dma_ioctl = mga_dma_buffers, | 65 | .dma_ioctl = mga_dma_buffers, |
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.c b/drivers/gpu/drm/nouveau/nouveau_drv.c index 1de5eb53e016..0d64259b21cc 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drv.c +++ b/drivers/gpu/drm/nouveau/nouveau_drv.c | |||
@@ -379,7 +379,6 @@ static struct drm_driver driver = { | |||
379 | .irq_uninstall = nouveau_irq_uninstall, | 379 | .irq_uninstall = nouveau_irq_uninstall, |
380 | .irq_handler = nouveau_irq_handler, | 380 | .irq_handler = nouveau_irq_handler, |
381 | .reclaim_buffers = drm_core_reclaim_buffers, | 381 | .reclaim_buffers = drm_core_reclaim_buffers, |
382 | .get_map_ofs = drm_core_get_map_ofs, | ||
383 | .get_reg_ofs = drm_core_get_reg_ofs, | 382 | .get_reg_ofs = drm_core_get_reg_ofs, |
384 | .ioctls = nouveau_ioctls, | 383 | .ioctls = nouveau_ioctls, |
385 | .fops = { | 384 | .fops = { |
diff --git a/drivers/gpu/drm/r128/r128_drv.c b/drivers/gpu/drm/r128/r128_drv.c index 1e2971f13aa1..42ec20a10eed 100644 --- a/drivers/gpu/drm/r128/r128_drv.c +++ b/drivers/gpu/drm/r128/r128_drv.c | |||
@@ -56,7 +56,6 @@ static struct drm_driver driver = { | |||
56 | .irq_uninstall = r128_driver_irq_uninstall, | 56 | .irq_uninstall = r128_driver_irq_uninstall, |
57 | .irq_handler = r128_driver_irq_handler, | 57 | .irq_handler = r128_driver_irq_handler, |
58 | .reclaim_buffers = drm_core_reclaim_buffers, | 58 | .reclaim_buffers = drm_core_reclaim_buffers, |
59 | .get_map_ofs = drm_core_get_map_ofs, | ||
60 | .get_reg_ofs = drm_core_get_reg_ofs, | 59 | .get_reg_ofs = drm_core_get_reg_ofs, |
61 | .ioctls = r128_ioctls, | 60 | .ioctls = r128_ioctls, |
62 | .dma_ioctl = r128_cce_buffers, | 61 | .dma_ioctl = r128_cce_buffers, |
diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c index 795403b0e2cd..8fd89bb8e610 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.c +++ b/drivers/gpu/drm/radeon/radeon_drv.c | |||
@@ -203,7 +203,6 @@ static struct drm_driver driver_old = { | |||
203 | .irq_uninstall = radeon_driver_irq_uninstall, | 203 | .irq_uninstall = radeon_driver_irq_uninstall, |
204 | .irq_handler = radeon_driver_irq_handler, | 204 | .irq_handler = radeon_driver_irq_handler, |
205 | .reclaim_buffers = drm_core_reclaim_buffers, | 205 | .reclaim_buffers = drm_core_reclaim_buffers, |
206 | .get_map_ofs = drm_core_get_map_ofs, | ||
207 | .get_reg_ofs = drm_core_get_reg_ofs, | 206 | .get_reg_ofs = drm_core_get_reg_ofs, |
208 | .ioctls = radeon_ioctls, | 207 | .ioctls = radeon_ioctls, |
209 | .dma_ioctl = radeon_cp_buffers, | 208 | .dma_ioctl = radeon_cp_buffers, |
@@ -290,7 +289,6 @@ static struct drm_driver kms_driver = { | |||
290 | .irq_uninstall = radeon_driver_irq_uninstall_kms, | 289 | .irq_uninstall = radeon_driver_irq_uninstall_kms, |
291 | .irq_handler = radeon_driver_irq_handler_kms, | 290 | .irq_handler = radeon_driver_irq_handler_kms, |
292 | .reclaim_buffers = drm_core_reclaim_buffers, | 291 | .reclaim_buffers = drm_core_reclaim_buffers, |
293 | .get_map_ofs = drm_core_get_map_ofs, | ||
294 | .get_reg_ofs = drm_core_get_reg_ofs, | 292 | .get_reg_ofs = drm_core_get_reg_ofs, |
295 | .ioctls = radeon_ioctls_kms, | 293 | .ioctls = radeon_ioctls_kms, |
296 | .gem_init_object = radeon_gem_object_init, | 294 | .gem_init_object = radeon_gem_object_init, |
diff --git a/drivers/gpu/drm/savage/savage_drv.c b/drivers/gpu/drm/savage/savage_drv.c index 021de44c15ab..f539996ba230 100644 --- a/drivers/gpu/drm/savage/savage_drv.c +++ b/drivers/gpu/drm/savage/savage_drv.c | |||
@@ -42,7 +42,6 @@ static struct drm_driver driver = { | |||
42 | .lastclose = savage_driver_lastclose, | 42 | .lastclose = savage_driver_lastclose, |
43 | .unload = savage_driver_unload, | 43 | .unload = savage_driver_unload, |
44 | .reclaim_buffers = savage_reclaim_buffers, | 44 | .reclaim_buffers = savage_reclaim_buffers, |
45 | .get_map_ofs = drm_core_get_map_ofs, | ||
46 | .get_reg_ofs = drm_core_get_reg_ofs, | 45 | .get_reg_ofs = drm_core_get_reg_ofs, |
47 | .ioctls = savage_ioctls, | 46 | .ioctls = savage_ioctls, |
48 | .dma_ioctl = savage_bci_buffers, | 47 | .dma_ioctl = savage_bci_buffers, |
diff --git a/drivers/gpu/drm/sis/sis_drv.c b/drivers/gpu/drm/sis/sis_drv.c index 2d1292131500..72b0a74f265f 100644 --- a/drivers/gpu/drm/sis/sis_drv.c +++ b/drivers/gpu/drm/sis/sis_drv.c | |||
@@ -71,7 +71,6 @@ static struct drm_driver driver = { | |||
71 | .reclaim_buffers = NULL, | 71 | .reclaim_buffers = NULL, |
72 | .reclaim_buffers_idlelocked = sis_reclaim_buffers_locked, | 72 | .reclaim_buffers_idlelocked = sis_reclaim_buffers_locked, |
73 | .lastclose = sis_lastclose, | 73 | .lastclose = sis_lastclose, |
74 | .get_map_ofs = drm_core_get_map_ofs, | ||
75 | .get_reg_ofs = drm_core_get_reg_ofs, | 74 | .get_reg_ofs = drm_core_get_reg_ofs, |
76 | .ioctls = sis_ioctls, | 75 | .ioctls = sis_ioctls, |
77 | .fops = { | 76 | .fops = { |
diff --git a/drivers/gpu/drm/tdfx/tdfx_drv.c b/drivers/gpu/drm/tdfx/tdfx_drv.c index ec5a43e65722..38a562647d6f 100644 --- a/drivers/gpu/drm/tdfx/tdfx_drv.c +++ b/drivers/gpu/drm/tdfx/tdfx_drv.c | |||
@@ -42,7 +42,6 @@ static struct pci_device_id pciidlist[] = { | |||
42 | static struct drm_driver driver = { | 42 | static struct drm_driver driver = { |
43 | .driver_features = DRIVER_USE_MTRR, | 43 | .driver_features = DRIVER_USE_MTRR, |
44 | .reclaim_buffers = drm_core_reclaim_buffers, | 44 | .reclaim_buffers = drm_core_reclaim_buffers, |
45 | .get_map_ofs = drm_core_get_map_ofs, | ||
46 | .get_reg_ofs = drm_core_get_reg_ofs, | 45 | .get_reg_ofs = drm_core_get_reg_ofs, |
47 | .fops = { | 46 | .fops = { |
48 | .owner = THIS_MODULE, | 47 | .owner = THIS_MODULE, |
diff --git a/drivers/gpu/drm/via/via_drv.c b/drivers/gpu/drm/via/via_drv.c index 7a1b210401e0..0b9ad8bbb031 100644 --- a/drivers/gpu/drm/via/via_drv.c +++ b/drivers/gpu/drm/via/via_drv.c | |||
@@ -51,7 +51,6 @@ static struct drm_driver driver = { | |||
51 | .reclaim_buffers_locked = NULL, | 51 | .reclaim_buffers_locked = NULL, |
52 | .reclaim_buffers_idlelocked = via_reclaim_buffers_locked, | 52 | .reclaim_buffers_idlelocked = via_reclaim_buffers_locked, |
53 | .lastclose = via_lastclose, | 53 | .lastclose = via_lastclose, |
54 | .get_map_ofs = drm_core_get_map_ofs, | ||
55 | .get_reg_ofs = drm_core_get_reg_ofs, | 54 | .get_reg_ofs = drm_core_get_reg_ofs, |
56 | .ioctls = via_ioctls, | 55 | .ioctls = via_ioctls, |
57 | .fops = { | 56 | .fops = { |
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c index 72ec2e2b6e97..4a832de43dd5 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | |||
@@ -723,7 +723,6 @@ static struct drm_driver driver = { | |||
723 | .irq_uninstall = vmw_irq_uninstall, | 723 | .irq_uninstall = vmw_irq_uninstall, |
724 | .irq_handler = vmw_irq_handler, | 724 | .irq_handler = vmw_irq_handler, |
725 | .reclaim_buffers_locked = NULL, | 725 | .reclaim_buffers_locked = NULL, |
726 | .get_map_ofs = drm_core_get_map_ofs, | ||
727 | .get_reg_ofs = drm_core_get_reg_ofs, | 726 | .get_reg_ofs = drm_core_get_reg_ofs, |
728 | .ioctls = vmw_ioctls, | 727 | .ioctls = vmw_ioctls, |
729 | .num_ioctls = DRM_ARRAY_SIZE(vmw_ioctls), | 728 | .num_ioctls = DRM_ARRAY_SIZE(vmw_ioctls), |
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 7fd1870b6a70..70a14a4faa1e 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h | |||
@@ -772,7 +772,6 @@ struct drm_driver { | |||
772 | struct drm_file *file_priv); | 772 | struct drm_file *file_priv); |
773 | void (*reclaim_buffers_idlelocked) (struct drm_device *dev, | 773 | void (*reclaim_buffers_idlelocked) (struct drm_device *dev, |
774 | struct drm_file *file_priv); | 774 | struct drm_file *file_priv); |
775 | resource_size_t (*get_map_ofs) (struct drm_local_map * map); | ||
776 | resource_size_t (*get_reg_ofs) (struct drm_device *dev); | 775 | resource_size_t (*get_reg_ofs) (struct drm_device *dev); |
777 | void (*set_version) (struct drm_device *dev, | 776 | void (*set_version) (struct drm_device *dev, |
778 | struct drm_set_version *sv); | 777 | struct drm_set_version *sv); |
@@ -1167,7 +1166,6 @@ extern int drm_release(struct inode *inode, struct file *filp); | |||
1167 | extern int drm_mmap(struct file *filp, struct vm_area_struct *vma); | 1166 | extern int drm_mmap(struct file *filp, struct vm_area_struct *vma); |
1168 | extern int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma); | 1167 | extern int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma); |
1169 | extern void drm_vm_open_locked(struct vm_area_struct *vma); | 1168 | extern void drm_vm_open_locked(struct vm_area_struct *vma); |
1170 | extern resource_size_t drm_core_get_map_ofs(struct drm_local_map * map); | ||
1171 | extern resource_size_t drm_core_get_reg_ofs(struct drm_device *dev); | 1169 | extern resource_size_t drm_core_get_reg_ofs(struct drm_device *dev); |
1172 | extern unsigned int drm_poll(struct file *filp, struct poll_table_struct *wait); | 1170 | extern unsigned int drm_poll(struct file *filp, struct poll_table_struct *wait); |
1173 | 1171 | ||