mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 00:04:15 +08:00
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>
This commit is contained in:
parent
6fe864409b
commit
67c4e9f46b
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user