All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org,
	devel@driverdev.osuosl.org,
	Dan Carpenter <dan.carpenter@oracle.com>,
	Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Subject: [PATCH 5/5] staging: sm7xxfb: usr fb_read and fb_write
Date: Tue,  7 Jul 2015 13:44:37 +0530	[thread overview]
Message-ID: <1436256877-10754-6-git-send-email-sudipm.mukherjee@gmail.com> (raw)
In-Reply-To: <1436256877-10754-1-git-send-email-sudipm.mukherjee@gmail.com>

Now since the Big-Endian and Little-Endian based calculations are moved
into a macro we can make fb_read() and fb_write() common for both
Little-Endian and Big-Endian.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
 drivers/staging/sm7xxfb/sm7xxfb.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/staging/sm7xxfb/sm7xxfb.c b/drivers/staging/sm7xxfb/sm7xxfb.c
index 252f110a..b8a1e86 100644
--- a/drivers/staging/sm7xxfb/sm7xxfb.c
+++ b/drivers/staging/sm7xxfb/sm7xxfb.c
@@ -946,7 +946,6 @@ static int smtc_setcolreg(unsigned regno, unsigned red, unsigned green,
 	return 0;
 }
 
-#ifdef __BIG_ENDIAN
 static ssize_t smtcfb_read(struct fb_info *info, char __user *buf,
 			   size_t count, loff_t *ppos)
 {
@@ -1107,7 +1106,6 @@ static ssize_t smtcfb_write(struct fb_info *info, const char __user *buf,
 
 	return (cnt) ? cnt : err;
 }
-#endif	/* ! __BIG_ENDIAN */
 
 static void sm7xx_set_timing(struct smtcfb_info *sfb)
 {
@@ -1303,10 +1301,8 @@ static struct fb_ops smtcfb_ops = {
 	.fb_fillrect  = cfb_fillrect,
 	.fb_imageblit = cfb_imageblit,
 	.fb_copyarea  = cfb_copyarea,
-#ifdef __BIG_ENDIAN
 	.fb_read      = smtcfb_read,
 	.fb_write     = smtcfb_write,
-#endif
 };
 
 /*
-- 
1.8.1.2


WARNING: multiple messages have this Message-ID (diff)
From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org,
	devel@driverdev.osuosl.org,
	Dan Carpenter <dan.carpenter@oracle.com>,
	Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Subject: [PATCH 5/5] staging: sm7xxfb: usr fb_read and fb_write
Date: Tue, 07 Jul 2015 08:26:37 +0000	[thread overview]
Message-ID: <1436256877-10754-6-git-send-email-sudipm.mukherjee@gmail.com> (raw)
In-Reply-To: <1436256877-10754-1-git-send-email-sudipm.mukherjee@gmail.com>

Now since the Big-Endian and Little-Endian based calculations are moved
into a macro we can make fb_read() and fb_write() common for both
Little-Endian and Big-Endian.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
 drivers/staging/sm7xxfb/sm7xxfb.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/staging/sm7xxfb/sm7xxfb.c b/drivers/staging/sm7xxfb/sm7xxfb.c
index 252f110a..b8a1e86 100644
--- a/drivers/staging/sm7xxfb/sm7xxfb.c
+++ b/drivers/staging/sm7xxfb/sm7xxfb.c
@@ -946,7 +946,6 @@ static int smtc_setcolreg(unsigned regno, unsigned red, unsigned green,
 	return 0;
 }
 
-#ifdef __BIG_ENDIAN
 static ssize_t smtcfb_read(struct fb_info *info, char __user *buf,
 			   size_t count, loff_t *ppos)
 {
@@ -1107,7 +1106,6 @@ static ssize_t smtcfb_write(struct fb_info *info, const char __user *buf,
 
 	return (cnt) ? cnt : err;
 }
-#endif	/* ! __BIG_ENDIAN */
 
 static void sm7xx_set_timing(struct smtcfb_info *sfb)
 {
@@ -1303,10 +1301,8 @@ static struct fb_ops smtcfb_ops = {
 	.fb_fillrect  = cfb_fillrect,
 	.fb_imageblit = cfb_imageblit,
 	.fb_copyarea  = cfb_copyarea,
-#ifdef __BIG_ENDIAN
 	.fb_read      = smtcfb_read,
 	.fb_write     = smtcfb_write,
-#endif
 };
 
 /*
-- 
1.8.1.2


  parent reply	other threads:[~2015-07-07  8:15 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-07  8:14 [PATCH 0/5] staging: sm7xxfb: few changes Sudip Mukherjee
2015-07-07  8:26 ` Sudip Mukherjee
2015-07-07  8:14 ` [PATCH 1/5] staging: sm7xxfb: remove unused macros Sudip Mukherjee
2015-07-07  8:26   ` Sudip Mukherjee
2015-07-07  8:14 ` [PATCH 2/5] staging: sm7xxfb: fix error handling Sudip Mukherjee
2015-07-07  8:26   ` Sudip Mukherjee
2015-07-07  8:14 ` [PATCH 3/5] staging: sm7xxfb: use kernel commandline Sudip Mukherjee
2015-07-07  8:26   ` Sudip Mukherjee
2015-07-15  3:06   ` Greg Kroah-Hartman
2015-07-15  3:06     ` Greg Kroah-Hartman
2015-07-07  8:14 ` [PATCH 4/5] staging: sm7xxfb: define new macros Sudip Mukherjee
2015-07-07  8:26   ` Sudip Mukherjee
2015-07-15  3:05   ` Greg Kroah-Hartman
2015-07-15  3:05     ` Greg Kroah-Hartman
2015-07-15  4:46     ` Sudip Mukherjee
2015-07-15  4:58       ` Sudip Mukherjee
2015-07-07  8:14 ` Sudip Mukherjee [this message]
2015-07-07  8:26   ` [PATCH 5/5] staging: sm7xxfb: usr fb_read and fb_write Sudip Mukherjee

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=1436256877-10754-6-git-send-email-sudipm.mukherjee@gmail.com \
    --to=sudipm.mukherjee@gmail.com \
    --cc=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.