aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/video/fbmem.c11
-rw-r--r--include/linux/fb.h10
2 files changed, 12 insertions, 9 deletions
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index b64f061dd447..2ac32e6b5953 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -46,6 +46,17 @@
46struct fb_info *registered_fb[FB_MAX] __read_mostly; 46struct fb_info *registered_fb[FB_MAX] __read_mostly;
47int num_registered_fb __read_mostly; 47int num_registered_fb __read_mostly;
48 48
49int lock_fb_info(struct fb_info *info)
50{
51 mutex_lock(&info->lock);
52 if (!info->fbops) {
53 mutex_unlock(&info->lock);
54 return 0;
55 }
56 return 1;
57}
58EXPORT_SYMBOL(lock_fb_info);
59
49/* 60/*
50 * Helpers 61 * Helpers
51 */ 62 */
diff --git a/include/linux/fb.h b/include/linux/fb.h
index fe7d0d7907ab..f563c5013932 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -961,15 +961,7 @@ extern struct fb_info *registered_fb[FB_MAX];
961extern int num_registered_fb; 961extern int num_registered_fb;
962extern struct class *fb_class; 962extern struct class *fb_class;
963 963
964static inline int lock_fb_info(struct fb_info *info) 964extern int lock_fb_info(struct fb_info *info);
965{
966 mutex_lock(&info->lock);
967 if (!info->fbops) {
968 mutex_unlock(&info->lock);
969 return 0;
970 }
971 return 1;
972}
973 965
974static inline void unlock_fb_info(struct fb_info *info) 966static inline void unlock_fb_info(struct fb_info *info)
975{ 967{