Commit ab767201 authored by Antonino A. Daplas's avatar Antonino A. Daplas Committed by Linus Torvalds

[PATCH] fbdev: fix module dependency loop

Exporting struct fb_display produces this warning error on depmod:

WARNING: Module
/lib/modules/2.6.14-mm2/kernel/drivers/video/console/fbcon_ud.ko
ignored, due to loop
WARNING: Module
/lib/modules/2.6.14-mm2/kernel/drivers/video/console/fbcon_rotate.ko
ignored, due to loop
WARNING: Module
/lib/modules/2.6.14-mm2/kernel/drivers/video/console/fbcon_cw.ko
ignored, due to loop
WARNING: Module
/lib/modules/2.6.14-mm2/kernel/drivers/video/console/fbcon_ccw.ko
ignored, due to loop
WARNING: Module
/lib/modules/2.6.14-mm2/kernel/drivers/video/console/fbcon.ko ignored,
due to loop
WARNING: Loop detected:
/lib/modules/2.6.14-mm2/kernel/drivers/video/console/bitblit.ko needs
Signed-off-by: default avatarAntonino Daplas <adaplas@pol.net>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent c53ca784
...@@ -106,8 +106,7 @@ enum { ...@@ -106,8 +106,7 @@ enum {
FBCON_LOGO_DONTSHOW = -3 /* do not show the logo */ FBCON_LOGO_DONTSHOW = -3 /* do not show the logo */
}; };
struct display fb_display[MAX_NR_CONSOLES]; static struct display fb_display[MAX_NR_CONSOLES];
EXPORT_SYMBOL(fb_display);
static signed char con2fb_map[MAX_NR_CONSOLES]; static signed char con2fb_map[MAX_NR_CONSOLES];
static signed char con2fb_map_boot[MAX_NR_CONSOLES]; static signed char con2fb_map_boot[MAX_NR_CONSOLES];
...@@ -653,13 +652,12 @@ static void set_blitting_type(struct vc_data *vc, struct fb_info *info, ...@@ -653,13 +652,12 @@ static void set_blitting_type(struct vc_data *vc, struct fb_info *info,
{ {
struct fbcon_ops *ops = info->fbcon_par; struct fbcon_ops *ops = info->fbcon_par;
ops->p = (p) ? p : &fb_display[vc->vc_num];
if ((info->flags & FBINFO_MISC_TILEBLITTING)) if ((info->flags & FBINFO_MISC_TILEBLITTING))
fbcon_set_tileops(vc, info, p, ops); fbcon_set_tileops(vc, info, p, ops);
else { else {
struct display *disp; fbcon_set_rotation(info, ops->p);
disp = (p) ? p : &fb_display[vc->vc_num];
fbcon_set_rotation(info, disp);
fbcon_set_bitops(ops); fbcon_set_bitops(ops);
} }
} }
...@@ -668,11 +666,10 @@ static void set_blitting_type(struct vc_data *vc, struct fb_info *info, ...@@ -668,11 +666,10 @@ static void set_blitting_type(struct vc_data *vc, struct fb_info *info,
struct display *p) struct display *p)
{ {
struct fbcon_ops *ops = info->fbcon_par; struct fbcon_ops *ops = info->fbcon_par;
struct display *disp;
info->flags &= ~FBINFO_MISC_TILEBLITTING; info->flags &= ~FBINFO_MISC_TILEBLITTING;
disp = (p) ? p : &fb_display[vc->vc_num]; ops->p = (p) ? p : &fb_display[vc->vc_num];
fbcon_set_rotation(info, disp); fbcon_set_rotation(info, ops->p);
fbcon_set_bitops(ops); fbcon_set_bitops(ops);
} }
#endif /* CONFIG_MISC_TILEBLITTING */ #endif /* CONFIG_MISC_TILEBLITTING */
......
...@@ -52,8 +52,6 @@ struct display { ...@@ -52,8 +52,6 @@ struct display {
struct fb_videomode *mode; struct fb_videomode *mode;
}; };
extern struct display fb_display[];
struct fbcon_ops { struct fbcon_ops {
void (*bmove)(struct vc_data *vc, struct fb_info *info, int sy, void (*bmove)(struct vc_data *vc, struct fb_info *info, int sy,
int sx, int dy, int dx, int height, int width); int sx, int dy, int dx, int height, int width);
...@@ -73,6 +71,7 @@ struct fbcon_ops { ...@@ -73,6 +71,7 @@ struct fbcon_ops {
struct fb_var_screeninfo var; /* copy of the current fb_var_screeninfo */ struct fb_var_screeninfo var; /* copy of the current fb_var_screeninfo */
struct timer_list cursor_timer; /* Cursor timer */ struct timer_list cursor_timer; /* Cursor timer */
struct fb_cursor cursor_state; struct fb_cursor cursor_state;
struct display *p;
int currcon; /* Current VC. */ int currcon; /* Current VC. */
int cursor_flash; int cursor_flash;
int cursor_reset; int cursor_reset;
......
...@@ -63,9 +63,9 @@ static inline void ccw_update_attr(u8 *dst, u8 *src, int attribute, ...@@ -63,9 +63,9 @@ static inline void ccw_update_attr(u8 *dst, u8 *src, int attribute,
static void ccw_bmove(struct vc_data *vc, struct fb_info *info, int sy, static void ccw_bmove(struct vc_data *vc, struct fb_info *info, int sy,
int sx, int dy, int dx, int height, int width) int sx, int dy, int dx, int height, int width)
{ {
struct display *p = &fb_display[vc->vc_num]; struct fbcon_ops *ops = info->fbcon_par;
struct fb_copyarea area; struct fb_copyarea area;
u32 vyres = GETVYRES(p->scrollmode, info); u32 vyres = GETVYRES(ops->p->scrollmode, info);
area.sx = sy * vc->vc_font.height; area.sx = sy * vc->vc_font.height;
area.sy = vyres - ((sx + width) * vc->vc_font.width); area.sy = vyres - ((sx + width) * vc->vc_font.width);
...@@ -80,10 +80,10 @@ static void ccw_bmove(struct vc_data *vc, struct fb_info *info, int sy, ...@@ -80,10 +80,10 @@ static void ccw_bmove(struct vc_data *vc, struct fb_info *info, int sy,
static void ccw_clear(struct vc_data *vc, struct fb_info *info, int sy, static void ccw_clear(struct vc_data *vc, struct fb_info *info, int sy,
int sx, int height, int width) int sx, int height, int width)
{ {
struct display *p = &fb_display[vc->vc_num]; struct fbcon_ops *ops = info->fbcon_par;
struct fb_fillrect region; struct fb_fillrect region;
int bgshift = (vc->vc_hi_font_mask) ? 13 : 12; int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
u32 vyres = GETVYRES(p->scrollmode, info); u32 vyres = GETVYRES(ops->p->scrollmode, info);
region.color = attr_bgcol_ec(bgshift,vc); region.color = attr_bgcol_ec(bgshift,vc);
region.dx = sy * vc->vc_font.height; region.dx = sy * vc->vc_font.height;
...@@ -131,7 +131,6 @@ static void ccw_putcs(struct vc_data *vc, struct fb_info *info, ...@@ -131,7 +131,6 @@ static void ccw_putcs(struct vc_data *vc, struct fb_info *info,
int fg, int bg) int fg, int bg)
{ {
struct fb_image image; struct fb_image image;
struct display *p = &fb_display[vc->vc_num];
struct fbcon_ops *ops = info->fbcon_par; struct fbcon_ops *ops = info->fbcon_par;
u32 width = (vc->vc_font.height + 7)/8; u32 width = (vc->vc_font.height + 7)/8;
u32 cellsize = width * vc->vc_font.width; u32 cellsize = width * vc->vc_font.width;
...@@ -141,7 +140,7 @@ static void ccw_putcs(struct vc_data *vc, struct fb_info *info, ...@@ -141,7 +140,7 @@ static void ccw_putcs(struct vc_data *vc, struct fb_info *info,
u32 cnt, pitch, size; u32 cnt, pitch, size;
u32 attribute = get_attribute(info, scr_readw(s)); u32 attribute = get_attribute(info, scr_readw(s));
u8 *dst, *buf = NULL; u8 *dst, *buf = NULL;
u32 vyres = GETVYRES(p->scrollmode, info); u32 vyres = GETVYRES(ops->p->scrollmode, info);
if (!ops->fontbuffer) if (!ops->fontbuffer)
return; return;
...@@ -397,9 +396,8 @@ static void ccw_cursor(struct vc_data *vc, struct fb_info *info, ...@@ -397,9 +396,8 @@ static void ccw_cursor(struct vc_data *vc, struct fb_info *info,
int ccw_update_start(struct fb_info *info) int ccw_update_start(struct fb_info *info)
{ {
struct fbcon_ops *ops = info->fbcon_par; struct fbcon_ops *ops = info->fbcon_par;
struct display *p = &fb_display[ops->currcon];
u32 yoffset; u32 yoffset;
u32 vyres = GETVYRES(p->scrollmode, info); u32 vyres = GETVYRES(ops->p->scrollmode, info);
int err; int err;
yoffset = (vyres - info->var.yres) - ops->var.xoffset; yoffset = (vyres - info->var.yres) - ops->var.xoffset;
......
...@@ -49,9 +49,9 @@ static inline void cw_update_attr(u8 *dst, u8 *src, int attribute, ...@@ -49,9 +49,9 @@ static inline void cw_update_attr(u8 *dst, u8 *src, int attribute,
static void cw_bmove(struct vc_data *vc, struct fb_info *info, int sy, static void cw_bmove(struct vc_data *vc, struct fb_info *info, int sy,
int sx, int dy, int dx, int height, int width) int sx, int dy, int dx, int height, int width)
{ {
struct display *p = &fb_display[vc->vc_num]; struct fbcon_ops *ops = info->fbcon_par;
struct fb_copyarea area; struct fb_copyarea area;
u32 vxres = GETVXRES(p->scrollmode, info); u32 vxres = GETVXRES(ops->p->scrollmode, info);
area.sx = vxres - ((sy + height) * vc->vc_font.height); area.sx = vxres - ((sy + height) * vc->vc_font.height);
area.sy = sx * vc->vc_font.width; area.sy = sx * vc->vc_font.width;
...@@ -66,10 +66,10 @@ static void cw_bmove(struct vc_data *vc, struct fb_info *info, int sy, ...@@ -66,10 +66,10 @@ static void cw_bmove(struct vc_data *vc, struct fb_info *info, int sy,
static void cw_clear(struct vc_data *vc, struct fb_info *info, int sy, static void cw_clear(struct vc_data *vc, struct fb_info *info, int sy,
int sx, int height, int width) int sx, int height, int width)
{ {
struct display *p = &fb_display[vc->vc_num]; struct fbcon_ops *ops = info->fbcon_par;
struct fb_fillrect region; struct fb_fillrect region;
int bgshift = (vc->vc_hi_font_mask) ? 13 : 12; int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
u32 vxres = GETVXRES(p->scrollmode, info); u32 vxres = GETVXRES(ops->p->scrollmode, info);
region.color = attr_bgcol_ec(bgshift,vc); region.color = attr_bgcol_ec(bgshift,vc);
region.dx = vxres - ((sy + height) * vc->vc_font.height); region.dx = vxres - ((sy + height) * vc->vc_font.height);
...@@ -117,7 +117,6 @@ static void cw_putcs(struct vc_data *vc, struct fb_info *info, ...@@ -117,7 +117,6 @@ static void cw_putcs(struct vc_data *vc, struct fb_info *info,
int fg, int bg) int fg, int bg)
{ {
struct fb_image image; struct fb_image image;
struct display *p = &fb_display[vc->vc_num];
struct fbcon_ops *ops = info->fbcon_par; struct fbcon_ops *ops = info->fbcon_par;
u32 width = (vc->vc_font.height + 7)/8; u32 width = (vc->vc_font.height + 7)/8;
u32 cellsize = width * vc->vc_font.width; u32 cellsize = width * vc->vc_font.width;
...@@ -127,7 +126,7 @@ static void cw_putcs(struct vc_data *vc, struct fb_info *info, ...@@ -127,7 +126,7 @@ static void cw_putcs(struct vc_data *vc, struct fb_info *info,
u32 cnt, pitch, size; u32 cnt, pitch, size;
u32 attribute = get_attribute(info, scr_readw(s)); u32 attribute = get_attribute(info, scr_readw(s));
u8 *dst, *buf = NULL; u8 *dst, *buf = NULL;
u32 vxres = GETVXRES(p->scrollmode, info); u32 vxres = GETVXRES(ops->p->scrollmode, info);
if (!ops->fontbuffer) if (!ops->fontbuffer)
return; return;
...@@ -381,8 +380,7 @@ static void cw_cursor(struct vc_data *vc, struct fb_info *info, ...@@ -381,8 +380,7 @@ static void cw_cursor(struct vc_data *vc, struct fb_info *info,
int cw_update_start(struct fb_info *info) int cw_update_start(struct fb_info *info)
{ {
struct fbcon_ops *ops = info->fbcon_par; struct fbcon_ops *ops = info->fbcon_par;
struct display *p = &fb_display[ops->currcon]; u32 vxres = GETVXRES(ops->p->scrollmode, info);
u32 vxres = GETVXRES(p->scrollmode, info);
u32 xoffset; u32 xoffset;
int err; int err;
......
...@@ -48,10 +48,10 @@ static inline void ud_update_attr(u8 *dst, u8 *src, int attribute, ...@@ -48,10 +48,10 @@ static inline void ud_update_attr(u8 *dst, u8 *src, int attribute,
static void ud_bmove(struct vc_data *vc, struct fb_info *info, int sy, static void ud_bmove(struct vc_data *vc, struct fb_info *info, int sy,
int sx, int dy, int dx, int height, int width) int sx, int dy, int dx, int height, int width)
{ {
struct display *p = &fb_display[vc->vc_num]; struct fbcon_ops *ops = info->fbcon_par;
struct fb_copyarea area; struct fb_copyarea area;
u32 vyres = GETVYRES(p->scrollmode, info); u32 vyres = GETVYRES(ops->p->scrollmode, info);
u32 vxres = GETVXRES(p->scrollmode, info); u32 vxres = GETVXRES(ops->p->scrollmode, info);
area.sy = vyres - ((sy + height) * vc->vc_font.height); area.sy = vyres - ((sy + height) * vc->vc_font.height);
area.sx = vxres - ((sx + width) * vc->vc_font.width); area.sx = vxres - ((sx + width) * vc->vc_font.width);
...@@ -66,11 +66,11 @@ static void ud_bmove(struct vc_data *vc, struct fb_info *info, int sy, ...@@ -66,11 +66,11 @@ static void ud_bmove(struct vc_data *vc, struct fb_info *info, int sy,
static void ud_clear(struct vc_data *vc, struct fb_info *info, int sy, static void ud_clear(struct vc_data *vc, struct fb_info *info, int sy,
int sx, int height, int width) int sx, int height, int width)
{ {
struct display *p = &fb_display[vc->vc_num]; struct fbcon_ops *ops = info->fbcon_par;
struct fb_fillrect region; struct fb_fillrect region;
int bgshift = (vc->vc_hi_font_mask) ? 13 : 12; int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
u32 vyres = GETVYRES(p->scrollmode, info); u32 vyres = GETVYRES(ops->p->scrollmode, info);
u32 vxres = GETVXRES(p->scrollmode, info); u32 vxres = GETVXRES(ops->p->scrollmode, info);
region.color = attr_bgcol_ec(bgshift,vc); region.color = attr_bgcol_ec(bgshift,vc);
region.dy = vyres - ((sy + height) * vc->vc_font.height); region.dy = vyres - ((sy + height) * vc->vc_font.height);
...@@ -153,7 +153,6 @@ static void ud_putcs(struct vc_data *vc, struct fb_info *info, ...@@ -153,7 +153,6 @@ static void ud_putcs(struct vc_data *vc, struct fb_info *info,
int fg, int bg) int fg, int bg)
{ {
struct fb_image image; struct fb_image image;
struct display *p = &fb_display[vc->vc_num];
struct fbcon_ops *ops = info->fbcon_par; struct fbcon_ops *ops = info->fbcon_par;
u32 width = (vc->vc_font.width + 7)/8; u32 width = (vc->vc_font.width + 7)/8;
u32 cellsize = width * vc->vc_font.height; u32 cellsize = width * vc->vc_font.height;
...@@ -163,8 +162,8 @@ static void ud_putcs(struct vc_data *vc, struct fb_info *info, ...@@ -163,8 +162,8 @@ static void ud_putcs(struct vc_data *vc, struct fb_info *info,
u32 mod = vc->vc_font.width % 8, cnt, pitch, size; u32 mod = vc->vc_font.width % 8, cnt, pitch, size;
u32 attribute = get_attribute(info, scr_readw(s)); u32 attribute = get_attribute(info, scr_readw(s));
u8 *dst, *buf = NULL; u8 *dst, *buf = NULL;
u32 vyres = GETVYRES(p->scrollmode, info); u32 vyres = GETVYRES(ops->p->scrollmode, info);
u32 vxres = GETVXRES(p->scrollmode, info); u32 vxres = GETVXRES(ops->p->scrollmode, info);
if (!ops->fontbuffer) if (!ops->fontbuffer)
return; return;
...@@ -421,10 +420,9 @@ static void ud_cursor(struct vc_data *vc, struct fb_info *info, ...@@ -421,10 +420,9 @@ static void ud_cursor(struct vc_data *vc, struct fb_info *info,
int ud_update_start(struct fb_info *info) int ud_update_start(struct fb_info *info)
{ {
struct fbcon_ops *ops = info->fbcon_par; struct fbcon_ops *ops = info->fbcon_par;
struct display *p = &fb_display[ops->currcon];
u32 xoffset, yoffset; u32 xoffset, yoffset;
u32 vyres = GETVYRES(p->scrollmode, info); u32 vyres = GETVYRES(ops->p->scrollmode, info);
u32 vxres = GETVXRES(p->scrollmode, info); u32 vxres = GETVXRES(ops->p->scrollmode, info);
int err; int err;
xoffset = (vxres - info->var.xres) - ops->var.xoffset; xoffset = (vxres - info->var.xres) - ops->var.xoffset;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment