Skip to content

Commit

Permalink
[PATCH] s3c2410fb: cleanup and fix
Browse files Browse the repository at this point in the history
Here are some cleanups for the s3c2410fb drivers. It :
* Removes a buggy call to s3c2410fb_init_registers. There was two calls
  to this function but the first was done without all initialisations
  done. No oops but it may confuse some LCDs.
* Makes two functions static.

Signed-Off-By: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-Off-By: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Arnaud Patard authored and Linus Torvalds committed Jan 10, 2006
1 parent 918799a commit 740f14b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions drivers/video/s3c2410fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ static inline void modify_gpio(void __iomem *reg,
* s3c2410fb_init_registers - Initialise all LCD-related registers
*/

int s3c2410fb_init_registers(struct s3c2410fb_info *fbi)
static int s3c2410fb_init_registers(struct s3c2410fb_info *fbi)
{
unsigned long flags;

Expand Down Expand Up @@ -634,7 +634,7 @@ static irqreturn_t s3c2410fb_irq(int irq, void *dev_id, struct pt_regs *r)

static char driver_name[]="s3c2410fb";

int __init s3c2410fb_probe(struct platform_device *pdev)
static int __init s3c2410fb_probe(struct platform_device *pdev)
{
struct s3c2410fb_info *info;
struct fb_info *fbinfo;
Expand Down Expand Up @@ -667,8 +667,6 @@ int __init s3c2410fb_probe(struct platform_device *pdev)
info->fb = fbinfo;
platform_set_drvdata(pdev, fbinfo);

s3c2410fb_init_registers(info);

dprintk("devinit\n");

strcpy(fbinfo->fix.id, driver_name);
Expand Down Expand Up @@ -701,8 +699,8 @@ int __init s3c2410fb_probe(struct platform_device *pdev)
fbinfo->var.yres_virtual = mach_info->yres.defval;
fbinfo->var.bits_per_pixel = mach_info->bpp.defval;

fbinfo->var.upper_margin = S3C2410_LCDCON2_GET_VBPD(mregs->lcdcon2) +1;
fbinfo->var.lower_margin = S3C2410_LCDCON2_GET_VFPD(mregs->lcdcon2) +1;
fbinfo->var.upper_margin = S3C2410_LCDCON2_GET_VBPD(mregs->lcdcon2) + 1;
fbinfo->var.lower_margin = S3C2410_LCDCON2_GET_VFPD(mregs->lcdcon2) + 1;
fbinfo->var.vsync_len = S3C2410_LCDCON2_GET_VSPW(mregs->lcdcon2) + 1;

fbinfo->var.left_margin = S3C2410_LCDCON3_GET_HFPD(mregs->lcdcon3) + 1;
Expand Down

0 comments on commit 740f14b

Please sign in to comment.