diff options
author | Javier M. Mellid <jmunhoz@igalia.com> | 2012-06-10 13:12:22 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-06-12 10:55:54 -0700 |
commit | 67c4e9f46b5241ff777ced09e29048363de8703f (patch) | |
tree | 80f5be6e97315912bd67ff6e0b4b2dd27ef0617b | |
parent | 6fe864409b54f60ed36804752acfd148da459e53 (diff) | |
download | linux-stable-67c4e9f46b5241ff777ced09e29048363de8703f.tar.gz linux-stable-67c4e9f46b5241ff777ced09e29048363de8703f.tar.bz2 linux-stable-67c4e9f46b5241ff777ced09e29048363de8703f.zip |
staging: sm7xx: code improvement
This patch simplifies code. It erases redundant code under little endian
compilations.
Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/sm7xx/smtcfb.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/staging/sm7xx/smtcfb.c b/drivers/staging/sm7xx/smtcfb.c index 746c4cd5d30e..2c172d6cd65f 100644 --- a/drivers/staging/sm7xx/smtcfb.c +++ b/drivers/staging/sm7xx/smtcfb.c @@ -724,16 +724,13 @@ static void smtc_unmap_mmio(struct smtcfb_info *sfb) static int smtc_map_smem(struct smtcfb_info *sfb, struct pci_dev *pdev, u_long smem_len) { - if (sfb->fb.var.bits_per_pixel == 32) { + + sfb->fb.fix.smem_start = pci_resource_start(pdev, 0); + #ifdef __BIG_ENDIAN - sfb->fb.fix.smem_start = pci_resource_start(pdev, 0) - + 0x800000; -#else - sfb->fb.fix.smem_start = pci_resource_start(pdev, 0); + if (sfb->fb.var.bits_per_pixel == 32) + sfb->fb.fix.smem_start += 0x800000; #endif - } else { - sfb->fb.fix.smem_start = pci_resource_start(pdev, 0); - } sfb->fb.fix.smem_len = smem_len; |