diff options
author | Dave Airlie <airlied@gmail.com> | 2010-12-14 20:16:38 +0300 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-02-07 06:09:36 +0300 |
commit | 8410ea3b95d105a5be5db501656f44bbb91197c1 (patch) | |
tree | 6cd27f207e50c13ba2f4a78d6323bc23f751e380 /drivers/gpu/drm/drm_drv.c | |
parent | ff72145badb834e8051719ea66e024784d000cb4 (diff) | |
download | linux-8410ea3b95d105a5be5db501656f44bbb91197c1.tar.xz |
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/drm_drv.c')
-rw-r--r-- | drivers/gpu/drm/drm_drv.c | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index 3e991980cee2..0d04914eb058 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -237,49 +237,6 @@ int drm_lastclose(struct drm_device * dev) return 0; } -/** - * Module initialization. Called via init_module at module load time, or via - * linux/init/main.c (this is not currently supported). - * - * \return zero on success or a negative number on failure. - * - * Initializes an array of drm_device structures, and attempts to - * initialize all available devices, using consecutive minors, registering the - * stubs and initializing the device. - * - * Expands the \c DRIVER_PREINIT and \c DRIVER_POST_INIT macros before and - * after the initialization for driver customization. - */ -int drm_init(struct drm_driver *driver) -{ - DRM_DEBUG("\n"); - INIT_LIST_HEAD(&driver->device_list); - - if (driver->driver_features & DRIVER_USE_PLATFORM_DEVICE) - return drm_platform_init(driver); - else - return drm_pci_init(driver); -} - -EXPORT_SYMBOL(drm_init); - -void drm_exit(struct drm_driver *driver) -{ - struct drm_device *dev, *tmp; - DRM_DEBUG("\n"); - - if (driver->driver_features & DRIVER_MODESET) { - pci_unregister_driver(&driver->pci_driver); - } else { - list_for_each_entry_safe(dev, tmp, &driver->device_list, driver_item) - drm_put_dev(dev); - } - - DRM_INFO("Module unloaded\n"); -} - -EXPORT_SYMBOL(drm_exit); - /** File operations structure */ static const struct file_operations drm_stub_fops = { .owner = THIS_MODULE, |