Commit 88c144b1 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'fbdev-fixes-for-3.5-1' of git://github.com/schandinat/linux-2.6

Pull fbdev fixes from Florian Tobias Schandinat:

 - two fixes for s3c-fb by Jingoo Han (including a fix for a potential
   division by zero)

 - a couple of randconfig fixes by Arnd Bergmann

 - a cleanup for bfin_adv7393fb by Emil Goode

* tag 'fbdev-fixes-for-3.5-1' of git://github.com/schandinat/linux-2.6:
  video: s3c-fb: fix possible division by zero in s3c_fb_calc_pixclk
  video: s3c-fb: clear SHADOWCON register when clearing hardware window registers
  drivers/tosa: driver needs I2C and SPI to compile
  drivers/savagefb: use mdelay instead of udelay
  video/console: automatically select a font
  video/ili9320: do not mark exported functions __devexit
  drivers/video: use correct __devexit_p annotation
  video: bfin_adv7393fb: Convert to kstrtouint_from_user
parents 9b15b817 b6798951
...@@ -88,7 +88,7 @@ config LCD_PLATFORM ...@@ -88,7 +88,7 @@ config LCD_PLATFORM
config LCD_TOSA config LCD_TOSA
tristate "Sharp SL-6000 LCD Driver" tristate "Sharp SL-6000 LCD Driver"
depends on SPI && MACH_TOSA depends on I2C && SPI && MACH_TOSA
help help
If you have an Sharp SL-6000 Zaurus say Y to enable a driver If you have an Sharp SL-6000 Zaurus say Y to enable a driver
for its LCD. for its LCD.
......
...@@ -263,7 +263,7 @@ int __devinit ili9320_probe_spi(struct spi_device *spi, ...@@ -263,7 +263,7 @@ int __devinit ili9320_probe_spi(struct spi_device *spi,
EXPORT_SYMBOL_GPL(ili9320_probe_spi); EXPORT_SYMBOL_GPL(ili9320_probe_spi);
int __devexit ili9320_remove(struct ili9320 *ili) int ili9320_remove(struct ili9320 *ili)
{ {
ili9320_power(ili, FB_BLANK_POWERDOWN); ili9320_power(ili, FB_BLANK_POWERDOWN);
......
...@@ -353,18 +353,16 @@ adv7393_read_proc(char *page, char **start, off_t off, ...@@ -353,18 +353,16 @@ adv7393_read_proc(char *page, char **start, off_t off,
static int static int
adv7393_write_proc(struct file *file, const char __user * buffer, adv7393_write_proc(struct file *file, const char __user * buffer,
unsigned long count, void *data) size_t count, void *data)
{ {
struct adv7393fb_device *fbdev = data; struct adv7393fb_device *fbdev = data;
char line[8];
unsigned int val; unsigned int val;
int ret; int ret;
ret = copy_from_user(line, buffer, count); ret = kstrtouint_from_user(buffer, count, 0, &val);
if (ret) if (ret)
return -EFAULT; return -EFAULT;
val = simple_strtoul(line, NULL, 0);
adv7393_write(fbdev->client, val >> 8, val & 0xff); adv7393_write(fbdev->client, val >> 8, val & 0xff);
return count; return count;
......
...@@ -1211,7 +1211,7 @@ static int __devexit broadsheetfb_remove(struct platform_device *dev) ...@@ -1211,7 +1211,7 @@ static int __devexit broadsheetfb_remove(struct platform_device *dev)
static struct platform_driver broadsheetfb_driver = { static struct platform_driver broadsheetfb_driver = {
.probe = broadsheetfb_probe, .probe = broadsheetfb_probe,
.remove = broadsheetfb_remove, .remove = __devexit_p(broadsheetfb_remove),
.driver = { .driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "broadsheetfb", .name = "broadsheetfb",
......
...@@ -224,5 +224,19 @@ config FONT_10x18 ...@@ -224,5 +224,19 @@ config FONT_10x18
big letters. It fits between the sun 12x22 and the normal 8x16 font. big letters. It fits between the sun 12x22 and the normal 8x16 font.
If other fonts are too big or too small for you, say Y, otherwise say N. If other fonts are too big or too small for you, say Y, otherwise say N.
config FONT_AUTOSELECT
def_bool y
depends on FRAMEBUFFER_CONSOLE || SGI_NEWPORT_CONSOLE || STI_CONSOLE || USB_SISUSBVGA_CON
depends on !FONT_8x8
depends on !FONT_6x11
depends on !FONT_7x14
depends on !FONT_PEARL_8x8
depends on !FONT_ACORN_8x8
depends on !FONT_MINI_4x6
depends on !FONT_SUN8x16
depends on !FONT_SUN12x22
depends on !FONT_10x18
select FONT_8x16
endmenu endmenu
...@@ -1045,7 +1045,7 @@ static int __devexit mbxfb_remove(struct platform_device *dev) ...@@ -1045,7 +1045,7 @@ static int __devexit mbxfb_remove(struct platform_device *dev)
static struct platform_driver mbxfb_driver = { static struct platform_driver mbxfb_driver = {
.probe = mbxfb_probe, .probe = mbxfb_probe,
.remove = mbxfb_remove, .remove = __devexit_p(mbxfb_remove),
.suspend = mbxfb_suspend, .suspend = mbxfb_suspend,
.resume = mbxfb_resume, .resume = mbxfb_resume,
.driver = { .driver = {
......
...@@ -361,7 +361,7 @@ static int s3c_fb_calc_pixclk(struct s3c_fb *sfb, unsigned int pixclk) ...@@ -361,7 +361,7 @@ static int s3c_fb_calc_pixclk(struct s3c_fb *sfb, unsigned int pixclk)
result = (unsigned int)tmp / 1000; result = (unsigned int)tmp / 1000;
dev_dbg(sfb->dev, "pixclk=%u, clk=%lu, div=%d (%lu)\n", dev_dbg(sfb->dev, "pixclk=%u, clk=%lu, div=%d (%lu)\n",
pixclk, clk, result, clk / result); pixclk, clk, result, result ? clk / result : clk);
return result; return result;
} }
...@@ -1348,8 +1348,14 @@ static void s3c_fb_clear_win(struct s3c_fb *sfb, int win) ...@@ -1348,8 +1348,14 @@ static void s3c_fb_clear_win(struct s3c_fb *sfb, int win)
writel(0, regs + VIDOSD_A(win, sfb->variant)); writel(0, regs + VIDOSD_A(win, sfb->variant));
writel(0, regs + VIDOSD_B(win, sfb->variant)); writel(0, regs + VIDOSD_B(win, sfb->variant));
writel(0, regs + VIDOSD_C(win, sfb->variant)); writel(0, regs + VIDOSD_C(win, sfb->variant));
reg = readl(regs + SHADOWCON);
writel(reg & ~SHADOWCON_WINx_PROTECT(win), regs + SHADOWCON); if (sfb->variant.has_shadowcon) {
reg = readl(sfb->regs + SHADOWCON);
reg &= ~(SHADOWCON_WINx_PROTECT(win) |
SHADOWCON_CHx_ENABLE(win) |
SHADOWCON_CHx_LOCAL_ENABLE(win));
writel(reg, sfb->regs + SHADOWCON);
}
} }
static int __devinit s3c_fb_probe(struct platform_device *pdev) static int __devinit s3c_fb_probe(struct platform_device *pdev)
......
...@@ -1351,7 +1351,7 @@ static void savagefb_set_par_int(struct savagefb_par *par, struct savage_reg *r ...@@ -1351,7 +1351,7 @@ static void savagefb_set_par_int(struct savagefb_par *par, struct savage_reg *r
/* following part not present in X11 driver */ /* following part not present in X11 driver */
cr67 = vga_in8(0x3d5, par) & 0xf; cr67 = vga_in8(0x3d5, par) & 0xf;
vga_out8(0x3d5, 0x50 | cr67, par); vga_out8(0x3d5, 0x50 | cr67, par);
udelay(10000); mdelay(10);
vga_out8(0x3d4, 0x67, par); vga_out8(0x3d4, 0x67, par);
/* end of part */ /* end of part */
vga_out8(0x3d5, reg->CR67 & ~0x0c, par); vga_out8(0x3d5, reg->CR67 & ~0x0c, par);
...@@ -1904,11 +1904,11 @@ static int savage_init_hw(struct savagefb_par *par) ...@@ -1904,11 +1904,11 @@ static int savage_init_hw(struct savagefb_par *par)
vga_out8(0x3d4, 0x66, par); vga_out8(0x3d4, 0x66, par);
cr66 = vga_in8(0x3d5, par); cr66 = vga_in8(0x3d5, par);
vga_out8(0x3d5, cr66 | 0x02, par); vga_out8(0x3d5, cr66 | 0x02, par);
udelay(10000); mdelay(10);
vga_out8(0x3d4, 0x66, par); vga_out8(0x3d4, 0x66, par);
vga_out8(0x3d5, cr66 & ~0x02, par); /* clear reset flag */ vga_out8(0x3d5, cr66 & ~0x02, par); /* clear reset flag */
udelay(10000); mdelay(10);
/* /*
...@@ -1918,11 +1918,11 @@ static int savage_init_hw(struct savagefb_par *par) ...@@ -1918,11 +1918,11 @@ static int savage_init_hw(struct savagefb_par *par)
vga_out8(0x3d4, 0x3f, par); vga_out8(0x3d4, 0x3f, par);
cr3f = vga_in8(0x3d5, par); cr3f = vga_in8(0x3d5, par);
vga_out8(0x3d5, cr3f | 0x08, par); vga_out8(0x3d5, cr3f | 0x08, par);
udelay(10000); mdelay(10);
vga_out8(0x3d4, 0x3f, par); vga_out8(0x3d4, 0x3f, par);
vga_out8(0x3d5, cr3f & ~0x08, par); /* clear reset flags */ vga_out8(0x3d5, cr3f & ~0x08, par); /* clear reset flags */
udelay(10000); mdelay(10);
/* Savage ramdac speeds */ /* Savage ramdac speeds */
par->numClocks = 4; par->numClocks = 4;
......
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