Commit 10dcc831 authored by Thomas Zimmermann's avatar Thomas Zimmermann Committed by Javier Martinez Canillas

drm/qxl: Replace module-init boiler-plate code with DRM helpers

Remove custom qxl_init() and qxl_exit() functions and initialize
the module with DRM module helpers.
Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: default avatarJavier Martinez Canillas <javierm@redhat.com>
Signed-off-by: default avatarJavier Martinez Canillas <javierm@redhat.com>
Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20211217144615.32733-9-tzimmermann@suse.de
parent 66755b48
......@@ -39,6 +39,7 @@
#include <drm/drm_drv.h>
#include <drm/drm_file.h>
#include <drm/drm_gem_ttm_helper.h>
#include <drm/drm_module.h>
#include <drm/drm_modeset_helper.h>
#include <drm/drm_prime.h>
#include <drm/drm_probe_helper.h>
......@@ -303,23 +304,7 @@ static struct drm_driver qxl_driver = {
.release = qxl_drm_release,
};
static int __init qxl_init(void)
{
if (drm_firmware_drivers_only() && qxl_modeset == -1)
return -EINVAL;
if (qxl_modeset == 0)
return -EINVAL;
return pci_register_driver(&qxl_pci_driver);
}
static void __exit qxl_exit(void)
{
pci_unregister_driver(&qxl_pci_driver);
}
module_init(qxl_init);
module_exit(qxl_exit);
drm_module_pci_driver_if_modeset(qxl_pci_driver, qxl_modeset);
MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment