diff options
Diffstat (limited to 'drivers/gpu/drm/tdfx/tdfx_drv.c')
| -rw-r--r-- | drivers/gpu/drm/tdfx/tdfx_drv.c | 46 | 
1 files changed, 25 insertions, 21 deletions
diff --git a/drivers/gpu/drm/tdfx/tdfx_drv.c b/drivers/gpu/drm/tdfx/tdfx_drv.c index b70fa91d761..3492ca5c46d 100644 --- a/drivers/gpu/drm/tdfx/tdfx_drv.c +++ b/drivers/gpu/drm/tdfx/tdfx_drv.c @@ -30,33 +30,32 @@   *    Gareth Hughes <gareth@valinux.com>   */ -#include "drmP.h" +#include <linux/module.h> + +#include <drm/drmP.h>  #include "tdfx_drv.h" -#include "drm_pciids.h" +#include <drm/drm_pciids.h>  static struct pci_device_id pciidlist[] = {  	tdfx_PCI_IDS  }; -static struct drm_driver driver = { -	.driver_features = DRIVER_USE_MTRR, -	.reclaim_buffers = drm_core_reclaim_buffers, -	.fops = { -		 .owner = THIS_MODULE, -		 .open = drm_open, -		 .release = drm_release, -		 .unlocked_ioctl = drm_ioctl, -		 .mmap = drm_mmap, -		 .poll = drm_poll, -		 .fasync = drm_fasync, -		 .llseek = noop_llseek, -	}, -	.pci_driver = { -		 .name = DRIVER_NAME, -		 .id_table = pciidlist, -	}, +static const struct file_operations tdfx_driver_fops = { +	.owner = THIS_MODULE, +	.open = drm_open, +	.release = drm_release, +	.unlocked_ioctl = drm_ioctl, +	.mmap = drm_mmap, +	.poll = drm_poll, +#ifdef CONFIG_COMPAT +	.compat_ioctl = drm_compat_ioctl, +#endif +	.llseek = noop_llseek, +}; +static struct drm_driver driver = { +	.fops = &tdfx_driver_fops,  	.name = DRIVER_NAME,  	.desc = DRIVER_DESC,  	.date = DRIVER_DATE, @@ -65,14 +64,19 @@ static struct drm_driver driver = {  	.patchlevel = DRIVER_PATCHLEVEL,  }; +static struct pci_driver tdfx_pci_driver = { +	.name = DRIVER_NAME, +	.id_table = pciidlist, +}; +  static int __init tdfx_init(void)  { -	return drm_init(&driver); +	return drm_pci_init(&driver, &tdfx_pci_driver);  }  static void __exit tdfx_exit(void)  { -	drm_exit(&driver); +	drm_pci_exit(&driver, &tdfx_pci_driver);  }  module_init(tdfx_init);  | 
