diff options
Diffstat (limited to 'include/linux/fb.h')
-rw-r--r-- | include/linux/fb.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/include/linux/fb.h b/include/linux/fb.h index 75a81eaf3430..31527e17076b 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef _LINUX_FB_H | 1 | #ifndef _LINUX_FB_H |
2 | #define _LINUX_FB_H | 2 | #define _LINUX_FB_H |
3 | 3 | ||
4 | #include <asm/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/i2c.h> | 5 | #include <linux/i2c.h> |
6 | 6 | ||
7 | struct dentry; | 7 | struct dentry; |
@@ -888,7 +888,7 @@ struct fb_info { | |||
888 | #define fb_writeq sbus_writeq | 888 | #define fb_writeq sbus_writeq |
889 | #define fb_memset sbus_memset_io | 889 | #define fb_memset sbus_memset_io |
890 | 890 | ||
891 | #elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__) || defined(__hppa__) || (defined(__sh__) && !defined(__SH5__)) || defined(__powerpc__) || defined(__avr32__) | 891 | #elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__) || defined(__hppa__) || defined(__sh__) || defined(__powerpc__) || defined(__avr32__) |
892 | 892 | ||
893 | #define fb_readb __raw_readb | 893 | #define fb_readb __raw_readb |
894 | #define fb_readw __raw_readw | 894 | #define fb_readw __raw_readw |
@@ -960,6 +960,21 @@ extern struct fb_info *registered_fb[FB_MAX]; | |||
960 | extern int num_registered_fb; | 960 | extern int num_registered_fb; |
961 | extern struct class *fb_class; | 961 | extern struct class *fb_class; |
962 | 962 | ||
963 | static inline int lock_fb_info(struct fb_info *info) | ||
964 | { | ||
965 | mutex_lock(&info->lock); | ||
966 | if (!info->fbops) { | ||
967 | mutex_unlock(&info->lock); | ||
968 | return 0; | ||
969 | } | ||
970 | return 1; | ||
971 | } | ||
972 | |||
973 | static inline void unlock_fb_info(struct fb_info *info) | ||
974 | { | ||
975 | mutex_unlock(&info->lock); | ||
976 | } | ||
977 | |||
963 | static inline void __fb_pad_aligned_buffer(u8 *dst, u32 d_pitch, | 978 | static inline void __fb_pad_aligned_buffer(u8 *dst, u32 d_pitch, |
964 | u8 *src, u32 s_pitch, u32 height) | 979 | u8 *src, u32 s_pitch, u32 height) |
965 | { | 980 | { |