Merge branch 'linus' of master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa
[powerpc.git] / drivers / video / console / fbcon_rotate.c
index 6a96931..00884e0 100644 (file)
@@ -8,7 +8,6 @@
  *  more details.
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/string.h>
 #include <linux/fb.h>
@@ -18,8 +17,7 @@
 #include "fbcon.h"
 #include "fbcon_rotate.h"
 
-static int fbcon_rotate_font(struct fb_info *info, struct vc_data *vc,
-                            struct display *p)
+static int fbcon_rotate_font(struct fb_info *info, struct vc_data *vc)
 {
        struct fbcon_ops *ops = info->fbcon_par;
        int len, err = 0;
@@ -28,12 +26,12 @@ static int fbcon_rotate_font(struct fb_info *info, struct vc_data *vc,
        u8 *dst;
 
        if (vc->vc_font.data == ops->fontdata &&
-           p->con_rotate == ops->cur_rotate)
+           ops->p->con_rotate == ops->cur_rotate)
                goto finished;
 
        src = ops->fontdata = vc->vc_font.data;
-       ops->cur_rotate = p->con_rotate;
-       len = (!p->userfont) ? 256 : FNTCHARCNT(src);
+       ops->cur_rotate = ops->p->con_rotate;
+       len = (!ops->p->userfont) ? 256 : FNTCHARCNT(src);
        s_cellsize = ((vc->vc_font.width + 7)/8) *
                vc->vc_font.height;
        d_cellsize = s_cellsize;
@@ -97,6 +95,18 @@ finished:
 void fbcon_set_rotate(struct fbcon_ops *ops)
 {
        ops->rotate_font = fbcon_rotate_font;
+
+       switch(ops->rotate) {
+       case FB_ROTATE_CW:
+               fbcon_rotate_cw(ops);
+               break;
+       case FB_ROTATE_UD:
+               fbcon_rotate_ud(ops);
+               break;
+       case FB_ROTATE_CCW:
+               fbcon_rotate_ccw(ops);
+               break;
+       }
 }
 EXPORT_SYMBOL(fbcon_set_rotate);