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
will be called savagefb.
config FB_SAVAGE_I2C
tristate "Enable DDC2 Support"
bool "Enable DDC2 Support"
depends on FB_SAVAGE
help
This enables I2C support for S3 Savage Chipsets. This is used
......@@ -1036,7 +1036,7 @@ config FB_SAVAGE_I2C
here.
config FB_SAVAGE_ACCEL
tristate "Enable Console Acceleration"
bool "Enable Console Acceleration"
depends on FB_SAVAGE
default n
help
......
......@@ -2,7 +2,8 @@
# Makefile for the S3 Savage framebuffer driver
#
obj-$(CONFIG_FB_SAVAGE) += savagefb.o
obj-$(CONFIG_FB_SAVAGE_I2C) += savagefb-i2c.o
obj-$(CONFIG_FB_SAVAGE_ACCEL) += savagefb_accel.o
obj-$(CONFIG_FB_SAVAGE) += savagefb.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)
savage_setup_i2c_bus(&par->chan, "SAVAGE DDC2");
}
EXPORT_SYMBOL(savagefb_create_i2c_busses);
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;
}
EXPORT_SYMBOL(savagefb_delete_i2c_busses);
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)
return 0;
}
EXPORT_SYMBOL(savagefb_probe_i2c_connector);
MODULE_LICENSE("GPL");
......@@ -26,7 +26,6 @@ int savagefb_sync(struct fb_info *info)
par->SavageWaitIdle(par);
return 0;
}
EXPORT_SYMBOL(savagefb_sync);
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_W_H(region->width, region->height));
}
EXPORT_SYMBOL(savagefb_copyarea);
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_W_H(rect->width, rect->height) );
}
EXPORT_SYMBOL(savagefb_fillrect);
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++)
BCI_SEND(src[i]);
}
EXPORT_SYMBOL(savagefb_imageblit);
MODULE_LICENSE("GPL");
......@@ -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;
......@@ -1498,7 +1498,7 @@ static int __devinit savage_map_mmio (struct fb_info *info)
info->fix.mmio_start = par->mmio.pbase;
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;
savage_enable_mmio (par);
......@@ -1514,7 +1514,7 @@ static void __devinit savage_unmap_mmio (struct fb_info *info)
savage_disable_mmio(par);
if (par->mmio.vbase) {
iounmap ((void __iomem *)par->mmio.vbase);
iounmap ((void *)par->mmio.vbase);
par->mmio.vbase = NULL;
}
}
......@@ -1551,6 +1551,10 @@ static int __devinit savage_map_video (struct fb_info *info,
par->video.mtrr = mtrr_add (par->video.pbase, video_len,
MTRR_TYPE_WRCOMB, 1);
#endif
/* Clear framebuffer, it's all white in memory after boot */
memset (par->video.vbase, 0, par->video.len);
return 0;
}
......@@ -2243,7 +2247,7 @@ static void __exit savage_done (void)
/* ************************* init in-kernel code ************************** */
int __init savagefb_setup(char *options)
static int __init savagefb_setup(char *options)
{
#ifndef MODULE
char *this_opt;
......@@ -2258,7 +2262,7 @@ int __init savagefb_setup(char *options)
return 0;
}
int __init savagefb_init(void)
static int __init savagefb_init(void)
{
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