drm: move dev data clearing from drm_setup to lastclose
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 8 Aug 2013 13:41:35 +0000 (15:41 +0200)
committerDave Airlie <airlied@redhat.com>
Mon, 19 Aug 2013 04:29:41 +0000 (14:29 +1000)
commitf336ab76008f66f6153573d1479aeed388d7b08a
tree663730d457d336badec1b3b2486f7e047a8ffffe
parentcb6458f97b53d7f73043206c18014b3ca63ac345
drm: move dev data clearing from drm_setup to lastclose

We kzalloc this structure, and for real kms devices we should never
loose track of things really.

But ums/legacy drivers rely on the drm core to clean up a bit of cruft
between lastclose and firstopen (i.e. when X is being restarted), so
keep this around. But give it a clear drm_legacy_ prefix and
conditionalize the code on !DRIVER_MODESET.

Cc: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_drv.c
drivers/gpu/drm/drm_fops.c