diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2009-03-31 18:25:19 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-01 11:59:29 -0400 |
commit | 6a7f2829b5f8be124e168265f176dbbbea8861a0 (patch) | |
tree | e900d09ba43d9a7248725287a7658fa85e041332 | |
parent | 66c1ca019078220dc1bf968f2bb18421100ef147 (diff) |
fbdev: uninline lock_fb_info()
Before:
text data bss dec hex filename
3648 2910 32 6590 19be drivers/video/backlight/backlight.o
3226 2812 32 6070 17b6 drivers/video/backlight/lcd.o
30990 16688 8480 56158 db5e drivers/video/console/fbcon.o
15488 8400 24 23912 5d68 drivers/video/fbmem.o
After:
text data bss dec hex filename
3537 2870 32 6439 1927 drivers/video/backlight/backlight.o
3131 2772 32 5935 172f drivers/video/backlight/lcd.o
30876 16648 8480 56004 dac4 drivers/video/console/fbcon.o
15506 8400 24 23930 5d7a drivers/video/fbmem.o
Cc: Andrea Righi <righi.andrea@gmail.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | drivers/video/fbmem.c | 11 | ||||
-rw-r--r-- | include/linux/fb.h | 10 |
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 @@ | |||
46 | struct fb_info *registered_fb[FB_MAX] __read_mostly; | 46 | struct fb_info *registered_fb[FB_MAX] __read_mostly; |
47 | int num_registered_fb __read_mostly; | 47 | int num_registered_fb __read_mostly; |
48 | 48 | ||
49 | int 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 | } | ||
58 | EXPORT_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]; | |||
961 | extern int num_registered_fb; | 961 | extern int num_registered_fb; |
962 | extern struct class *fb_class; | 962 | extern struct class *fb_class; |
963 | 963 | ||
964 | static inline int lock_fb_info(struct fb_info *info) | 964 | extern 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 | ||
974 | static inline void unlock_fb_info(struct fb_info *info) | 966 | static inline void unlock_fb_info(struct fb_info *info) |
975 | { | 967 | { |