Commit 793a97e4 authored by Daniel Vetter's avatar Daniel Vetter Committed by Dave Airlie

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: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 690bb51b
...@@ -515,13 +515,6 @@ static int drm_mmap_dma(struct file *filp, struct vm_area_struct *vma) ...@@ -515,13 +515,6 @@ static int drm_mmap_dma(struct file *filp, struct vm_area_struct *vma)
return 0; return 0;
} }
resource_size_t drm_core_get_map_ofs(struct drm_local_map * map)
{
return map->offset;
}
EXPORT_SYMBOL(drm_core_get_map_ofs);
resource_size_t drm_core_get_reg_ofs(struct drm_device *dev) resource_size_t drm_core_get_reg_ofs(struct drm_device *dev)
{ {
#ifdef __alpha__ #ifdef __alpha__
......
...@@ -52,7 +52,6 @@ static struct drm_driver driver = { ...@@ -52,7 +52,6 @@ static struct drm_driver driver = {
.device_is_agp = i810_driver_device_is_agp, .device_is_agp = i810_driver_device_is_agp,
.reclaim_buffers_locked = i810_driver_reclaim_buffers_locked, .reclaim_buffers_locked = i810_driver_reclaim_buffers_locked,
.dma_quiescent = i810_driver_dma_quiescent, .dma_quiescent = i810_driver_dma_quiescent,
.get_map_ofs = drm_core_get_map_ofs,
.get_reg_ofs = drm_core_get_reg_ofs, .get_reg_ofs = drm_core_get_reg_ofs,
.ioctls = i810_ioctls, .ioctls = i810_ioctls,
.fops = { .fops = {
......
...@@ -57,7 +57,6 @@ static struct drm_driver driver = { ...@@ -57,7 +57,6 @@ static struct drm_driver driver = {
.device_is_agp = i830_driver_device_is_agp, .device_is_agp = i830_driver_device_is_agp,
.reclaim_buffers_locked = i830_driver_reclaim_buffers_locked, .reclaim_buffers_locked = i830_driver_reclaim_buffers_locked,
.dma_quiescent = i830_driver_dma_quiescent, .dma_quiescent = i830_driver_dma_quiescent,
.get_map_ofs = drm_core_get_map_ofs,
.get_reg_ofs = drm_core_get_reg_ofs, .get_reg_ofs = drm_core_get_reg_ofs,
#if USE_IRQS #if USE_IRQS
.irq_preinstall = i830_driver_irq_preinstall, .irq_preinstall = i830_driver_irq_preinstall,
......
...@@ -524,7 +524,6 @@ static struct drm_driver driver = { ...@@ -524,7 +524,6 @@ static struct drm_driver driver = {
.irq_uninstall = i915_driver_irq_uninstall, .irq_uninstall = i915_driver_irq_uninstall,
.irq_handler = i915_driver_irq_handler, .irq_handler = i915_driver_irq_handler,
.reclaim_buffers = drm_core_reclaim_buffers, .reclaim_buffers = drm_core_reclaim_buffers,
.get_map_ofs = drm_core_get_map_ofs,
.get_reg_ofs = drm_core_get_reg_ofs, .get_reg_ofs = drm_core_get_reg_ofs,
.master_create = i915_master_create, .master_create = i915_master_create,
.master_destroy = i915_master_destroy, .master_destroy = i915_master_destroy,
......
...@@ -60,7 +60,6 @@ static struct drm_driver driver = { ...@@ -60,7 +60,6 @@ static struct drm_driver driver = {
.irq_uninstall = mga_driver_irq_uninstall, .irq_uninstall = mga_driver_irq_uninstall,
.irq_handler = mga_driver_irq_handler, .irq_handler = mga_driver_irq_handler,
.reclaim_buffers = drm_core_reclaim_buffers, .reclaim_buffers = drm_core_reclaim_buffers,
.get_map_ofs = drm_core_get_map_ofs,
.get_reg_ofs = drm_core_get_reg_ofs, .get_reg_ofs = drm_core_get_reg_ofs,
.ioctls = mga_ioctls, .ioctls = mga_ioctls,
.dma_ioctl = mga_dma_buffers, .dma_ioctl = mga_dma_buffers,
......
...@@ -379,7 +379,6 @@ static struct drm_driver driver = { ...@@ -379,7 +379,6 @@ static struct drm_driver driver = {
.irq_uninstall = nouveau_irq_uninstall, .irq_uninstall = nouveau_irq_uninstall,
.irq_handler = nouveau_irq_handler, .irq_handler = nouveau_irq_handler,
.reclaim_buffers = drm_core_reclaim_buffers, .reclaim_buffers = drm_core_reclaim_buffers,
.get_map_ofs = drm_core_get_map_ofs,
.get_reg_ofs = drm_core_get_reg_ofs, .get_reg_ofs = drm_core_get_reg_ofs,
.ioctls = nouveau_ioctls, .ioctls = nouveau_ioctls,
.fops = { .fops = {
......
...@@ -56,7 +56,6 @@ static struct drm_driver driver = { ...@@ -56,7 +56,6 @@ static struct drm_driver driver = {
.irq_uninstall = r128_driver_irq_uninstall, .irq_uninstall = r128_driver_irq_uninstall,
.irq_handler = r128_driver_irq_handler, .irq_handler = r128_driver_irq_handler,
.reclaim_buffers = drm_core_reclaim_buffers, .reclaim_buffers = drm_core_reclaim_buffers,
.get_map_ofs = drm_core_get_map_ofs,
.get_reg_ofs = drm_core_get_reg_ofs, .get_reg_ofs = drm_core_get_reg_ofs,
.ioctls = r128_ioctls, .ioctls = r128_ioctls,
.dma_ioctl = r128_cce_buffers, .dma_ioctl = r128_cce_buffers,
......
...@@ -203,7 +203,6 @@ static struct drm_driver driver_old = { ...@@ -203,7 +203,6 @@ static struct drm_driver driver_old = {
.irq_uninstall = radeon_driver_irq_uninstall, .irq_uninstall = radeon_driver_irq_uninstall,
.irq_handler = radeon_driver_irq_handler, .irq_handler = radeon_driver_irq_handler,
.reclaim_buffers = drm_core_reclaim_buffers, .reclaim_buffers = drm_core_reclaim_buffers,
.get_map_ofs = drm_core_get_map_ofs,
.get_reg_ofs = drm_core_get_reg_ofs, .get_reg_ofs = drm_core_get_reg_ofs,
.ioctls = radeon_ioctls, .ioctls = radeon_ioctls,
.dma_ioctl = radeon_cp_buffers, .dma_ioctl = radeon_cp_buffers,
...@@ -290,7 +289,6 @@ static struct drm_driver kms_driver = { ...@@ -290,7 +289,6 @@ static struct drm_driver kms_driver = {
.irq_uninstall = radeon_driver_irq_uninstall_kms, .irq_uninstall = radeon_driver_irq_uninstall_kms,
.irq_handler = radeon_driver_irq_handler_kms, .irq_handler = radeon_driver_irq_handler_kms,
.reclaim_buffers = drm_core_reclaim_buffers, .reclaim_buffers = drm_core_reclaim_buffers,
.get_map_ofs = drm_core_get_map_ofs,
.get_reg_ofs = drm_core_get_reg_ofs, .get_reg_ofs = drm_core_get_reg_ofs,
.ioctls = radeon_ioctls_kms, .ioctls = radeon_ioctls_kms,
.gem_init_object = radeon_gem_object_init, .gem_init_object = radeon_gem_object_init,
......
...@@ -42,7 +42,6 @@ static struct drm_driver driver = { ...@@ -42,7 +42,6 @@ static struct drm_driver driver = {
.lastclose = savage_driver_lastclose, .lastclose = savage_driver_lastclose,
.unload = savage_driver_unload, .unload = savage_driver_unload,
.reclaim_buffers = savage_reclaim_buffers, .reclaim_buffers = savage_reclaim_buffers,
.get_map_ofs = drm_core_get_map_ofs,
.get_reg_ofs = drm_core_get_reg_ofs, .get_reg_ofs = drm_core_get_reg_ofs,
.ioctls = savage_ioctls, .ioctls = savage_ioctls,
.dma_ioctl = savage_bci_buffers, .dma_ioctl = savage_bci_buffers,
......
...@@ -71,7 +71,6 @@ static struct drm_driver driver = { ...@@ -71,7 +71,6 @@ static struct drm_driver driver = {
.reclaim_buffers = NULL, .reclaim_buffers = NULL,
.reclaim_buffers_idlelocked = sis_reclaim_buffers_locked, .reclaim_buffers_idlelocked = sis_reclaim_buffers_locked,
.lastclose = sis_lastclose, .lastclose = sis_lastclose,
.get_map_ofs = drm_core_get_map_ofs,
.get_reg_ofs = drm_core_get_reg_ofs, .get_reg_ofs = drm_core_get_reg_ofs,
.ioctls = sis_ioctls, .ioctls = sis_ioctls,
.fops = { .fops = {
......
...@@ -42,7 +42,6 @@ static struct pci_device_id pciidlist[] = { ...@@ -42,7 +42,6 @@ static struct pci_device_id pciidlist[] = {
static struct drm_driver driver = { static struct drm_driver driver = {
.driver_features = DRIVER_USE_MTRR, .driver_features = DRIVER_USE_MTRR,
.reclaim_buffers = drm_core_reclaim_buffers, .reclaim_buffers = drm_core_reclaim_buffers,
.get_map_ofs = drm_core_get_map_ofs,
.get_reg_ofs = drm_core_get_reg_ofs, .get_reg_ofs = drm_core_get_reg_ofs,
.fops = { .fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
......
...@@ -51,7 +51,6 @@ static struct drm_driver driver = { ...@@ -51,7 +51,6 @@ static struct drm_driver driver = {
.reclaim_buffers_locked = NULL, .reclaim_buffers_locked = NULL,
.reclaim_buffers_idlelocked = via_reclaim_buffers_locked, .reclaim_buffers_idlelocked = via_reclaim_buffers_locked,
.lastclose = via_lastclose, .lastclose = via_lastclose,
.get_map_ofs = drm_core_get_map_ofs,
.get_reg_ofs = drm_core_get_reg_ofs, .get_reg_ofs = drm_core_get_reg_ofs,
.ioctls = via_ioctls, .ioctls = via_ioctls,
.fops = { .fops = {
......
...@@ -723,7 +723,6 @@ static struct drm_driver driver = { ...@@ -723,7 +723,6 @@ static struct drm_driver driver = {
.irq_uninstall = vmw_irq_uninstall, .irq_uninstall = vmw_irq_uninstall,
.irq_handler = vmw_irq_handler, .irq_handler = vmw_irq_handler,
.reclaim_buffers_locked = NULL, .reclaim_buffers_locked = NULL,
.get_map_ofs = drm_core_get_map_ofs,
.get_reg_ofs = drm_core_get_reg_ofs, .get_reg_ofs = drm_core_get_reg_ofs,
.ioctls = vmw_ioctls, .ioctls = vmw_ioctls,
.num_ioctls = DRM_ARRAY_SIZE(vmw_ioctls), .num_ioctls = DRM_ARRAY_SIZE(vmw_ioctls),
......
...@@ -772,7 +772,6 @@ struct drm_driver { ...@@ -772,7 +772,6 @@ struct drm_driver {
struct drm_file *file_priv); struct drm_file *file_priv);
void (*reclaim_buffers_idlelocked) (struct drm_device *dev, void (*reclaim_buffers_idlelocked) (struct drm_device *dev,
struct drm_file *file_priv); struct drm_file *file_priv);
resource_size_t (*get_map_ofs) (struct drm_local_map * map);
resource_size_t (*get_reg_ofs) (struct drm_device *dev); resource_size_t (*get_reg_ofs) (struct drm_device *dev);
void (*set_version) (struct drm_device *dev, void (*set_version) (struct drm_device *dev,
struct drm_set_version *sv); struct drm_set_version *sv);
...@@ -1167,7 +1166,6 @@ extern int drm_release(struct inode *inode, struct file *filp); ...@@ -1167,7 +1166,6 @@ extern int drm_release(struct inode *inode, struct file *filp);
extern int drm_mmap(struct file *filp, struct vm_area_struct *vma); extern int drm_mmap(struct file *filp, struct vm_area_struct *vma);
extern int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma); extern int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma);
extern void drm_vm_open_locked(struct vm_area_struct *vma); extern void drm_vm_open_locked(struct vm_area_struct *vma);
extern resource_size_t drm_core_get_map_ofs(struct drm_local_map * map);
extern resource_size_t drm_core_get_reg_ofs(struct drm_device *dev); extern resource_size_t drm_core_get_reg_ofs(struct drm_device *dev);
extern unsigned int drm_poll(struct file *filp, struct poll_table_struct *wait); extern unsigned int drm_poll(struct file *filp, struct poll_table_struct *wait);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment