Skip to content

Commit

Permalink
drm/mgag200: Set up fbdev after registering device; remove error checks
Browse files Browse the repository at this point in the history
Generic fbdev support is a DRM client. Set it up after registering
the new DRM device. Remove the error checks as the driver's probe
function should not depend on a DRM client's state.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Noralf Trønnes <noralf@tronnes.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200408082641.590-7-tzimmermann@suse.de
  • Loading branch information
Thomas Zimmermann committed Apr 8, 2020
1 parent c05ca21 commit fc54048
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/mgag200/mgag200_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ static int mga_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
if (ret)
goto err_mgag200_driver_unload;

drm_fbdev_generic_setup(dev, 0);

return 0;

err_mgag200_driver_unload:
Expand Down
4 changes: 0 additions & 4 deletions drivers/gpu/drm/mgag200/mgag200_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,6 @@ int mgag200_driver_load(struct drm_device *dev, unsigned long flags)
dev_warn(&dev->pdev->dev,
"Could not initialize cursors. Not doing hardware cursors.\n");

r = drm_fbdev_generic_setup(mdev->dev, 0);
if (r)
goto err_modeset;

return 0;

err_modeset:
Expand Down

0 comments on commit fc54048

Please sign in to comment.