Merge mulgrave-w:git/scsi-misc-2.6
[powerpc.git] / drivers / video / fbsysfs.c
index 3ceb8c1..4f78f23 100644 (file)
@@ -100,13 +100,22 @@ static int mode_string(char *buf, unsigned int offset,
                       const struct fb_videomode *mode)
 {
        char m = 'U';
+       char v = 'p';
+
        if (mode->flag & FB_MODE_IS_DETAILED)
                m = 'D';
        if (mode->flag & FB_MODE_IS_VESA)
                m = 'V';
        if (mode->flag & FB_MODE_IS_STANDARD)
                m = 'S';
-       return snprintf(&buf[offset], PAGE_SIZE - offset, "%c:%dx%d-%d\n", m, mode->xres, mode->yres, mode->refresh);
+
+       if (mode->vmode & FB_VMODE_INTERLACED)
+               v = 'i';
+       if (mode->vmode & FB_VMODE_DOUBLE)
+               v = 'd';
+
+       return snprintf(&buf[offset], PAGE_SIZE - offset, "%c:%dx%d%c-%d\n",
+                       m, mode->xres, mode->yres, v, mode->refresh);
 }
 
 static ssize_t store_mode(struct class_device *class_device, const char * buf,
@@ -238,45 +247,6 @@ static ssize_t show_rotate(struct class_device *class_device, char *buf)
        return snprintf(buf, PAGE_SIZE, "%d\n", fb_info->var.rotate);
 }
 
-static ssize_t store_con_rotate(struct class_device *class_device,
-                               const char *buf, size_t count)
-{
-       struct fb_info *fb_info = class_get_devdata(class_device);
-       int rotate;
-       char **last = NULL;
-
-       acquire_console_sem();
-       rotate = simple_strtoul(buf, last, 0);
-       fb_con_duit(fb_info, FB_EVENT_SET_CON_ROTATE, &rotate);
-       release_console_sem();
-       return count;
-}
-
-static ssize_t store_con_rotate_all(struct class_device *class_device,
-                               const char *buf, size_t count)
-{
-       struct fb_info *fb_info = class_get_devdata(class_device);
-       int rotate;
-       char **last = NULL;
-
-       acquire_console_sem();
-       rotate = simple_strtoul(buf, last, 0);
-       fb_con_duit(fb_info, FB_EVENT_SET_CON_ROTATE_ALL, &rotate);
-       release_console_sem();
-       return count;
-}
-
-static ssize_t show_con_rotate(struct class_device *class_device, char *buf)
-{
-       struct fb_info *fb_info = class_get_devdata(class_device);
-       int rotate;
-
-       acquire_console_sem();
-       rotate = fb_con_duit(fb_info, FB_EVENT_GET_CON_ROTATE, NULL);
-       release_console_sem();
-       return snprintf(buf, PAGE_SIZE, "%d\n", rotate);
-}
-
 static ssize_t store_virtual(struct class_device *class_device,
                             const char * buf, size_t count)
 {
@@ -493,8 +463,6 @@ static struct class_device_attribute class_device_attrs[] = {
        __ATTR(name, S_IRUGO, show_name, NULL),
        __ATTR(stride, S_IRUGO, show_stride, NULL),
        __ATTR(rotate, S_IRUGO|S_IWUSR, show_rotate, store_rotate),
-       __ATTR(con_rotate, S_IRUGO|S_IWUSR, show_con_rotate, store_con_rotate),
-       __ATTR(con_rotate_all, S_IWUSR, NULL, store_con_rotate_all),
        __ATTR(state, S_IRUGO|S_IWUSR, show_fbstate, store_fbstate),
 #ifdef CONFIG_FB_BACKLIGHT
        __ATTR(bl_curve, S_IRUGO|S_IWUSR, show_bl_curve, store_bl_curve),