summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux-core/drmP.h15
-rw-r--r--linux-core/drm_bufs.c14
-rw-r--r--linux-core/drm_context.c8
-rw-r--r--linux-core/drm_drv.c30
-rw-r--r--linux-core/drm_fops.c38
-rw-r--r--linux-core/drm_ioctl.c12
-rw-r--r--linux-core/drm_irq.c12
-rw-r--r--linux-core/drm_lock.c16
-rw-r--r--linux-core/drm_proc.c4
-rw-r--r--linux-core/drm_stub.c15
-rw-r--r--linux-core/drm_vm.c4
-rw-r--r--linux-core/ffb_drv.c10
-rw-r--r--linux-core/i810_drv.c10
-rw-r--r--linux-core/i830_drv.c10
-rw-r--r--linux-core/i915_drv.c14
-rw-r--r--linux-core/mach64_drv.c10
-rw-r--r--linux-core/mga_drv.c10
-rw-r--r--linux-core/r128_drv.c10
-rw-r--r--linux-core/radeon_drv.c10
-rw-r--r--linux-core/savage_drv.c10
-rw-r--r--linux-core/sis_drv.c10
-rw-r--r--linux-core/tdfx_drv.c10
-rw-r--r--shared-core/via_drv.c10
23 files changed, 145 insertions, 147 deletions
diff --git a/linux-core/drmP.h b/linux-core/drmP.h
index 92fd4f01..011ab911 100644
--- a/linux-core/drmP.h
+++ b/linux-core/drmP.h
@@ -508,7 +508,7 @@ typedef struct drm_vbl_sig {
*/
struct drm_device;
-struct drm_driver_fn {
+struct drm_driver {
int (*preinit) (struct drm_device *, unsigned long flags);
void (*prerelease) (struct drm_device *, struct file * filp);
void (*pretakedown) (struct drm_device *);
@@ -553,7 +553,6 @@ struct drm_driver_fn {
* DRM device structure.
*/
typedef struct drm_device {
- const char *name; /**< Simple driver name */
char *unique; /**< Unique identifier: e.g., busid */
int unique_len; /**< Length of unique field */
dev_t device; /**< Device number for mknod */
@@ -679,7 +678,7 @@ typedef struct drm_device {
drm_sigdata_t sigdata; /**< For block_all_signals */
sigset_t sigmask;
- struct drm_driver_fn *fn_tbl;
+ struct drm_driver *driver;
drm_local_map_t *agp_buffer_map;
} drm_device_t;
@@ -696,7 +695,7 @@ typedef struct drm_minor {
static __inline__ int drm_core_check_feature(struct drm_device *dev,
int feature)
{
- return ((dev->fn_tbl->driver_features & feature) ? 1 : 0);
+ return ((dev->driver->driver_features & feature) ? 1 : 0);
}
#if __OS_HAS_AGP
@@ -728,10 +727,10 @@ extern int drm_cpu_valid(void);
/* Driver support (drm_drv.h) */
extern int drm_fb_loaded;
-extern int __devinit drm_init(struct pci_driver *driver,
+extern int __devinit drm_init(struct pci_driver *pci_driver,
struct pci_device_id *pciidlist,
- struct drm_driver_fn *driver_fn);
-extern void __exit drm_exit(struct pci_driver *driver);
+ struct drm_driver *driver);
+extern void __exit drm_exit(struct pci_driver *pci_driver);
extern void __exit drm_cleanup_pci(struct pci_dev *pdev);
extern int drm_version(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg);
@@ -911,7 +910,7 @@ extern int drm_agp_unbind_memory(DRM_AGP_MEM * handle);
/* Stub support (drm_stub.h) */
extern int drm_probe(struct pci_dev *pdev, const struct pci_device_id *ent,
- struct drm_driver_fn *driver_fn);
+ struct drm_driver *driver);
extern int drm_put_minor(drm_device_t * dev);
extern int drm_get_secondary_minor(drm_device_t * dev,
drm_minor_t ** sec_minor);
diff --git a/linux-core/drm_bufs.c b/linux-core/drm_bufs.c
index 8ade8f38..03afff01 100644
--- a/linux-core/drm_bufs.c
+++ b/linux-core/drm_bufs.c
@@ -90,7 +90,7 @@ int drm_initmap(drm_device_t * dev, unsigned int offset, unsigned int size,
list_add(&list->head, &dev->maplist->head);
up(&dev->struct_sem);
- dev->fn_tbl->permanent_maps = 1;
+ dev->driver->permanent_maps = 1;
DRM_DEBUG("finished\n");
return 0;
@@ -155,7 +155,7 @@ int drm_addmap(struct inode *inode, struct file *filp,
struct list_head *_list;
/* If permanent maps are implemented, maps must match */
- if (dev->fn_tbl->permanent_maps) {
+ if (dev->driver->permanent_maps) {
DRM_DEBUG
("Looking for: offset = 0x%08lx, size = 0x%08lx, type = %d\n",
map->offset, map->size, map->type);
@@ -516,7 +516,7 @@ int drm_addbufs_agp(struct inode *inode, struct file *filp,
init_waitqueue_head(&buf->dma_wait);
buf->filp = NULL;
- buf->dev_priv_size = dev->fn_tbl->dev_priv_size;
+ buf->dev_priv_size = dev->driver->dev_priv_size;
buf->dev_private = drm_alloc(buf->dev_priv_size, DRM_MEM_BUFS);
if (!buf->dev_private) {
/* Set count correctly so we free the proper amount. */
@@ -730,8 +730,8 @@ int drm_addbufs_pci(struct inode *inode, struct file *filp,
init_waitqueue_head(&buf->dma_wait);
buf->filp = NULL;
- buf->dev_priv_size = dev->fn_tbl->dev_priv_size;
- buf->dev_private = drm_alloc(dev->fn_tbl->dev_priv_size,
+ buf->dev_priv_size = dev->driver->dev_priv_size;
+ buf->dev_private = drm_alloc(dev->driver->dev_priv_size,
DRM_MEM_BUFS);
if (!buf->dev_private) {
/* Set count correctly so we free the proper amount. */
@@ -911,8 +911,8 @@ int drm_addbufs_sg(struct inode *inode, struct file *filp,
init_waitqueue_head(&buf->dma_wait);
buf->filp = NULL;
- buf->dev_priv_size = dev->fn_tbl->dev_priv_size;
- buf->dev_private = drm_alloc(dev->fn_tbl->dev_priv_size,
+ buf->dev_priv_size = dev->driver->dev_priv_size;
+ buf->dev_private = drm_alloc(dev->driver->dev_priv_size,
DRM_MEM_BUFS);
if (!buf->dev_private) {
/* Set count correctly so we free the proper amount. */
diff --git a/linux-core/drm_context.c b/linux-core/drm_context.c
index a6fec094..feb4c07a 100644
--- a/linux-core/drm_context.c
+++ b/linux-core/drm_context.c
@@ -419,8 +419,8 @@ int drm_addctx(struct inode *inode, struct file *filp,
}
if (ctx.handle != DRM_KERNEL_CONTEXT) {
- if (dev->fn_tbl->context_ctor)
- dev->fn_tbl->context_ctor(dev, ctx.handle);
+ if (dev->driver->context_ctor)
+ dev->driver->context_ctor(dev, ctx.handle);
}
ctx_entry = drm_alloc(sizeof(*ctx_entry), DRM_MEM_CTXLIST);
@@ -554,8 +554,8 @@ int drm_rmctx(struct inode *inode, struct file *filp,
priv->remove_auth_on_close = 1;
}
if (ctx.handle != DRM_KERNEL_CONTEXT) {
- if (dev->fn_tbl->context_dtor)
- dev->fn_tbl->context_dtor(dev, ctx.handle);
+ if (dev->driver->context_dtor)
+ dev->driver->context_dtor(dev, ctx.handle);
drm_ctxbitmap_free(dev, ctx.handle);
}
diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c
index 8ca3524c..c91011dc 100644
--- a/linux-core/drm_drv.c
+++ b/linux-core/drm_drv.c
@@ -163,8 +163,8 @@ int drm_takedown(drm_device_t * dev)
DRM_DEBUG("\n");
- if (dev->fn_tbl->pretakedown)
- dev->fn_tbl->pretakedown(dev);
+ if (dev->driver->pretakedown)
+ dev->driver->pretakedown(dev);
if (dev->irq_enabled)
drm_irq_uninstall(dev);
@@ -318,9 +318,9 @@ MODULE_PARM(drm_opts, "s");
* Expands the \c DRIVER_PREINIT and \c DRIVER_POST_INIT macros before and
* after the initialization for driver customization.
*/
-int drm_init(struct pci_driver *driver,
+int drm_init(struct pci_driver *pci_driver,
struct pci_device_id *pciidlist,
- struct drm_driver_fn *driver_fn)
+ struct drm_driver *driver)
{
struct pci_dev *pdev;
struct pci_device_id *pid;
@@ -357,7 +357,7 @@ int drm_init(struct pci_driver *driver,
}
if (drm_fb_loaded == 0)
- pci_register_driver(driver);
+ pci_register_driver(pci_driver);
else {
for (i = 0; pciidlist[i].vendor != 0; i++) {
pid = &pciidlist[i];
@@ -370,7 +370,7 @@ int drm_init(struct pci_driver *driver,
pdev))) {
/* stealth mode requires a manual probe */
pci_dev_get(pdev);
- drm_probe(pdev, &pciidlist[i], driver_fn);
+ drm_probe(pdev, &pciidlist[i], driver);
}
}
DRM_INFO("Used old pci detect: framebuffer loaded\n");
@@ -459,14 +459,14 @@ static void __exit drm_cleanup(drm_device_t * dev)
drm_free(dev->agp, sizeof(*dev->agp), DRM_MEM_AGPLISTS);
dev->agp = NULL;
}
- if (dev->fn_tbl->postcleanup)
- dev->fn_tbl->postcleanup(dev);
+ if (dev->driver->postcleanup)
+ dev->driver->postcleanup(dev);
if (drm_put_minor(dev))
DRM_ERROR("Cannot unload module\n");
}
-void __exit drm_exit(struct pci_driver *driver)
+void __exit drm_exit(struct pci_driver *pci_driver)
{
int i;
drm_device_t *dev;
@@ -486,7 +486,7 @@ void __exit drm_exit(struct pci_driver *driver)
}
}
} else
- pci_unregister_driver(driver);
+ pci_unregister_driver(pci_driver);
DRM_INFO("Module unloaded\n");
}
EXPORT_SYMBOL(drm_exit);
@@ -578,7 +578,7 @@ int drm_version(struct inode *inode, struct file *filp,
return -EFAULT;
/* version is a required function to return the personality module version */
- if ((ret = dev->fn_tbl->version(&version)))
+ if ((ret = dev->driver->version(&version)))
return ret;
if (copy_to_user(argp, &version, sizeof(version)))
@@ -619,14 +619,14 @@ int drm_ioctl(struct inode *inode, struct file *filp,
if (nr < DRIVER_IOCTL_COUNT)
ioctl = &drm_ioctls[nr];
else if ((nr >= DRM_COMMAND_BASE)
- || (nr < DRM_COMMAND_BASE + dev->fn_tbl->num_ioctls))
- ioctl = &dev->fn_tbl->ioctls[nr - DRM_COMMAND_BASE];
+ || (nr < DRM_COMMAND_BASE + dev->driver->num_ioctls))
+ ioctl = &dev->driver->ioctls[nr - DRM_COMMAND_BASE];
else
goto err_i1;
func = ioctl->func;
- if ((nr == DRM_IOCTL_NR(DRM_IOCTL_DMA)) && dev->fn_tbl->dma_ioctl) /* Local override? */
- func = dev->fn_tbl->dma_ioctl;
+ if ((nr == DRM_IOCTL_NR(DRM_IOCTL_DMA)) && dev->driver->dma_ioctl) /* Local override? */
+ func = dev->driver->dma_ioctl;
if (!func) {
DRM_DEBUG("no function\n");
diff --git a/linux-core/drm_fops.c b/linux-core/drm_fops.c
index e6e0e867..0ae1be9b 100644
--- a/linux-core/drm_fops.c
+++ b/linux-core/drm_fops.c
@@ -41,8 +41,8 @@ static int drm_setup(drm_device_t * dev)
{
int i;
- if (dev->fn_tbl->presetup)
- dev->fn_tbl->presetup(dev);
+ if (dev->driver->presetup)
+ dev->driver->presetup(dev);
atomic_set(&dev->ioctl_count, 0);
atomic_set(&dev->vma_count, 0);
@@ -105,8 +105,8 @@ static int drm_setup(drm_device_t * dev)
* drm_select_queue fails between the time the interrupt is
* initialized and the time the queues are initialized.
*/
- if (dev->fn_tbl->postsetup)
- dev->fn_tbl->postsetup(dev);
+ if (dev->driver->postsetup)
+ dev->driver->postsetup(dev);
return 0;
}
@@ -176,7 +176,7 @@ int drm_stub_open(struct inode *inode, struct file *filp)
return -ENODEV;
old_fops = filp->f_op;
- filp->f_op = fops_get(&dev->fn_tbl->fops);
+ filp->f_op = fops_get(&dev->driver->fops);
if (filp->f_op->open && (err = filp->f_op->open(inode, filp))) {
fops_put(filp->f_op);
filp->f_op = fops_get(old_fops);
@@ -224,8 +224,8 @@ int drm_open_helper(struct inode *inode, struct file *filp, drm_device_t * dev)
priv->authenticated = capable(CAP_SYS_ADMIN);
priv->lock_count = 0;
- if (dev->fn_tbl->open_helper) {
- ret = dev->fn_tbl->open_helper(dev, priv);
+ if (dev->driver->open_helper) {
+ ret = dev->driver->open_helper(dev, priv);
if (ret < 0)
goto out_free;
}
@@ -307,8 +307,8 @@ int drm_release(struct inode *inode, struct file *filp)
DRM_DEBUG("open_count = %d\n", dev->open_count);
- if (dev->fn_tbl->prerelease)
- dev->fn_tbl->prerelease(dev, filp);
+ if (dev->driver->prerelease)
+ dev->driver->prerelease(dev, filp);
/* ========================================================
* Begin inline drm_release
@@ -324,8 +324,8 @@ int drm_release(struct inode *inode, struct file *filp)
DRM_DEBUG("File %p released, freeing lock for context %d\n",
filp, _DRM_LOCKING_CONTEXT(dev->lock.hw_lock->lock));
- if (dev->fn_tbl->release)
- dev->fn_tbl->release(dev, filp);
+ if (dev->driver->release)
+ dev->driver->release(dev, filp);
drm_lock_free(dev, &dev->lock.hw_lock->lock,
_DRM_LOCKING_CONTEXT(dev->lock.hw_lock->lock));
@@ -334,7 +334,7 @@ int drm_release(struct inode *inode, struct file *filp)
hardware at this point, possibly
processed via a callback to the X
server. */
- } else if (dev->fn_tbl->release && priv->lock_count
+ } else if (dev->driver->release && priv->lock_count
&& dev->lock.hw_lock) {
/* The lock is required to reclaim buffers */
DECLARE_WAITQUEUE(entry, current);
@@ -364,15 +364,15 @@ int drm_release(struct inode *inode, struct file *filp)
current->state = TASK_RUNNING;
remove_wait_queue(&dev->lock.lock_queue, &entry);
if (!retcode) {
- if (dev->fn_tbl->release)
- dev->fn_tbl->release(dev, filp);
+ if (dev->driver->release)
+ dev->driver->release(dev, filp);
drm_lock_free(dev, &dev->lock.hw_lock->lock,
DRM_KERNEL_CONTEXT);
}
}
if (drm_core_check_feature(dev, DRIVER_HAVE_DMA)) {
- dev->fn_tbl->reclaim_buffers(filp);
+ dev->driver->reclaim_buffers(filp);
}
drm_fasync(-1, filp, 0);
@@ -384,8 +384,8 @@ int drm_release(struct inode *inode, struct file *filp)
list_for_each_entry_safe(pos, n, &dev->ctxlist->head, head) {
if (pos->tag == priv &&
pos->handle != DRM_KERNEL_CONTEXT) {
- if (dev->fn_tbl->context_dtor)
- dev->fn_tbl->context_dtor(dev,
+ if (dev->driver->context_dtor)
+ dev->driver->context_dtor(dev,
pos->handle);
drm_ctxbitmap_free(dev, pos->handle);
@@ -418,8 +418,8 @@ int drm_release(struct inode *inode, struct file *filp)
}
up(&dev->struct_sem);
- if (dev->fn_tbl->free_filp_priv)
- dev->fn_tbl->free_filp_priv(dev, priv);
+ if (dev->driver->free_filp_priv)
+ dev->driver->free_filp_priv(dev, priv);
drm_free(priv, sizeof(*priv), DRM_MEM_FILES);
/* ========================================================
diff --git a/linux-core/drm_ioctl.c b/linux-core/drm_ioctl.c
index f255b953..831cdf7b 100644
--- a/linux-core/drm_ioctl.c
+++ b/linux-core/drm_ioctl.c
@@ -109,12 +109,12 @@ int drm_setunique(struct inode *inode, struct file *filp,
dev->unique[dev->unique_len] = '\0';
- dev->devname = drm_alloc(strlen(dev->name) + strlen(dev->unique) + 2,
+ dev->devname = drm_alloc(strlen(dev->pdev->driver->name) + strlen(dev->unique) + 2,
DRM_MEM_DRIVER);
if (!dev->devname)
return -ENOMEM;
- sprintf(dev->devname, "%s@%s", dev->name, dev->unique);
+ sprintf(dev->devname, "%s@%s", dev->pdev->driver->name, dev->unique);
/* Return error if the busid submitted doesn't match the device's actual
* busid.
@@ -146,12 +146,12 @@ static int drm_set_busid(drm_device_t * dev)
snprintf(dev->unique, dev->unique_len, "pci:%04x:%02x:%02x.%d",
dev->pci_domain, dev->pci_bus, dev->pci_slot, dev->pci_func);
- dev->devname = drm_alloc(strlen(dev->name) + dev->unique_len + 2,
+ dev->devname = drm_alloc(strlen(dev->pdev->driver->name) + dev->unique_len + 2,
DRM_MEM_DRIVER);
if (dev->devname == NULL)
return ENOMEM;
- sprintf(dev->devname, "%s@%s", dev->name, dev->unique);
+ sprintf(dev->devname, "%s@%s", dev->pdev->driver->name, dev->unique);
return 0;
}
@@ -350,8 +350,8 @@ int drm_setversion(DRM_IOCTL_ARGS)
sv.drm_dd_minor < 0 || sv.drm_dd_minor > DRIVER_MINOR)
return EINVAL;
- if (dev->fn_tbl->set_version)
- dev->fn_tbl->set_version(dev, &sv);
+ if (dev->driver->set_version)
+ dev->driver->set_version(dev, &sv);
}
return 0;
}
diff --git a/linux-core/drm_irq.c b/linux-core/drm_irq.c
index 30caa529..759c0a9c 100644
--- a/linux-core/drm_irq.c
+++ b/linux-core/drm_irq.c
@@ -125,13 +125,13 @@ int drm_irq_install(drm_device_t * dev)
}
/* Before installing handler */
- dev->fn_tbl->irq_preinstall(dev);
+ dev->driver->irq_preinstall(dev);
/* Install handler */
if (drm_core_check_feature(dev, DRIVER_IRQ_SHARED))
sh_flags = SA_SHIRQ;
- ret = request_irq(dev->irq, dev->fn_tbl->irq_handler,
+ ret = request_irq(dev->irq, dev->driver->irq_handler,
sh_flags, dev->devname, dev);
if (ret < 0) {
down(&dev->struct_sem);
@@ -141,7 +141,7 @@ int drm_irq_install(drm_device_t * dev)
}
/* After installing handler */
- dev->fn_tbl->irq_postinstall(dev);
+ dev->driver->irq_postinstall(dev);
return 0;
}
@@ -170,7 +170,7 @@ int drm_irq_uninstall(drm_device_t * dev)
DRM_DEBUG("%s: irq=%d\n", __FUNCTION__, dev->irq);
- dev->fn_tbl->irq_uninstall(dev);
+ dev->driver->irq_uninstall(dev);
free_irq(dev->irq, dev);
@@ -316,9 +316,9 @@ int drm_wait_vblank(DRM_IOCTL_ARGS)
spin_unlock_irqrestore(&dev->vbl_lock, irqflags);
} else {
- if (dev->fn_tbl->vblank_wait)
+ if (dev->driver->vblank_wait)
ret =
- dev->fn_tbl->vblank_wait(dev,
+ dev->driver->vblank_wait(dev,
&vblwait.request.sequence);
do_gettimeofday(&now);
diff --git a/linux-core/drm_lock.c b/linux-core/drm_lock.c
index ea9485b5..63253bfe 100644
--- a/linux-core/drm_lock.c
+++ b/linux-core/drm_lock.c
@@ -108,15 +108,15 @@ int drm_lock(struct inode *inode, struct file *filp,
dev->sigdata.lock = dev->lock.hw_lock;
block_all_signals(drm_notifier, &dev->sigdata, &dev->sigmask);
- if (dev->fn_tbl->dma_ready && (lock.flags & _DRM_LOCK_READY))
- dev->fn_tbl->dma_ready(dev);
+ if (dev->driver->dma_ready && (lock.flags & _DRM_LOCK_READY))
+ dev->driver->dma_ready(dev);
- if (dev->fn_tbl->dma_quiescent && (lock.flags & _DRM_LOCK_QUIESCENT))
- return dev->fn_tbl->dma_quiescent(dev);
+ if (dev->driver->dma_quiescent && (lock.flags & _DRM_LOCK_QUIESCENT))
+ return dev->driver->dma_quiescent(dev);
- if (dev->fn_tbl->kernel_context_switch
+ if (dev->driver->kernel_context_switch
&& dev->last_context != lock.context) {
- dev->fn_tbl->kernel_context_switch(dev, dev->last_context,
+ dev->driver->kernel_context_switch(dev, dev->last_context,
lock.context);
}
@@ -154,8 +154,8 @@ int drm_unlock(struct inode *inode, struct file *filp,
atomic_inc(&dev->counts[_DRM_STAT_UNLOCKS]);
- if (dev->fn_tbl->kernel_context_switch_unlock)
- dev->fn_tbl->kernel_context_switch_unlock(dev);
+ if (dev->driver->kernel_context_switch_unlock)
+ dev->driver->kernel_context_switch_unlock(dev);
else {
drm_lock_transfer(dev, &dev->lock.hw_lock->lock,
DRM_KERNEL_CONTEXT);
diff --git a/linux-core/drm_proc.c b/linux-core/drm_proc.c
index 0f2bd480..0684da16 100644
--- a/linux-core/drm_proc.c
+++ b/linux-core/drm_proc.c
@@ -175,10 +175,10 @@ static int drm_name_info(char *buf, char **start, off_t offset, int request,
if (dev->unique) {
DRM_PROC_PRINT("%s 0x%lx %s\n",
- dev->name, (long)old_encode_dev(dev->device),
+ dev->pdev->driver->name, (long)old_encode_dev(dev->device),
dev->unique);
} else {
- DRM_PROC_PRINT("%s 0x%lx\n", dev->name,
+ DRM_PROC_PRINT("%s 0x%lx\n", dev->pdev->driver->name,
(long)old_encode_dev(dev->device));
}
diff --git a/linux-core/drm_stub.c b/linux-core/drm_stub.c
index ed4cd19b..03327839 100644
--- a/linux-core/drm_stub.c
+++ b/linux-core/drm_stub.c
@@ -54,7 +54,7 @@ struct proc_dir_entry *drm_proc_root;
static int fill_in_dev(drm_device_t * dev, struct pci_dev *pdev,
const struct pci_device_id *ent,
- struct drm_driver_fn *driver_fn)
+ struct drm_driver *driver)
{
int retcode;
@@ -63,7 +63,6 @@ static int fill_in_dev(drm_device_t * dev, struct pci_dev *pdev,
sema_init(&dev->struct_sem, 1);
sema_init(&dev->ctxlist_sem, 1);
- dev->name = DRIVER_NAME;
dev->pdev = pdev;
#ifdef __alpha__
@@ -91,10 +90,10 @@ static int fill_in_dev(drm_device_t * dev, struct pci_dev *pdev,
dev->types[4] = _DRM_STAT_LOCKS;
dev->types[5] = _DRM_STAT_UNLOCKS;
- dev->fn_tbl = driver_fn;
+ dev->driver = driver;
- if (dev->fn_tbl->preinit)
- if ((retcode = dev->fn_tbl->preinit(dev, ent->driver_data)))
+ if (dev->driver->preinit)
+ if ((retcode = dev->driver->preinit(dev, ent->driver_data)))
goto error_out_unreg;
if (drm_core_has_AGP(dev)) {
@@ -125,7 +124,7 @@ static int fill_in_dev(drm_device_t * dev, struct pci_dev *pdev,
/* postinit is a required function to display the signon banner */
/* drivers add secondary heads here if needed */
- if ((retcode = dev->fn_tbl->postinit(dev, ent->driver_data)))
+ if ((retcode = dev->driver->postinit(dev, ent->driver_data)))
goto error_out_unreg;
return 0;
@@ -147,7 +146,7 @@ static int fill_in_dev(drm_device_t * dev, struct pci_dev *pdev,
* Try and register, if we fail to register, backout previous work.
*/
int drm_probe(struct pci_dev *pdev, const struct pci_device_id *ent,
- struct drm_driver_fn *driver_fn)
+ struct drm_driver *driver)
{
struct class_device *dev_class;
drm_device_t *dev;
@@ -173,7 +172,7 @@ int drm_probe(struct pci_dev *pdev, const struct pci_device_id *ent,
pci_request_regions(pdev, DRIVER_NAME);
pci_enable_device(pdev);
}
- if ((ret = fill_in_dev(dev, pdev, ent, driver_fn))) {
+ if ((ret = fill_in_dev(dev, pdev, ent, driver))) {
printk(KERN_ERR "DRM: Fill_in_dev failed.\n");
goto err_g1;
}
diff --git a/linux-core/drm_vm.c b/linux-core/drm_vm.c
index 6bfb4f10..70737a3c 100644
--- a/linux-core/drm_vm.c
+++ b/linux-core/drm_vm.c
@@ -577,7 +577,7 @@ int drm_mmap(struct file *filp, struct vm_area_struct *vma)
map = r_list->map;
if (!map)
continue;
- off = dev->fn_tbl->get_map_ofs(map);
+ off = dev->driver->get_map_ofs(map);
if (off == VM_OFFSET(vma))
break;
}
@@ -638,7 +638,7 @@ int drm_mmap(struct file *filp, struct vm_area_struct *vma)
vma->vm_page_prot =
pgprot_writecombine(vma->vm_page_prot);
#endif
- offset = dev->fn_tbl->get_reg_ofs(dev);
+ offset = dev->driver->get_reg_ofs(dev);
#ifdef __sparc__
if (io_remap_page_range(DRM_RPR_ARG(vma) vma->vm_start,
VM_OFFSET(vma) + offset,
diff --git a/linux-core/ffb_drv.c b/linux-core/ffb_drv.c
index 5c4758a0..c4a1a9fa 100644
--- a/linux-core/ffb_drv.c
+++ b/linux-core/ffb_drv.c
@@ -305,7 +305,7 @@ static struct pci_device_id pciidlist[] = {
ffb_PCI_IDS
};
-static struct drm_driver_fn ffb_driver_fn = {
+static struct drm_driver ffb_driver = {
.release = ffb_driver_release,
.presetup = ffb_driver_presetup,
.pretakedown = ffb_driver_pretakedown,
@@ -330,10 +330,10 @@ static struct drm_driver_fn ffb_driver_fn = {
static int probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
- return drm_probe(pdev, ent, &driver_fn);
+ return drm_probe(pdev, ent, &driver);
}
-static struct pci_driver driver = {
+static struct pci_driver pci_driver = {
.name = DRIVER_NAME,
.id_table = pciidlist,
.probe = probe,
@@ -342,12 +342,12 @@ static struct pci_driver driver = {
static int __init ffb_init(void)
{
- return drm_init(&driver, pciidlist, &driver_fn);
+ return drm_init(&pci_driver, pciidlist, &driver);
}
static void __exit ffb_exit(void)
{
- drm_exit(&driver);
+ drm_exit(&pci_driver);
}
module_init(ffb_init);
diff --git a/linux-core/i810_drv.c b/linux-core/i810_drv.c
index 1081d9c8..df48ebcf 100644
--- a/linux-core/i810_drv.c
+++ b/linux-core/i810_drv.c
@@ -92,7 +92,7 @@ static drm_ioctl_desc_t ioctls[] = {
[DRM_IOCTL_NR(DRM_I810_FLIP)] = {i810_flip_bufs, 1, 0}
};
-static struct drm_driver_fn driver_fn = {
+static struct drm_driver driver = {
.driver_features =
DRIVER_USE_AGP | DRIVER_REQUIRE_AGP | DRIVER_USE_MTRR |
DRIVER_HAVE_DMA | DRIVER_DMA_QUEUE,
@@ -120,10 +120,10 @@ static struct drm_driver_fn driver_fn = {
static int probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
- return drm_probe(pdev, ent, &driver_fn);
+ return drm_probe(pdev, ent, &driver);
}
-static struct pci_driver driver = {
+static struct pci_driver pci_driver = {
.name = DRIVER_NAME,
.id_table = pciidlist,
.probe = probe,
@@ -132,12 +132,12 @@ static struct pci_driver driver = {
static int __init i810_init(void)
{
- return drm_init(&driver, pciidlist, &driver_fn);
+ return drm_init(&pci_driver, pciidlist, &driver);
}
static void __exit i810_exit(void)
{
- drm_exit(&driver);
+ drm_exit(&pci_driver);
}
module_init(i810_init);
diff --git a/linux-core/i830_drv.c b/linux-core/i830_drv.c
index 9f0a5d3c..bbf48886 100644
--- a/linux-core/i830_drv.c
+++ b/linux-core/i830_drv.c
@@ -93,7 +93,7 @@ static drm_ioctl_desc_t ioctls[] = {
[DRM_IOCTL_NR(DRM_I830_SETPARAM)] = {i830_setparam, 1, 0}
};
-static struct drm_driver_fn driver_fn = {
+static struct drm_driver driver = {
.driver_features =
DRIVER_USE_AGP | DRIVER_REQUIRE_AGP | DRIVER_USE_MTRR |
DRIVER_HAVE_DMA | DRIVER_DMA_QUEUE,
@@ -130,10 +130,10 @@ static struct drm_driver_fn driver_fn = {
static int probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
- return drm_probe(pdev, ent, &driver_fn);
+ return drm_probe(pdev, ent, &driver);
}
-static struct pci_driver driver = {
+static struct pci_driver pci_driver = {
.name = DRIVER_NAME,
.id_table = pciidlist,
.probe = probe,
@@ -142,12 +142,12 @@ static struct pci_driver driver = {
static int __init i830_init(void)
{
- return drm_init(&driver, pciidlist, &driver_fn);
+ return drm_init(&pci_driver, pciidlist, &driver);
}
static void __exit i830_exit(void)
{
- drm_exit(&driver);
+ drm_exit(&pci_driver);
}
module_init(i830_init);
diff --git a/linux-core/i915_drv.c b/linux-core/i915_drv.c
index 77b48045..007c9b94 100644
--- a/linux-core/i915_drv.c
+++ b/linux-core/i915_drv.c
@@ -2,10 +2,10 @@
*/
/**************************************************************************
- *
+ *
* Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
**************************************************************************/
#include "drmP.h"
@@ -65,7 +65,7 @@ static drm_ioctl_desc_t ioctls[] = {
[DRM_IOCTL_NR(DRM_I915_CMDBUFFER)] = {i915_cmdbuffer, 1, 0}
};
-static struct drm_driver_fn driver_fn = {
+static struct drm_driver driver = {
.driver_features =
DRIVER_USE_AGP | DRIVER_REQUIRE_AGP | DRIVER_USE_MTRR |
DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED,
@@ -94,10 +94,10 @@ static struct drm_driver_fn driver_fn = {
static int probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
- return drm_probe(pdev, ent, &driver_fn);
+ return drm_probe(pdev, ent, &driver);
}
-static struct pci_driver driver = {
+static struct pci_driver pci_driver = {
.name = DRIVER_NAME,
.id_table = pciidlist,
.probe = probe,
@@ -106,12 +106,12 @@ static struct pci_driver driver = {
static int __init i915_init(void)
{
- return drm_init(&driver, pciidlist, &driver_fn);
+ return drm_init(&pci_driver, pciidlist, &driver);
}
static void __exit i915_exit(void)
{
- drm_exit(&driver);
+ drm_exit(&pci_driver);
}
module_init(i915_init);
diff --git a/linux-core/mach64_drv.c b/linux-core/mach64_drv.c
index ae34e70c..c70ce061 100644
--- a/linux-core/mach64_drv.c
+++ b/linux-core/mach64_drv.c
@@ -81,7 +81,7 @@ static drm_ioctl_desc_t ioctls[] = {
[DRM_IOCTL_NR(DRM_MACH64_GETPARAM)] = {mach64_get_param, 1, 0},
};
-static struct drm_driver_fn driver_fn = {
+static struct drm_driver driver = {
.driver_features =
DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_PCI_DMA | DRIVER_HAVE_DMA
| DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_IRQ_VBL,
@@ -111,10 +111,10 @@ static struct drm_driver_fn driver_fn = {
static int probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
- return drm_probe(pdev, ent, &driver_fn);
+ return drm_probe(pdev, ent, &driver);
}
-static struct pci_driver driver = {
+static struct pci_driver pci_driver = {
.name = DRIVER_NAME,
.id_table = pciidlist,
.probe = probe,
@@ -123,12 +123,12 @@ static struct pci_driver driver = {
static int __init mach64_init(void)
{
- return drm_init(&driver, pciidlist, &driver_fn);
+ return drm_init(&pci_driver, pciidlist, &driver);
}
static void __exit mach64_exit(void)
{
- drm_exit(&driver);
+ drm_exit(&pci_driver);
}
module_init(mach64_init);
diff --git a/linux-core/mga_drv.c b/linux-core/mga_drv.c
index 08b6bcb4..415619c9 100644
--- a/linux-core/mga_drv.c
+++ b/linux-core/mga_drv.c
@@ -84,7 +84,7 @@ static drm_ioctl_desc_t ioctls[] = {
[DRM_IOCTL_NR(DRM_MGA_GETPARAM)] = {mga_getparam, 1, 0},
};
-static struct drm_driver_fn driver_fn = {
+static struct drm_driver driver = {
.driver_features =
DRIVER_USE_AGP | DRIVER_REQUIRE_AGP | DRIVER_USE_MTRR |
DRIVER_HAVE_DMA | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED |
@@ -116,10 +116,10 @@ static struct drm_driver_fn driver_fn = {
static int probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
- return drm_probe(pdev, ent, &driver_fn);
+ return drm_probe(pdev, ent, &driver);
}
-static struct pci_driver driver = {
+static struct pci_driver pci_driver = {
.name = DRIVER_NAME,
.id_table = pciidlist,
.probe = probe,
@@ -128,12 +128,12 @@ static struct pci_driver driver = {
static int __init mga_init(void)
{
- return drm_init(&driver, pciidlist, &driver_fn);
+ return drm_init(&pci_driver, pciidlist, &driver);
}
static void __exit mga_exit(void)
{
- drm_exit(&driver);
+ drm_exit(&pci_driver);
}
module_init(mga_init);
diff --git a/linux-core/r128_drv.c b/linux-core/r128_drv.c
index cead11e4..741e6990 100644
--- a/linux-core/r128_drv.c
+++ b/linux-core/r128_drv.c
@@ -93,7 +93,7 @@ static drm_ioctl_desc_t ioctls[] = {
[DRM_IOCTL_NR(DRM_R128_GETPARAM)] = {r128_getparam, 1, 0},
};
-static struct drm_driver_fn driver_fn = {
+static struct drm_driver driver = {
.driver_features =
DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_PCI_DMA | DRIVER_SG |
DRIVER_HAVE_DMA | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED |
@@ -127,10 +127,10 @@ static struct drm_driver_fn driver_fn = {
static int probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
- return drm_probe(pdev, ent, &driver_fn);
+ return drm_probe(pdev, ent, &driver);
}
-static struct pci_driver driver = {
+static struct pci_driver pci_driver = {
.name = DRIVER_NAME,
.id_table = pciidlist,
.probe = probe,
@@ -139,12 +139,12 @@ static struct pci_driver driver = {
static int __init r128_init(void)
{
- return drm_init(&driver, pciidlist, &driver_fn);
+ return drm_init(&pci_driver, pciidlist, &driver);
}
static void __exit r128_exit(void)
{
- drm_exit(&driver);
+ drm_exit(&pci_driver);
}
module_init(r128_init);
diff --git a/linux-core/radeon_drv.c b/linux-core/radeon_drv.c
index 2ae1838f..978ba1de 100644
--- a/linux-core/radeon_drv.c
+++ b/linux-core/radeon_drv.c
@@ -128,7 +128,7 @@ static drm_ioctl_desc_t ioctls[] = {
[DRM_IOCTL_NR(DRM_RADEON_SETPARAM)] = {radeon_cp_setparam, 1, 0},
};
-static struct drm_driver_fn driver_fn = {
+static struct drm_driver driver = {
.driver_features =
DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_PCI_DMA | DRIVER_SG |
DRIVER_HAVE_IRQ | DRIVER_HAVE_DMA | DRIVER_IRQ_SHARED |
@@ -167,10 +167,10 @@ static struct drm_driver_fn driver_fn = {
static int probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
- return drm_probe(pdev, ent, &driver_fn);
+ return drm_probe(pdev, ent, &driver);
}
-static struct pci_driver driver = {
+static struct pci_driver pci_driver = {
.name = DRIVER_NAME,
.id_table = pciidlist,
.probe = probe,
@@ -179,12 +179,12 @@ static struct pci_driver driver = {
static int __init radeon_init(void)
{
- return drm_init(&driver, pciidlist, &driver_fn);
+ return drm_init(&pci_driver, pciidlist, &driver);
}
static void __exit radeon_exit(void)
{
- drm_exit(&driver);
+ drm_exit(&pci_driver);
}
module_init(radeon_init);
diff --git a/linux-core/savage_drv.c b/linux-core/savage_drv.c
index db7dbe0d..833812f9 100644
--- a/linux-core/savage_drv.c
+++ b/linux-core/savage_drv.c
@@ -282,7 +282,7 @@ static drm_ioctl_desc_t ioctls[] = {
#endif
};
-static struct drm_driver_fn driver_fn = {
+static struct drm_driver driver = {
.driver_features = DRIVER_USE_AGP | DRIVER_USE_MTRR,
.reclaim_buffers = drm_core_reclaim_buffers,
.get_map_ofs = drm_core_get_map_ofs,
@@ -304,10 +304,10 @@ static struct drm_driver_fn driver_fn = {
static int probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
- return drm_probe(pdev, ent, &driver_fn);
+ return drm_probe(pdev, ent, &driver);
}
-static struct pci_driver driver = {
+static struct pci_driver pci_driver = {
.name = DRIVER_NAME,
.id_table = pciidlist,
.probe = probe,
@@ -316,12 +316,12 @@ static struct pci_driver driver = {
static int __init savage_init(void)
{
- return drm_init(&driver, pciidlist, &driver_fn);
+ return drm_init(&pci_driver, pciidlist, &driver);
}
static void __exit savage_exit(void)
{
- drm_exit(&driver);
+ drm_exit(&pci_driver);
}
module_init(savage_init);
diff --git a/linux-core/sis_drv.c b/linux-core/sis_drv.c
index 4db7b5c7..69ca3929 100644
--- a/linux-core/sis_drv.c
+++ b/linux-core/sis_drv.c
@@ -70,7 +70,7 @@ static drm_ioctl_desc_t ioctls[] = {
[DRM_IOCTL_NR(DRM_SIS_FB_INIT)] = {sis_fb_init, 1, 1}
};
-static struct drm_driver_fn driver_fn = {
+static struct drm_driver driver = {
.driver_features = DRIVER_USE_AGP | DRIVER_USE_MTRR,
.context_ctor = sis_init_context,
.context_dtor = sis_final_context,
@@ -93,10 +93,10 @@ static struct drm_driver_fn driver_fn = {
static int probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
- return drm_probe(pdev, ent, &driver_fn);
+ return drm_probe(pdev, ent, &driver);
}
-static struct pci_driver driver = {
+static struct pci_driver pci_driver = {
.name = DRIVER_NAME,
.id_table = pciidlist,
.probe = probe,
@@ -105,12 +105,12 @@ static struct pci_driver driver = {
static int __init sis_init(void)
{
- return drm_init(&driver, pciidlist, &driver_fn);
+ return drm_init(&pci_driver, pciidlist, &driver);
}
static void __exit sis_exit(void)
{
- drm_exit(&driver);
+ drm_exit(&pci_driver);
}
module_init(sis_init);
diff --git a/linux-core/tdfx_drv.c b/linux-core/tdfx_drv.c
index 78aad6fc..488bbcb4 100644
--- a/linux-core/tdfx_drv.c
+++ b/linux-core/tdfx_drv.c
@@ -65,7 +65,7 @@ static struct pci_device_id pciidlist[] = {
tdfx_PCI_IDS
};
-static struct drm_driver_fn driver_fn = {
+static struct drm_driver driver = {
.driver_features = DRIVER_USE_MTRR,
.reclaim_buffers = drm_core_reclaim_buffers,
.get_map_ofs = drm_core_get_map_ofs,
@@ -84,10 +84,10 @@ static struct drm_driver_fn driver_fn = {
static int probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
- return drm_probe(pdev, ent, &driver_fn);
+ return drm_probe(pdev, ent, &driver);
}
-static struct pci_driver driver = {
+static struct pci_driver pci_driver = {
.name = DRIVER_NAME,
.id_table = pciidlist,
.probe = probe,
@@ -96,12 +96,12 @@ static struct pci_driver driver = {
static int __init tdfx_init(void)
{
- return drm_init(&driver, pciidlist, &driver_fn);
+ return drm_init(&pci_driver, pciidlist, &driver);
}
static void __exit tdfx_exit(void)
{
- drm_exit(&driver);
+ drm_exit(&pci_driver);
}
module_init(tdfx_init);
diff --git a/shared-core/via_drv.c b/shared-core/via_drv.c
index 68459830..994e9959 100644
--- a/shared-core/via_drv.c
+++ b/shared-core/via_drv.c
@@ -71,7 +71,7 @@ static drm_ioctl_desc_t ioctls[] = {
[DRM_IOCTL_NR(DRM_VIA_PCICMD)] = {via_pci_cmdbuffer, 1, 0}
};
-static struct drm_driver_fn driver_fn = {
+static struct drm_driver driver = {
.driver_features =
DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_HAVE_IRQ |
DRIVER_IRQ_SHARED | DRIVER_IRQ_VBL,
@@ -101,10 +101,10 @@ static struct drm_driver_fn driver_fn = {
static int probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
- return drm_probe(pdev, ent, &driver_fn);
+ return drm_probe(pdev, ent, &driver);
}
-static struct pci_driver driver = {
+static struct pci_driver pci_driver = {
.name = DRIVER_NAME,
.id_table = pciidlist,
.probe = probe,
@@ -113,12 +113,12 @@ static struct pci_driver driver = {
static int __init via_init(void)
{
- return drm_init(&driver, pciidlist, &driver_fn);
+ return drm_init(&pci_driver, pciidlist, &driver);
}
static void __exit via_exit(void)
{
- drm_exit(&driver);
+ drm_exit(&pci_driver);
}
module_init(via_init);