From 1ceafc00910439c8e5450fae189b69427725992c Mon Sep 17 00:00:00 2001 From: Ville Syrjälä Date: Wed, 17 Mar 2010 21:28:50 +0200 Subject: OMAP: DSS2: OMAPFB: Add some locking debug checks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Trigger WARN_ON() messages from various places in the code in case the memory region is not currently locked. Signed-off-by: Ville Syrjälä Signed-off-by: Tomi Valkeinen --- drivers/video/omap2/omapfb/omapfb-sysfs.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/video/omap2/omapfb/omapfb-sysfs.c') diff --git a/drivers/video/omap2/omapfb/omapfb-sysfs.c b/drivers/video/omap2/omapfb/omapfb-sysfs.c index 1e714bb48d3..51c13c366bf 100644 --- a/drivers/video/omap2/omapfb/omapfb-sysfs.c +++ b/drivers/video/omap2/omapfb/omapfb-sysfs.c @@ -453,6 +453,7 @@ static ssize_t store_size(struct device *dev, struct device_attribute *attr, rg = ofbi->region; down_write_nested(&rg->lock, rg->id); + atomic_inc(&rg->lock_count); if (atomic_read(&rg->map_count)) { r = -EBUSY; @@ -484,6 +485,7 @@ static ssize_t store_size(struct device *dev, struct device_attribute *attr, r = count; out: + atomic_dec(&rg->lock_count); up_write(&rg->lock); unlock_fb_info(fbi); -- cgit v1.2.3-70-g09d2