From: "Javier M. Mellid" <jmunhoz@igalia.com>
To: gregkh@linuxfoundation.org, teddy.wang@siliconmotion.com.cn
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
"Javier M. Mellid" <jmunhoz@igalia.com>
Subject: [PATCH 1/3] staging: sm7xx: code improvement
Date: Sun, 10 Jun 2012 13:12:22 +0200 [thread overview]
Message-ID: <1339326744-17507-2-git-send-email-jmunhoz@igalia.com> (raw)
In-Reply-To: <1339326744-17507-1-git-send-email-jmunhoz@igalia.com>
From: "Javier M. Mellid" <jmunhoz@igalia.com>
This patch simplifies code. It erases redundant code under little endian
compilations.
Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
---
drivers/staging/sm7xx/smtcfb.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/sm7xx/smtcfb.c b/drivers/staging/sm7xx/smtcfb.c
index 746c4cd..2c172d6 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;
--
1.7.10
next prev parent reply other threads:[~2012-06-10 11:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-10 11:12 [PATCH 0/3] staging: sm7xx: code improvements and cleanup Javier M. Mellid
2012-06-10 11:12 ` Javier M. Mellid [this message]
2012-06-10 11:12 ` [PATCH 2/3] staging: sm7xx: update comments and clarify supported chips Javier M. Mellid
2012-06-10 11:12 ` [PATCH 3/3] staging: sm7xxfb: sm7xx becomes sm7xxfb Javier M. Mellid
2012-06-10 11:25 ` Javier Muñoz
2012-06-12 17:55 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1339326744-17507-2-git-send-email-jmunhoz@igalia.com \
--to=jmunhoz@igalia.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=teddy.wang@siliconmotion.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®