Commit cf092993 authored by Dave Airlie's avatar Dave Airlie

drm: rename fn_tbl to driver as it is no longer a function table

This renames the drm_driver_fn to drm_driver and fn_tbl to driver,
this name is makes much more sense now.

From: Jon Smirl <jonsmirl@gmail.com> and Dave Airlie <airlied@linux.ie>
Signed-off-by: default avatarDave Airlie <airlied@linux.ie>
parent 6d44eecd
......@@ -554,7 +554,7 @@ typedef struct drm_vbl_sig {
*/
struct drm_device;
struct drm_driver_fn {
struct drm_driver {
int (*preinit)(struct drm_device *);
void (*prerelease)(struct drm_device *, struct file *filp);
void (*pretakedown)(struct drm_device *);
......@@ -718,7 +718,7 @@ typedef struct drm_device {
struct file_operations *fops; /**< file operations */
struct proc_dir_entry *dev_root; /**< proc directory entry */
struct drm_driver_fn *fn_tbl;
struct drm_driver *driver;
drm_local_map_t *agp_buffer_map;
} drm_device_t;
......@@ -733,7 +733,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
......@@ -764,8 +764,8 @@ extern void drm_parse_options( char *s );
extern int drm_cpu_valid( void );
/* Driver support (drm_drv.h) */
extern int drm_init(struct drm_driver_fn *driver_fn);
extern void drm_exit(struct drm_driver_fn *driver_fn);
extern int drm_init(struct drm_driver *driver);
extern void drm_exit(struct drm_driver *driver);
extern int drm_version(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg);
extern int drm_open(struct inode *inode, struct file *filp);
......@@ -777,7 +777,7 @@ extern int drm_lock(struct inode *inode, struct file *filp,
extern int drm_unlock(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg);
extern int drm_fill_in_dev(drm_device_t *dev, struct pci_dev *pdev,
const struct pci_device_id *ent, struct drm_driver_fn *driver_fn);
const struct pci_device_id *ent, struct drm_driver *driver);
/* Device support (drm_fops.h) */
extern int drm_open_helper(struct inode *inode, struct file *filp,
......@@ -955,7 +955,7 @@ extern int drm_agp_bind_memory(DRM_AGP_MEM *handle, off_t start);
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);
extern int drm_probe(struct pci_dev *pdev, const struct pci_device_id *ent, struct drm_driver *driver);
extern int drm_put_minor(drm_device_t *dev);
extern unsigned int drm_debug;
......
......@@ -448,7 +448,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) {
......@@ -666,7 +666,7 @@ 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_priv_size = dev->driver->dev_priv_size;
buf->dev_private = drm_alloc( buf->dev_priv_size,
DRM_MEM_BUFS );
if(!buf->dev_private) {
......@@ -844,7 +844,7 @@ 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_priv_size = dev->driver->dev_priv_size;
buf->dev_private = drm_alloc( buf->dev_priv_size,
DRM_MEM_BUFS );
if(!buf->dev_private) {
......
......@@ -417,8 +417,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 );
......@@ -552,8 +552,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 );
}
......
......@@ -138,9 +138,9 @@ static int drm_setup( drm_device_t *dev )
int i;
int ret;
if (dev->fn_tbl->presetup)
if (dev->driver->presetup)
{
ret=dev->fn_tbl->presetup(dev);
ret=dev->driver->presetup(dev);
if (ret!=0)
return ret;
}
......@@ -213,8 +213,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;
}
......@@ -240,8 +240,8 @@ static 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 );
......@@ -373,7 +373,7 @@ static int drm_takedown( drm_device_t *dev )
return 0;
}
int drm_fill_in_dev(drm_device_t *dev, struct pci_dev *pdev, const struct pci_device_id *ent, struct drm_driver_fn *driver_fn)
int drm_fill_in_dev(drm_device_t *dev, struct pci_dev *pdev, const struct pci_device_id *ent, struct drm_driver *driver)
{
int retcode;
......@@ -405,10 +405,10 @@ int drm_fill_in_dev(drm_device_t *dev, struct pci_dev *pdev, const struct pci_de
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)))
if (dev->driver->preinit)
if ((retcode = dev->driver->preinit(dev)))
goto error_out_unreg;
if (drm_core_has_AGP(dev)) {
......@@ -436,7 +436,7 @@ int drm_fill_in_dev(drm_device_t *dev, struct pci_dev *pdev, const struct pci_de
dev->device = MKDEV(DRM_MAJOR, dev->minor );
/* postinit is a required function to display the signon banner */
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;
......@@ -459,7 +459,7 @@ int drm_fill_in_dev(drm_device_t *dev, struct pci_dev *pdev, const struct pci_de
* Expands the \c DRIVER_PREINIT and \c DRIVER_POST_INIT macros before and
* after the initialization for driver customization.
*/
int drm_init( struct drm_driver_fn *driver_fn )
int drm_init( struct drm_driver *driver )
{
struct pci_dev *pdev = NULL;
struct pci_device_id *pid;
......@@ -469,15 +469,15 @@ int drm_init( struct drm_driver_fn *driver_fn )
drm_mem_init();
for (i=0; driver_fn->pci_driver.id_table[i].vendor != 0; i++) {
pid = (struct pci_device_id *)&driver_fn->pci_driver.id_table[i];
for (i=0; driver->pci_driver.id_table[i].vendor != 0; i++) {
pid = (struct pci_device_id *)&driver->pci_driver.id_table[i];
pdev=NULL;
/* pass back in pdev to account for multiple identical cards */
while ((pdev = pci_get_subsys(pid->vendor, pid->device, pid->subvendor, pid->subdevice, pdev)) != NULL) {
/* stealth mode requires a manual probe */
pci_dev_get(pdev);
drm_probe(pdev, pid, driver_fn);
drm_probe(pdev, pid, driver);
}
}
return 0;
......@@ -519,14 +519,14 @@ static void drm_cleanup( drm_device_t *dev )
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 drm_exit (struct drm_driver_fn *driver_fn)
void drm_exit (struct drm_driver *driver)
{
int i;
drm_device_t *dev = NULL;
......@@ -538,7 +538,7 @@ void drm_exit (struct drm_driver_fn *driver_fn)
minor = &drm_minors[i];
if (!minor->dev)
continue;
if (minor->dev->fn_tbl!=driver_fn)
if (minor->dev->driver!=driver)
continue;
dev = minor->dev;
......@@ -639,7 +639,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) ) )
......@@ -709,8 +709,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
......@@ -726,8 +726,8 @@ int drm_release( struct inode *inode, struct file *filp )
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) );
......@@ -737,7 +737,7 @@ int drm_release( struct inode *inode, struct file *filp )
processed via a callback to the X
server. */
}
else if ( dev->fn_tbl->release && priv->lock_count && dev->lock.hw_lock ) {
else if ( dev->driver->release && priv->lock_count && dev->lock.hw_lock ) {
/* The lock is required to reclaim buffers */
DECLARE_WAITQUEUE( entry, current );
......@@ -766,8 +766,8 @@ int drm_release( struct inode *inode, struct file *filp )
__set_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 );
}
......@@ -775,7 +775,7 @@ int drm_release( struct inode *inode, struct file *filp )
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 );
......@@ -787,8 +787,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, pos->handle);
if (dev->driver->context_dtor)
dev->driver->context_dtor(dev, pos->handle);
drm_ctxbitmap_free( dev, pos->handle );
......@@ -820,8 +820,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 );
......@@ -884,15 +884,15 @@ 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];
else if ((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;
/* is there a local override? */
if ((nr == DRM_IOCTL_NR(DRM_IOCTL_DMA)) && dev->fn_tbl->dma_ioctl)
func = dev->fn_tbl->dma_ioctl;
if ((nr == DRM_IOCTL_NR(DRM_IOCTL_DMA)) && dev->driver->dma_ioctl)
func = dev->driver->dma_ioctl;
if ( !func ) {
DRM_DEBUG( "no function\n" );
......@@ -986,19 +986,19 @@ int drm_lock( struct inode *inode, struct file *filp,
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);
/* dev->fn_tbl->kernel_context_switch isn't used by any of the x86
/* dev->driver->kernel_context_switch isn't used by any of the x86
* drivers but is used by the Sparc driver.
*/
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);
}
DRM_DEBUG( "%d %s\n", lock.context, ret ? "interrupted" : "has lock" );
......@@ -1038,8 +1038,8 @@ int drm_unlock( struct inode *inode, struct file *filp,
/* kernel_context_switch isn't used by any of the x86 drm
* modules but is required by the Sparc driver.
*/
if (dev->fn_tbl->kernel_context_switch_unlock)
dev->fn_tbl->kernel_context_switch_unlock(dev, &lock);
if (dev->driver->kernel_context_switch_unlock)
dev->driver->kernel_context_switch_unlock(dev, &lock);
else {
drm_lock_transfer( dev, &dev->lock.hw_lock->lock,
DRM_KERNEL_CONTEXT );
......
......@@ -73,8 +73,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;
}
......
......@@ -106,12 +106,12 @@ int drm_setunique(struct inode *inode, struct file *filp,
dev->unique[dev->unique_len] = '\0';
dev->devname = drm_alloc(strlen(dev->fn_tbl->pci_driver.name) + strlen(dev->unique) + 2,
dev->devname = drm_alloc(strlen(dev->driver->pci_driver.name) + strlen(dev->unique) + 2,
DRM_MEM_DRIVER);
if (!dev->devname)
return -ENOMEM;
sprintf(dev->devname, "%s@%s", dev->fn_tbl->pci_driver.name, dev->unique);
sprintf(dev->devname, "%s@%s", dev->driver->pci_driver.name, dev->unique);
/* Return error if the busid submitted doesn't match the device's actual
* busid.
......@@ -145,12 +145,12 @@ 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->fn_tbl->pci_driver.name) + dev->unique_len + 2,
dev->devname = drm_alloc(strlen(dev->driver->pci_driver.name) + dev->unique_len + 2,
DRM_MEM_DRIVER);
if (dev->devname == NULL)
return ENOMEM;
sprintf(dev->devname, "%s@%s", dev->fn_tbl->pci_driver.name, dev->unique);
sprintf(dev->devname, "%s@%s", dev->driver->pci_driver.name, dev->unique);
return 0;
}
......@@ -340,8 +340,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;
}
......@@ -128,13 +128,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 );
......@@ -144,7 +144,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;
}
......@@ -173,7 +173,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 );
......@@ -317,8 +317,8 @@ int drm_wait_vblank( DRM_IOCTL_ARGS )
spin_unlock_irqrestore( &dev->vbl_lock, irqflags );
} else {
if (dev->fn_tbl->vblank_wait)
ret = dev->fn_tbl->vblank_wait( dev, &vblwait.request.sequence );
if (dev->driver->vblank_wait)
ret = dev->driver->vblank_wait( dev, &vblwait.request.sequence );
do_gettimeofday( &now );
vblwait.reply.tval_sec = now.tv_sec;
......
......@@ -176,9 +176,9 @@ 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->fn_tbl->pci_driver.name, (long)old_encode_dev(dev->device), dev->unique);
dev->driver->pci_driver.name, (long)old_encode_dev(dev->device), dev->unique);
} else {
DRM_PROC_PRINT("%s 0x%lx\n", dev->fn_tbl->pci_driver.name, (long)old_encode_dev(dev->device));
DRM_PROC_PRINT("%s 0x%lx\n", dev->driver->pci_driver.name, (long)old_encode_dev(dev->device));
}
if (len > request + offset) return request;
......
......@@ -106,7 +106,7 @@ struct file_operations drm_stub_fops = {
* then register the character device and inter module information.
* 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)
int drm_probe(struct pci_dev *pdev, const struct pci_device_id *ent, struct drm_driver *driver)
{
struct class_device *dev_class;
drm_device_t *dev;
......@@ -126,7 +126,7 @@ int drm_probe(struct pci_dev *pdev, const struct pci_device_id *ent, struct drm_
*minors = (drm_minor_t){.dev = dev, .type=DRM_MINOR_PRIMARY};
dev->minor = minor;
if ((ret=drm_fill_in_dev(dev, pdev, ent, driver_fn))) {
if ((ret=drm_fill_in_dev(dev, pdev, ent, driver))) {
printk(KERN_ERR "DRM: Fill_in_dev failed.\n");
goto err_g1;
}
......
......@@ -560,7 +560,7 @@ int drm_mmap(struct file *filp, struct vm_area_struct *vma)
r_list = list_entry(list, drm_map_list_t, head);
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;
}
......@@ -615,7 +615,7 @@ int drm_mmap(struct file *filp, struct vm_area_struct *vma)
if (map->type != _DRM_AGP)
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,
......
......@@ -309,12 +309,12 @@ void ffb_driver_register_fns(drm_device_t *dev)
{
ffb_set_context_ioctls();
DRM(fops).get_unmapped_area = ffb_get_unmapped_area;
dev->fn_tbl.release = ffb_driver_release;
dev->fn_tbl.presetup = ffb_presetup;
dev->fn_tbl.pretakedown = ffb_driver_pretakedown;
dev->fn_tbl.postcleanup = ffb_driver_postcleanup;
dev->fn_tbl.kernel_context_switch = ffb_context_switch;
dev->fn_tbl.kernel_context_switch_unlock = ffb_driver_kernel_context_switch_unlock;
dev->fn_tbl.get_map_ofs = ffb_driver_get_map_ofs;
dev->fn_tbl.get_reg_ofs = ffb_driver_get_reg_ofs;
dev->driver.release = ffb_driver_release;
dev->driver.presetup = ffb_presetup;
dev->driver.pretakedown = ffb_driver_pretakedown;
dev->driver.postcleanup = ffb_driver_postcleanup;
dev->driver.kernel_context_switch = ffb_context_switch;
dev->driver.kernel_context_switch_unlock = ffb_driver_kernel_context_switch_unlock;
dev->driver.get_map_ofs = ffb_driver_get_map_ofs;
dev->driver.get_reg_ofs = ffb_driver_get_reg_ofs;
}
......@@ -937,10 +937,10 @@ void gamma_driver_register_fns(drm_device_t *dev)
dev->driver_features = DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_PCI_DMA | DRIVER_HAVE_DMA | DRIVER_HAVE_IRQ;
DRM(fops).read = gamma_fops_read;
DRM(fops).poll = gamma_fops_poll;
dev->fn_tbl.preinit = gamma_driver_preinit;
dev->fn_tbl.pretakedown = gamma_driver_pretakedown;
dev->fn_tbl.dma_ready = gamma_driver_dma_ready;
dev->fn_tbl.dma_quiescent = gamma_driver_dma_quiescent;
dev->fn_tbl.dma_flush_block_and_flush = gamma_flush_block_and_flush;
dev->fn_tbl.dma_flush_unblock = gamma_flush_unblock;
dev->driver.preinit = gamma_driver_preinit;
dev->driver.pretakedown = gamma_driver_pretakedown;
dev->driver.dma_ready = gamma_driver_dma_ready;
dev->driver.dma_quiescent = gamma_driver_dma_quiescent;
dev->driver.dma_flush_block_and_flush = gamma_flush_block_and_flush;
dev->driver.dma_flush_unblock = gamma_flush_unblock;
}
......@@ -94,7 +94,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,
.dev_priv_size = sizeof(drm_i810_buf_priv_t),
.pretakedown = i810_driver_pretakedown,
......@@ -115,12 +115,12 @@ static struct drm_driver_fn driver_fn = {
static int __init i810_init(void)
{
return drm_init(&driver_fn);
return drm_init(&driver);
}
static void __exit i810_exit(void)
{
drm_exit(&driver_fn);
drm_exit(&driver);
}
module_init(i810_init);
......
......@@ -94,7 +94,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,
#if USE_IRQS
.driver_features |= DRIVER_HAVE_IRQ | DRIVER_SHARED_IRQ,
......@@ -125,12 +125,12 @@ static struct drm_driver_fn driver_fn = {
static int __init i830_init(void)
{
return drm_init(&driver_fn);
return drm_init(&driver);
}
static void __exit i830_exit(void)
{
drm_exit(&driver_fn);
drm_exit(&driver);
}
module_init(i830_init);
......
......@@ -67,7 +67,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,
.pretakedown = i915_driver_pretakedown,
......@@ -91,12 +91,12 @@ static struct drm_driver_fn driver_fn = {
static int __init i915_init(void)
{
return drm_init(&driver_fn);
return drm_init(&driver);
}
static void __exit i915_exit(void)
{
drm_exit(&driver_fn);
drm_exit(&driver);
}
module_init(i915_init);
......
......@@ -87,7 +87,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 | DRIVER_IRQ_VBL,
.pretakedown = mga_driver_pretakedown,
.dma_quiescent = mga_driver_dma_quiescent,
......@@ -112,12 +112,12 @@ static struct drm_driver_fn driver_fn = {
static int __init mga_init(void)
{
return drm_init(&driver_fn);
return drm_init(&driver);
}
static void __exit mga_exit(void)
{
drm_exit(&driver_fn);
drm_exit(&driver);
}
module_init(mga_init);
......
......@@ -95,7 +95,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 | DRIVER_IRQ_VBL,
.dev_priv_size = sizeof(drm_r128_buf_priv_t),
.prerelease = r128_driver_prerelease,
......@@ -121,12 +121,12 @@ static struct drm_driver_fn driver_fn = {
static int __init r128_init(void)
{
return drm_init(&driver_fn);
return drm_init(&driver);
}
static void __exit r128_exit(void)
{
drm_exit(&driver_fn);
drm_exit(&driver);
}
module_init(r128_init);
......
......@@ -131,7 +131,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 | DRIVER_IRQ_VBL,
.dev_priv_size = sizeof(drm_radeon_buf_priv_t),
.prerelease = radeon_driver_prerelease,
......@@ -159,12 +159,12 @@ static struct drm_driver_fn driver_fn = {
static int __init radeon_init(void)
{
return drm_init(&driver_fn);
return drm_init(&driver);
}
static void __exit radeon_exit(void)
{
drm_exit(&driver_fn);
drm_exit(&driver);
}
module_init(radeon_init);
......
......@@ -72,7 +72,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,
......@@ -91,12 +91,12 @@ static struct drm_driver_fn driver_fn = {
static int __init sis_init(void)
{
return drm_init(&driver_fn);
return drm_init(&driver);
}
static void __exit sis_exit(void)
{
drm_exit(&driver_fn);
drm_exit(&driver);
}
module_init(sis_init);
......
......@@ -67,7 +67,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,
......@@ -82,12 +82,12 @@ static struct drm_driver_fn driver_fn = {
static int __init tdfx_init(void)
{
return drm_init(&driver_fn);
return drm_init(&driver);
}
static void __exit tdfx_exit(void)
{
drm_exit(&driver_fn);
drm_exit(&driver);
}
module_init(tdfx_init);
......
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