aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/via/via_drv.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@gmail.com>2010-12-14 12:16:38 -0500
committerDave Airlie <airlied@redhat.com>2011-02-06 22:09:36 -0500
commit8410ea3b95d105a5be5db501656f44bbb91197c1 (patch)
tree6cd27f207e50c13ba2f4a78d6323bc23f751e380 /drivers/gpu/drm/via/via_drv.c
parentff72145badb834e8051719ea66e024784d000cb4 (diff)
drm: rework PCI/platform driver interface.
This abstracts the pci/platform interface out a step further, we can go further but this is far enough for now to allow USB to be plugged in. The drivers now just call the init code directly for their device type. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/via/via_drv.c')
-rw-r--r--drivers/gpu/drm/via/via_drv.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/gpu/drm/via/via_drv.c b/drivers/gpu/drm/via/via_drv.c
index e1ff4e7a6eb0..920a55214bcf 100644
--- a/drivers/gpu/drm/via/via_drv.c
+++ b/drivers/gpu/drm/via/via_drv.c
@@ -62,10 +62,6 @@ static struct drm_driver driver = {
62 .fasync = drm_fasync, 62 .fasync = drm_fasync,
63 .llseek = noop_llseek, 63 .llseek = noop_llseek,
64 }, 64 },
65 .pci_driver = {
66 .name = DRIVER_NAME,
67 .id_table = pciidlist,
68 },
69 65
70 .name = DRIVER_NAME, 66 .name = DRIVER_NAME,
71 .desc = DRIVER_DESC, 67 .desc = DRIVER_DESC,
@@ -75,16 +71,21 @@ static struct drm_driver driver = {
75 .patchlevel = DRIVER_PATCHLEVEL, 71 .patchlevel = DRIVER_PATCHLEVEL,
76}; 72};
77 73
74static struct pci_driver via_pci_driver = {
75 .name = DRIVER_NAME,
76 .id_table = pciidlist,
77};
78
78static int __init via_init(void) 79static int __init via_init(void)
79{ 80{
80 driver.num_ioctls = via_max_ioctl; 81 driver.num_ioctls = via_max_ioctl;
81 via_init_command_verifier(); 82 via_init_command_verifier();
82 return drm_init(&driver); 83 return drm_pci_init(&driver, &via_pci_driver);
83} 84}
84 85
85static void __exit via_exit(void) 86static void __exit via_exit(void)
86{ 87{
87 drm_exit(&driver); 88 drm_pci_exit(&driver, &via_pci_driver);
88} 89}
89 90
90module_init(via_init); 91module_init(via_init);