aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/sis
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/sis
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/sis')
-rw-r--r--drivers/gpu/drm/sis/sis_drv.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/gpu/drm/sis/sis_drv.c b/drivers/gpu/drm/sis/sis_drv.c
index 4caf5d01cfd3..46d5be6e97e5 100644
--- a/drivers/gpu/drm/sis/sis_drv.c
+++ b/drivers/gpu/drm/sis/sis_drv.c
@@ -82,10 +82,6 @@ static struct drm_driver driver = {
82 .fasync = drm_fasync, 82 .fasync = drm_fasync,
83 .llseek = noop_llseek, 83 .llseek = noop_llseek,
84 }, 84 },
85 .pci_driver = {
86 .name = DRIVER_NAME,
87 .id_table = pciidlist,
88 },
89 85
90 .name = DRIVER_NAME, 86 .name = DRIVER_NAME,
91 .desc = DRIVER_DESC, 87 .desc = DRIVER_DESC,
@@ -95,15 +91,20 @@ static struct drm_driver driver = {
95 .patchlevel = DRIVER_PATCHLEVEL, 91 .patchlevel = DRIVER_PATCHLEVEL,
96}; 92};
97 93
94static struct pci_driver sis_pci_driver = {
95 .name = DRIVER_NAME,
96 .id_table = pciidlist,
97};
98
98static int __init sis_init(void) 99static int __init sis_init(void)
99{ 100{
100 driver.num_ioctls = sis_max_ioctl; 101 driver.num_ioctls = sis_max_ioctl;
101 return drm_init(&driver); 102 return drm_pci_init(&driver, &sis_pci_driver);
102} 103}
103 104
104static void __exit sis_exit(void) 105static void __exit sis_exit(void)
105{ 106{
106 drm_exit(&driver); 107 drm_pci_exit(&driver, &sis_pci_driver);
107} 108}
108 109
109module_init(sis_init); 110module_init(sis_init);