aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/fbdev/core/fbmem.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/fbdev/core/fbmem.c')
-rw-r--r--drivers/video/fbdev/core/fbmem.c92
1 files changed, 0 insertions, 92 deletions
diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c
index b5e85f6c1c26..0705d8883ede 100644
--- a/drivers/video/fbdev/core/fbmem.c
+++ b/drivers/video/fbdev/core/fbmem.c
@@ -1908,96 +1908,4 @@ int fb_new_modelist(struct fb_info *info)
1908 return err; 1908 return err;
1909} 1909}
1910 1910
1911static char *video_options[FB_MAX] __read_mostly;
1912static int ofonly __read_mostly;
1913
1914/**
1915 * fb_get_options - get kernel boot parameters
1916 * @name: framebuffer name as it would appear in
1917 * the boot parameter line
1918 * (video=<name>:<options>)
1919 * @option: the option will be stored here
1920 *
1921 * NOTE: Needed to maintain backwards compatibility
1922 */
1923int fb_get_options(const char *name, char **option)
1924{
1925 char *opt, *options = NULL;
1926 int retval = 0;
1927 int name_len = strlen(name), i;
1928
1929 if (name_len && ofonly && strncmp(name, "offb", 4))
1930 retval = 1;
1931
1932 if (name_len && !retval) {
1933 for (i = 0; i < FB_MAX; i++) {
1934 if (video_options[i] == NULL)
1935 continue;
1936 if (!video_options[i][0])
1937 continue;
1938 opt = video_options[i];
1939 if (!strncmp(name, opt, name_len) &&
1940 opt[name_len] == ':')
1941 options = opt + name_len + 1;
1942 }
1943 }
1944 /* No match, pass global option */
1945 if (!options && option && fb_mode_option)
1946 options = kstrdup(fb_mode_option, GFP_KERNEL);
1947 if (options && !strncmp(options, "off", 3))
1948 retval = 1;
1949
1950 if (option)
1951 *option = options;
1952
1953 return retval;
1954}
1955EXPORT_SYMBOL(fb_get_options);
1956
1957#ifndef MODULE
1958/**
1959 * video_setup - process command line options
1960 * @options: string of options
1961 *
1962 * Process command line options for frame buffer subsystem.
1963 *
1964 * NOTE: This function is a __setup and __init function.
1965 * It only stores the options. Drivers have to call
1966 * fb_get_options() as necessary.
1967 *
1968 * Returns zero.
1969 *
1970 */
1971static int __init video_setup(char *options)
1972{
1973 int i, global = 0;
1974
1975 if (!options || !*options)
1976 global = 1;
1977
1978 if (!global && !strncmp(options, "ofonly", 6)) {
1979 ofonly = 1;
1980 global = 1;
1981 }
1982
1983 if (!global && !strchr(options, ':')) {
1984 fb_mode_option = options;
1985 global = 1;
1986 }
1987
1988 if (!global) {
1989 for (i = 0; i < FB_MAX; i++) {
1990 if (video_options[i] == NULL) {
1991 video_options[i] = options;
1992 break;
1993 }
1994
1995 }
1996 }
1997
1998 return 1;
1999}
2000__setup("video=", video_setup);
2001#endif
2002
2003MODULE_LICENSE("GPL"); 1911MODULE_LICENSE("GPL");