summaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/omapfb/omapfb-sysfs.c
diff options
context:
space:
mode:
authorJani Nikula <ext-jani.1.nikula@nokia.com>2010-03-18 10:32:05 +0100
committerTomi Valkeinen <tomi.valkeinen@nokia.com>2010-05-18 14:14:29 +0300
commit238a41329ca208d1170962260babb428b6e222c2 (patch)
treec437064cad869fd67fe44c7965893494a6daf407 /drivers/video/omap2/omapfb/omapfb-sysfs.c
parent508886cf98c81cee73cd75943b3d0039801327ab (diff)
OMAP: DSS2: fix lock_fb_info() and omapfb_lock() locking order
Framebuffer ioctl processing forces lock_fb_info() -> omapfb_lock() locking order. Follow that order to avoid possible circular locking dependency, detected by lockdep. Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Diffstat (limited to 'drivers/video/omap2/omapfb/omapfb-sysfs.c')
-rw-r--r--drivers/video/omap2/omapfb/omapfb-sysfs.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/video/omap2/omapfb/omapfb-sysfs.c b/drivers/video/omap2/omapfb/omapfb-sysfs.c
index 62bb88f5c19..e1044501798 100644
--- a/drivers/video/omap2/omapfb/omapfb-sysfs.c
+++ b/drivers/video/omap2/omapfb/omapfb-sysfs.c
@@ -137,8 +137,8 @@ static ssize_t show_overlays(struct device *dev,
ssize_t l = 0;
int t;
- omapfb_lock(fbdev);
lock_fb_info(fbi);
+ omapfb_lock(fbdev);
for (t = 0; t < ofbi->num_overlays; t++) {
struct omap_overlay *ovl = ofbi->overlays[t];
@@ -154,8 +154,8 @@ static ssize_t show_overlays(struct device *dev,
l += snprintf(buf + l, PAGE_SIZE - l, "\n");
- unlock_fb_info(fbi);
omapfb_unlock(fbdev);
+ unlock_fb_info(fbi);
return l;
}
@@ -195,8 +195,8 @@ static ssize_t store_overlays(struct device *dev, struct device_attribute *attr,
if (buf[len - 1] == '\n')
len = len - 1;
- omapfb_lock(fbdev);
lock_fb_info(fbi);
+ omapfb_lock(fbdev);
if (len > 0) {
char *p = (char *)buf;
@@ -303,8 +303,8 @@ static ssize_t store_overlays(struct device *dev, struct device_attribute *attr,
r = count;
out:
- unlock_fb_info(fbi);
omapfb_unlock(fbdev);
+ unlock_fb_info(fbi);
return r;
}