aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/fbmem.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/fbmem.c')
-rw-r--r--drivers/video/fbmem.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 93ffcdd95f50..3cfea315a48f 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -52,8 +52,8 @@
52 52
53#define FBPIXMAPSIZE (1024 * 8) 53#define FBPIXMAPSIZE (1024 * 8)
54 54
55struct fb_info *registered_fb[FB_MAX]; 55struct fb_info *registered_fb[FB_MAX] __read_mostly;
56int num_registered_fb; 56int num_registered_fb __read_mostly;
57 57
58/* 58/*
59 * Helpers 59 * Helpers
@@ -202,7 +202,7 @@ static void fb_set_logo_truepalette(struct fb_info *info,
202 const struct linux_logo *logo, 202 const struct linux_logo *logo,
203 u32 *palette) 203 u32 *palette)
204{ 204{
205 unsigned char mask[9] = { 0,0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xfe,0xff }; 205 static const unsigned char mask[] = { 0,0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xfe,0xff };
206 unsigned char redmask, greenmask, bluemask; 206 unsigned char redmask, greenmask, bluemask;
207 int redshift, greenshift, blueshift; 207 int redshift, greenshift, blueshift;
208 int i; 208 int i;
@@ -317,7 +317,7 @@ static struct logo_data {
317 int needs_truepalette; 317 int needs_truepalette;
318 int needs_cmapreset; 318 int needs_cmapreset;
319 const struct linux_logo *logo; 319 const struct linux_logo *logo;
320} fb_logo; 320} fb_logo __read_mostly;
321 321
322static void fb_rotate_logo_ud(const u8 *in, u8 *out, u32 width, u32 height) 322static void fb_rotate_logo_ud(const u8 *in, u8 *out, u32 width, u32 height)
323{ 323{
@@ -572,7 +572,7 @@ static ssize_t
572fb_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) 572fb_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
573{ 573{
574 unsigned long p = *ppos; 574 unsigned long p = *ppos;
575 struct inode *inode = file->f_dentry->d_inode; 575 struct inode *inode = file->f_path.dentry->d_inode;
576 int fbidx = iminor(inode); 576 int fbidx = iminor(inode);
577 struct fb_info *info = registered_fb[fbidx]; 577 struct fb_info *info = registered_fb[fbidx];
578 u32 *buffer, *dst; 578 u32 *buffer, *dst;
@@ -647,7 +647,7 @@ static ssize_t
647fb_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) 647fb_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
648{ 648{
649 unsigned long p = *ppos; 649 unsigned long p = *ppos;
650 struct inode *inode = file->f_dentry->d_inode; 650 struct inode *inode = file->f_path.dentry->d_inode;
651 int fbidx = iminor(inode); 651 int fbidx = iminor(inode);
652 struct fb_info *info = registered_fb[fbidx]; 652 struct fb_info *info = registered_fb[fbidx];
653 u32 *buffer, *src; 653 u32 *buffer, *src;
@@ -1081,7 +1081,7 @@ static int fb_get_fscreeninfo(struct inode *inode, struct file *file,
1081static long 1081static long
1082fb_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg) 1082fb_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
1083{ 1083{
1084 struct inode *inode = file->f_dentry->d_inode; 1084 struct inode *inode = file->f_path.dentry->d_inode;
1085 int fbidx = iminor(inode); 1085 int fbidx = iminor(inode);
1086 struct fb_info *info = registered_fb[fbidx]; 1086 struct fb_info *info = registered_fb[fbidx];
1087 struct fb_ops *fb = info->fbops; 1087 struct fb_ops *fb = info->fbops;
@@ -1121,7 +1121,7 @@ fb_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
1121static int 1121static int
1122fb_mmap(struct file *file, struct vm_area_struct * vma) 1122fb_mmap(struct file *file, struct vm_area_struct * vma)
1123{ 1123{
1124 int fbidx = iminor(file->f_dentry->d_inode); 1124 int fbidx = iminor(file->f_path.dentry->d_inode);
1125 struct fb_info *info = registered_fb[fbidx]; 1125 struct fb_info *info = registered_fb[fbidx];
1126 struct fb_ops *fb = info->fbops; 1126 struct fb_ops *fb = info->fbops;
1127 unsigned long off; 1127 unsigned long off;
@@ -1253,7 +1253,7 @@ fb_release(struct inode *inode, struct file *file)
1253 return 0; 1253 return 0;
1254} 1254}
1255 1255
1256static struct file_operations fb_fops = { 1256static const struct file_operations fb_fops = {
1257 .owner = THIS_MODULE, 1257 .owner = THIS_MODULE,
1258 .read = fb_read, 1258 .read = fb_read,
1259 .write = fb_write, 1259 .write = fb_write,
@@ -1296,14 +1296,14 @@ register_framebuffer(struct fb_info *fb_info)
1296 break; 1296 break;
1297 fb_info->node = i; 1297 fb_info->node = i;
1298 1298
1299 fb_info->class_device = class_device_create(fb_class, NULL, MKDEV(FB_MAJOR, i), 1299 fb_info->dev = device_create(fb_class, fb_info->device,
1300 fb_info->device, "fb%d", i); 1300 MKDEV(FB_MAJOR, i), "fb%d", i);
1301 if (IS_ERR(fb_info->class_device)) { 1301 if (IS_ERR(fb_info->dev)) {
1302 /* Not fatal */ 1302 /* Not fatal */
1303 printk(KERN_WARNING "Unable to create class_device for framebuffer %d; errno = %ld\n", i, PTR_ERR(fb_info->class_device)); 1303 printk(KERN_WARNING "Unable to create device for framebuffer %d; errno = %ld\n", i, PTR_ERR(fb_info->dev));
1304 fb_info->class_device = NULL; 1304 fb_info->dev = NULL;
1305 } else 1305 } else
1306 fb_init_class_device(fb_info); 1306 fb_init_device(fb_info);
1307 1307
1308 if (fb_info->pixmap.addr == NULL) { 1308 if (fb_info->pixmap.addr == NULL) {
1309 fb_info->pixmap.addr = kmalloc(FBPIXMAPSIZE, GFP_KERNEL); 1309 fb_info->pixmap.addr = kmalloc(FBPIXMAPSIZE, GFP_KERNEL);
@@ -1356,8 +1356,8 @@ unregister_framebuffer(struct fb_info *fb_info)
1356 fb_destroy_modelist(&fb_info->modelist); 1356 fb_destroy_modelist(&fb_info->modelist);
1357 registered_fb[i]=NULL; 1357 registered_fb[i]=NULL;
1358 num_registered_fb--; 1358 num_registered_fb--;
1359 fb_cleanup_class_device(fb_info); 1359 fb_cleanup_device(fb_info);
1360 class_device_destroy(fb_class, MKDEV(FB_MAJOR, i)); 1360 device_destroy(fb_class, MKDEV(FB_MAJOR, i));
1361 event.info = fb_info; 1361 event.info = fb_info;
1362 fb_notifier_call_chain(FB_EVENT_FB_UNREGISTERED, &event); 1362 fb_notifier_call_chain(FB_EVENT_FB_UNREGISTERED, &event);
1363 return 0; 1363 return 0;
@@ -1459,8 +1459,8 @@ int fb_new_modelist(struct fb_info *info)
1459 return err; 1459 return err;
1460} 1460}
1461 1461
1462static char *video_options[FB_MAX]; 1462static char *video_options[FB_MAX] __read_mostly;
1463static int ofonly; 1463static int ofonly __read_mostly;
1464 1464
1465extern const char *global_mode_option; 1465extern const char *global_mode_option;
1466 1466