]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/gpu/drm/vboxvideo/vbox_drv.c
drm/vboxvideo: Switch to generic fbdev emulation
[linux.git] / drivers / gpu / drm / vboxvideo / vbox_drv.c
index 862db495d11191461209dfc6014639085a6ac0b4..6ee308b453da692c033c069f4b2c523807799b10 100644 (file)
@@ -14,6 +14,7 @@
 
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_drv.h>
+#include <drm/drm_fb_helper.h>
 #include <drm/drm_file.h>
 #include <drm/drm_ioctl.h>
 
@@ -32,10 +33,6 @@ static const struct pci_device_id pciidlist[] = {
 };
 MODULE_DEVICE_TABLE(pci, pciidlist);
 
-static const struct drm_fb_helper_funcs vbox_fb_helper_funcs = {
-       .fb_probe = vboxfb_create,
-};
-
 static int vbox_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 {
        struct vbox_private *vbox;
@@ -79,20 +76,16 @@ static int vbox_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        if (ret)
                goto err_mode_fini;
 
-       ret = drm_fb_helper_fbdev_setup(&vbox->ddev, &vbox->fb_helper,
-                                       &vbox_fb_helper_funcs, 32,
-                                       vbox->num_crtcs);
+       ret = drm_fbdev_generic_setup(&vbox->ddev, 32);
        if (ret)
                goto err_irq_fini;
 
        ret = drm_dev_register(&vbox->ddev, 0);
        if (ret)
-               goto err_fbdev_fini;
+               goto err_irq_fini;
 
        return 0;
 
-err_fbdev_fini:
-       vbox_fbdev_fini(vbox);
 err_irq_fini:
        vbox_irq_fini(vbox);
 err_mode_fini:
@@ -113,7 +106,6 @@ static void vbox_pci_remove(struct pci_dev *pdev)
        struct vbox_private *vbox = pci_get_drvdata(pdev);
 
        drm_dev_unregister(&vbox->ddev);
-       vbox_fbdev_fini(vbox);
        vbox_irq_fini(vbox);
        vbox_mode_fini(vbox);
        vbox_mm_fini(vbox);