aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/r128
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/r128
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/r128')
-rw-r--r--drivers/gpu/drm/r128/r128_drv.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/gpu/drm/r128/r128_drv.c b/drivers/gpu/drm/r128/r128_drv.c
index 18c3c71e41b1..b9e8efd2b754 100644
--- a/drivers/gpu/drm/r128/r128_drv.c
+++ b/drivers/gpu/drm/r128/r128_drv.c
@@ -71,10 +71,7 @@ static struct drm_driver driver = {
71#endif 71#endif
72 .llseek = noop_llseek, 72 .llseek = noop_llseek,
73 }, 73 },
74 .pci_driver = { 74
75 .name = DRIVER_NAME,
76 .id_table = pciidlist,
77 },
78 75
79 .name = DRIVER_NAME, 76 .name = DRIVER_NAME,
80 .desc = DRIVER_DESC, 77 .desc = DRIVER_DESC,
@@ -89,16 +86,21 @@ int r128_driver_load(struct drm_device *dev, unsigned long flags)
89 return drm_vblank_init(dev, 1); 86 return drm_vblank_init(dev, 1);
90} 87}
91 88
89static struct pci_driver r128_pci_driver = {
90 .name = DRIVER_NAME,
91 .id_table = pciidlist,
92};
93
92static int __init r128_init(void) 94static int __init r128_init(void)
93{ 95{
94 driver.num_ioctls = r128_max_ioctl; 96 driver.num_ioctls = r128_max_ioctl;
95 97
96 return drm_init(&driver); 98 return drm_pci_init(&driver, &r128_pci_driver);
97} 99}
98 100
99static void __exit r128_exit(void) 101static void __exit r128_exit(void)
100{ 102{
101 drm_exit(&driver); 103 drm_pci_exit(&driver, &r128_pci_driver);
102} 104}
103 105
104module_init(r128_init); 106module_init(r128_init);