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>
This commit is contained in:
@@ -703,7 +703,7 @@ static int mga_do_pci_dma_bootstrap(struct drm_device *dev,
|
||||
static int mga_do_dma_bootstrap(struct drm_device *dev,
|
||||
drm_mga_dma_bootstrap_t *dma_bs)
|
||||
{
|
||||
const int is_agp = (dma_bs->agp_mode != 0) && drm_device_is_agp(dev);
|
||||
const int is_agp = (dma_bs->agp_mode != 0) && drm_pci_device_is_agp(dev);
|
||||
int err;
|
||||
drm_mga_private_t *const dev_priv =
|
||||
(drm_mga_private_t *) dev->dev_private;
|
||||
|
@@ -75,10 +75,6 @@ static struct drm_driver driver = {
|
||||
#endif
|
||||
.llseek = noop_llseek,
|
||||
},
|
||||
.pci_driver = {
|
||||
.name = DRIVER_NAME,
|
||||
.id_table = pciidlist,
|
||||
},
|
||||
|
||||
.name = DRIVER_NAME,
|
||||
.desc = DRIVER_DESC,
|
||||
@@ -88,15 +84,20 @@ static struct drm_driver driver = {
|
||||
.patchlevel = DRIVER_PATCHLEVEL,
|
||||
};
|
||||
|
||||
static struct pci_driver mga_pci_driver = {
|
||||
.name = DRIVER_NAME,
|
||||
.id_table = pciidlist,
|
||||
};
|
||||
|
||||
static int __init mga_init(void)
|
||||
{
|
||||
driver.num_ioctls = mga_max_ioctl;
|
||||
return drm_init(&driver);
|
||||
return drm_pci_init(&driver, &mga_pci_driver);
|
||||
}
|
||||
|
||||
static void __exit mga_exit(void)
|
||||
{
|
||||
drm_exit(&driver);
|
||||
drm_pci_exit(&driver, &mga_pci_driver);
|
||||
}
|
||||
|
||||
module_init(mga_init);
|
||||
|
Reference in New Issue
Block a user