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.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 0737570030f5..3f18bb9abad0 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -28,9 +28,7 @@
28#include <linux/proc_fs.h> 28#include <linux/proc_fs.h>
29#include <linux/seq_file.h> 29#include <linux/seq_file.h>
30#include <linux/console.h> 30#include <linux/console.h>
31#ifdef CONFIG_KMOD
32#include <linux/kmod.h> 31#include <linux/kmod.h>
33#endif
34#include <linux/err.h> 32#include <linux/err.h>
35#include <linux/device.h> 33#include <linux/device.h>
36#include <linux/efi.h> 34#include <linux/efi.h>
@@ -837,13 +835,6 @@ fb_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
837 return (cnt) ? cnt : err; 835 return (cnt) ? cnt : err;
838} 836}
839 837
840#ifdef CONFIG_KMOD
841static void try_to_load(int fb)
842{
843 request_module("fb%d", fb);
844}
845#endif /* CONFIG_KMOD */
846
847int 838int
848fb_pan_display(struct fb_info *info, struct fb_var_screeninfo *var) 839fb_pan_display(struct fb_info *info, struct fb_var_screeninfo *var)
849{ 840{
@@ -1086,10 +1077,8 @@ fb_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
1086 return -EINVAL; 1077 return -EINVAL;
1087 if (con2fb.framebuffer < 0 || con2fb.framebuffer >= FB_MAX) 1078 if (con2fb.framebuffer < 0 || con2fb.framebuffer >= FB_MAX)
1088 return -EINVAL; 1079 return -EINVAL;
1089#ifdef CONFIG_KMOD
1090 if (!registered_fb[con2fb.framebuffer]) 1080 if (!registered_fb[con2fb.framebuffer])
1091 try_to_load(con2fb.framebuffer); 1081 request_module("fb%d", con2fb.framebuffer);
1092#endif /* CONFIG_KMOD */
1093 if (!registered_fb[con2fb.framebuffer]) 1082 if (!registered_fb[con2fb.framebuffer])
1094 return -EINVAL; 1083 return -EINVAL;
1095 event.info = info; 1084 event.info = info;
@@ -1327,10 +1316,8 @@ fb_open(struct inode *inode, struct file *file)
1327 if (fbidx >= FB_MAX) 1316 if (fbidx >= FB_MAX)
1328 return -ENODEV; 1317 return -ENODEV;
1329 lock_kernel(); 1318 lock_kernel();
1330#ifdef CONFIG_KMOD
1331 if (!(info = registered_fb[fbidx])) 1319 if (!(info = registered_fb[fbidx]))
1332 try_to_load(fbidx); 1320 request_module("fb%d", fbidx);
1333#endif /* CONFIG_KMOD */
1334 if (!(info = registered_fb[fbidx])) { 1321 if (!(info = registered_fb[fbidx])) {
1335 res = -ENODEV; 1322 res = -ENODEV;
1336 goto out; 1323 goto out;