video: adf: replace fbdev helper's open flag with refcount
authorGreg Hackmann <ghackmann@google.com>
Mon, 24 Mar 2014 23:45:43 +0000 (16:45 -0700)
committerJohn Stultz <john.stultz@linaro.org>
Tue, 16 Feb 2016 21:53:19 +0000 (13:53 -0800)
commit41bda719aa49b512ea43f8f1dfbf6fdbfdf5addb
tree7f9768a5139f7adf8f7616e654f9ed2c70b5a8ad
parent0bb5d2b6b6fc0536c656918409bc2edb62eb9733
video: adf: replace fbdev helper's open flag with refcount

A device's fb_info is shared between clients.  fb_release() is called
when each client is released, not just the last one.  Since the fbdev
helper needs to release its dma-buf when the last client goes away, it
must keep its own reference count.

fbmem and fbcon hold different locks while calling fb_release(), so
explicit locking is needed.

Change-Id: I42cd659f7633adba7c11f407d4b594bd43305d6a
Signed-off-by: Greg Hackmann <ghackmann@google.com>
drivers/video/adf/adf_fbdev.c
include/video/adf_fbdev.h