drm/mga200g: Hold a proper reference for cursor_set
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 9 Jul 2015 21:32:39 +0000 (23:32 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 10 Aug 2015 11:37:20 +0000 (13:37 +0200)
commitbf89209a6de37074e3ccdb7b40500798de750698
treec375d6fe25018e6bd8dca172805821445899787f
parent34c294f5a6c0dca7fb75ddc1be3ec8974b24455f
drm/mga200g: Hold a proper reference for cursor_set

Looking up an obj, immediate dropping the acquired reference and then
continuing to use it isn't how this is supposed to work. Fix this by
holding a reference for the entire function.

While at it stop grabbing dev->struct_mutex, it doesn't protect
anything here.

Reviewed-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
drivers/gpu/drm/mgag200/mgag200_cursor.c