Commit 948592ca authored by Antonino Daplas's avatar Antonino Daplas Committed by Linus Torvalds

[PATCH] savagefb: Make savagefb one module

#if defined(CONFIG_FB_SAVAGE_ACCEL)

  doesn't work with FB_SAVAGE_ACCEL=m, and

#if defined(CONFIG_FB_SAVAGE_ACCEL) || defined(CONFIG_FB_SAVAGE_ACCEL_MODULE)

  would break with FB_SAVAGE=y and FB_SAVAGE_ACCEL=m.

Rename savagefb.c to savagefb_driver.c.
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
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 06b051b9
...@@ -1024,7 +1024,7 @@ config FB_SAVAGE ...@@ -1024,7 +1024,7 @@ config FB_SAVAGE
will be called savagefb. will be called savagefb.
config FB_SAVAGE_I2C config FB_SAVAGE_I2C
tristate "Enable DDC2 Support" bool "Enable DDC2 Support"
depends on FB_SAVAGE depends on FB_SAVAGE
help help
This enables I2C support for S3 Savage Chipsets. This is used This enables I2C support for S3 Savage Chipsets. This is used
...@@ -1036,7 +1036,7 @@ config FB_SAVAGE_I2C ...@@ -1036,7 +1036,7 @@ config FB_SAVAGE_I2C
here. here.
config FB_SAVAGE_ACCEL config FB_SAVAGE_ACCEL
tristate "Enable Console Acceleration" bool "Enable Console Acceleration"
depends on FB_SAVAGE depends on FB_SAVAGE
default n default n
help help
......
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
# Makefile for the S3 Savage framebuffer driver # Makefile for the S3 Savage framebuffer driver
# #
obj-$(CONFIG_FB_SAVAGE) += savagefb.o obj-$(CONFIG_FB_SAVAGE) += savagefb.o
obj-$(CONFIG_FB_SAVAGE_I2C) += savagefb-i2c.o
obj-$(CONFIG_FB_SAVAGE_ACCEL) += savagefb_accel.o
savagefb-y += savagefb_driver.o
savagefb-$(CONFIG_FB_SAVAGE_I2C) += savagefb-i2c.o
savagefb-$(CONFIG_FB_SAVAGE_ACCEL) += savagefb_accel.o
...@@ -207,7 +207,6 @@ void savagefb_create_i2c_busses(struct fb_info *info) ...@@ -207,7 +207,6 @@ void savagefb_create_i2c_busses(struct fb_info *info)
savage_setup_i2c_bus(&par->chan, "SAVAGE DDC2"); savage_setup_i2c_bus(&par->chan, "SAVAGE DDC2");
} }
EXPORT_SYMBOL(savagefb_create_i2c_busses);
void savagefb_delete_i2c_busses(struct fb_info *info) void savagefb_delete_i2c_busses(struct fb_info *info)
{ {
...@@ -222,7 +221,6 @@ void savagefb_delete_i2c_busses(struct fb_info *info) ...@@ -222,7 +221,6 @@ void savagefb_delete_i2c_busses(struct fb_info *info)
par->chan.par = NULL; par->chan.par = NULL;
} }
EXPORT_SYMBOL(savagefb_delete_i2c_busses);
static u8 *savage_do_probe_i2c_edid(struct savagefb_i2c_chan *chan) static u8 *savage_do_probe_i2c_edid(struct savagefb_i2c_chan *chan)
{ {
...@@ -280,6 +278,5 @@ int savagefb_probe_i2c_connector(struct savagefb_par *par, u8 **out_edid) ...@@ -280,6 +278,5 @@ int savagefb_probe_i2c_connector(struct savagefb_par *par, u8 **out_edid)
return 0; return 0;
} }
EXPORT_SYMBOL(savagefb_probe_i2c_connector);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
...@@ -26,7 +26,6 @@ int savagefb_sync(struct fb_info *info) ...@@ -26,7 +26,6 @@ int savagefb_sync(struct fb_info *info)
par->SavageWaitIdle(par); par->SavageWaitIdle(par);
return 0; return 0;
} }
EXPORT_SYMBOL(savagefb_sync);
void savagefb_copyarea(struct fb_info *info, const struct fb_copyarea *region) void savagefb_copyarea(struct fb_info *info, const struct fb_copyarea *region)
{ {
...@@ -61,7 +60,6 @@ void savagefb_copyarea(struct fb_info *info, const struct fb_copyarea *region) ...@@ -61,7 +60,6 @@ void savagefb_copyarea(struct fb_info *info, const struct fb_copyarea *region)
BCI_SEND(BCI_X_Y(dx, dy)); BCI_SEND(BCI_X_Y(dx, dy));
BCI_SEND(BCI_W_H(region->width, region->height)); BCI_SEND(BCI_W_H(region->width, region->height));
} }
EXPORT_SYMBOL(savagefb_copyarea);
void savagefb_fillrect(struct fb_info *info, const struct fb_fillrect *rect) void savagefb_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
{ {
...@@ -89,7 +87,6 @@ void savagefb_fillrect(struct fb_info *info, const struct fb_fillrect *rect) ...@@ -89,7 +87,6 @@ void savagefb_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
BCI_SEND( BCI_X_Y(rect->dx, rect->dy) ); BCI_SEND( BCI_X_Y(rect->dx, rect->dy) );
BCI_SEND( BCI_W_H(rect->width, rect->height) ); BCI_SEND( BCI_W_H(rect->width, rect->height) );
} }
EXPORT_SYMBOL(savagefb_fillrect);
void savagefb_imageblit(struct fb_info *info, const struct fb_image *image) void savagefb_imageblit(struct fb_info *info, const struct fb_image *image)
{ {
...@@ -135,6 +132,5 @@ void savagefb_imageblit(struct fb_info *info, const struct fb_image *image) ...@@ -135,6 +132,5 @@ void savagefb_imageblit(struct fb_info *info, const struct fb_image *image)
for (i = 0; i < size; i++) for (i = 0; i < size; i++)
BCI_SEND(src[i]); BCI_SEND(src[i]);
} }
EXPORT_SYMBOL(savagefb_imageblit);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
...@@ -1459,7 +1459,7 @@ static void savage_enable_mmio (struct savagefb_par *par) ...@@ -1459,7 +1459,7 @@ static void savage_enable_mmio (struct savagefb_par *par)
} }
void savage_disable_mmio (struct savagefb_par *par) static void savage_disable_mmio (struct savagefb_par *par)
{ {
unsigned char val; unsigned char val;
...@@ -1498,7 +1498,7 @@ static int __devinit savage_map_mmio (struct fb_info *info) ...@@ -1498,7 +1498,7 @@ static int __devinit savage_map_mmio (struct fb_info *info)
info->fix.mmio_start = par->mmio.pbase; info->fix.mmio_start = par->mmio.pbase;
info->fix.mmio_len = par->mmio.len; info->fix.mmio_len = par->mmio.len;
par->bci_base = (u32 __iomem *)(par->mmio.vbase + BCI_BUFFER_OFFSET); par->bci_base = (u32*)(par->mmio.vbase + BCI_BUFFER_OFFSET);
par->bci_ptr = 0; par->bci_ptr = 0;
savage_enable_mmio (par); savage_enable_mmio (par);
...@@ -1514,7 +1514,7 @@ static void __devinit savage_unmap_mmio (struct fb_info *info) ...@@ -1514,7 +1514,7 @@ static void __devinit savage_unmap_mmio (struct fb_info *info)
savage_disable_mmio(par); savage_disable_mmio(par);
if (par->mmio.vbase) { if (par->mmio.vbase) {
iounmap ((void __iomem *)par->mmio.vbase); iounmap ((void *)par->mmio.vbase);
par->mmio.vbase = NULL; par->mmio.vbase = NULL;
} }
} }
...@@ -1551,6 +1551,10 @@ static int __devinit savage_map_video (struct fb_info *info, ...@@ -1551,6 +1551,10 @@ static int __devinit savage_map_video (struct fb_info *info,
par->video.mtrr = mtrr_add (par->video.pbase, video_len, par->video.mtrr = mtrr_add (par->video.pbase, video_len,
MTRR_TYPE_WRCOMB, 1); MTRR_TYPE_WRCOMB, 1);
#endif #endif
/* Clear framebuffer, it's all white in memory after boot */
memset (par->video.vbase, 0, par->video.len);
return 0; return 0;
} }
...@@ -2243,7 +2247,7 @@ static void __exit savage_done (void) ...@@ -2243,7 +2247,7 @@ static void __exit savage_done (void)
/* ************************* init in-kernel code ************************** */ /* ************************* init in-kernel code ************************** */
int __init savagefb_setup(char *options) static int __init savagefb_setup(char *options)
{ {
#ifndef MODULE #ifndef MODULE
char *this_opt; char *this_opt;
...@@ -2258,7 +2262,7 @@ int __init savagefb_setup(char *options) ...@@ -2258,7 +2262,7 @@ int __init savagefb_setup(char *options)
return 0; return 0;
} }
int __init savagefb_init(void) static int __init savagefb_init(void)
{ {
char *option; char *option;
......
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