]> Pileus Git - ~andy/linux/commitdiff
staging: sm7xxfb: dead code removal
authorJavier M. Mellid <jmunhoz@igalia.com>
Tue, 26 Jun 2012 04:00:15 +0000 (06:00 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Jun 2012 22:03:54 +0000 (15:03 -0700)
This patch removes dead code related to BaseAddressInVRAM. It fixes
comment on RAM control bits too.

Tested with SM712.

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/sm7xxfb/sm7xxfb.c

index 4c741e2afd126431dacceb34df7db717e2b7407a..78da7790330550018025f75e6552f84877c93839 100644 (file)
@@ -53,7 +53,7 @@ struct smtcfb_info {
        u_int width;
        u_int height;
        u_int hz;
-       u_long BaseAddressInVRAM;
+
        u8 chipRevID;
 };
 
@@ -220,17 +220,9 @@ static void sm712_set_timing(struct smtcfb_info *sfb)
 static void sm712_setpalette(int regno, unsigned red, unsigned green,
                             unsigned blue, struct fb_info *info)
 {
-       struct smtcfb_info *sfb = info->par;
+       /* set bit 5:4 = 01 (write LCD RAM only) */
+       smtc_seqw(0x66, (smtc_seqr(0x66) & 0xC3) | 0x10);
 
-       if (sfb->BaseAddressInVRAM)
-               /*
-                * second display palette for dual head. Enable CRT RAM, 6-bit
-                * RAM
-                */
-               smtc_seqw(0x66, (smtc_seqr(0x66) & 0xC3) | 0x20);
-       else
-               /* primary display palette. Enable LCD RAM only, 6-bit RAM */
-               smtc_seqw(0x66, (smtc_seqr(0x66) & 0xC3) | 0x10);
        smtc_mmiowb(regno, dac_reg);
        smtc_mmiowb(red >> 10, dac_val);
        smtc_mmiowb(green >> 10, dac_val);
@@ -932,8 +924,6 @@ static int __devinit smtcfb_pci_probe(struct pci_dev *pdev,
                goto failed;
 
        smtcfb_setmode(sfb);
-       /* Primary display starting from 0 position */
-       sfb->BaseAddressInVRAM = 0;
 
        err = register_framebuffer(&sfb->fb);
        if (err < 0)