drm/bochs: add drm_driver.release callback.
authorGerd Hoffmann <kraxel@redhat.com>
Tue, 11 Feb 2020 13:52:18 +0000 (14:52 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 12 Feb 2020 09:24:08 +0000 (10:24 +0100)
commit81da8c3b8d3df6f05b11300b7d17ccd1f3017fab
treee6d8187d9d279bdecdfbaf2db1fd466dfa3c8897
parente62bf83aa1bb9d9953eec2e3663528c766b148ea
drm/bochs: add drm_driver.release callback.

Call bochs_unload via drm_driver.release to make sure we release stuff
when it is safe to do so.  Use drm_dev_{enter,exit,unplug} to avoid
touching hardware after device removal.  Tidy up here and there.

v4: add changelog.
v3: use drm_dev_*().
v2: move hardware deinit to pci_remove().

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20200211135218.22871-1-kraxel@redhat.com
drivers/gpu/drm/bochs/bochs_drv.c
drivers/gpu/drm/bochs/bochs_hw.c