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)
committerGreg Hackmann <ghackmann@google.com>
Tue, 25 Mar 2014 00:43:12 +0000 (17:43 -0700)
commite42126fcf1525129f25c895d26ddd868e5d4dff9
tree965d160d364ffcc156ac396f7c96e4098d8ba9ff
parente8cec2c1f77a8a90f701fd2cebdea4feba7640bf
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