Linux Framebuffer Layer development
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: linux-fbdev@vger.kernel.org
Cc: joe@perches.com, Andrew Morton <akpm@linux-foundation.org>,
	Richard Purdie <rpurdie@rpsys.net>,
	Florian Tobias Schandinat <FlorianSchandinat@gmx.de>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 1/5] fb: hx8357: Change parameters of the write function to u8
Date: Wed, 13 Feb 2013 10:40:24 +0000	[thread overview]
Message-ID: <1360752028-7301-2-git-send-email-maxime.ripard@free-electrons.com> (raw)
In-Reply-To: <1360752028-7301-1-git-send-email-maxime.ripard@free-electrons.com>

Moving from void* to u8* removes the need for castslater on in the
function.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
 drivers/video/backlight/hx8357.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/video/backlight/hx8357.c b/drivers/video/backlight/hx8357.c
index 00925c0..071525c 100644
--- a/drivers/video/backlight/hx8357.c
+++ b/drivers/video/backlight/hx8357.c
@@ -79,8 +79,8 @@ struct hx8357_data {
 };
 
 static int hx8357_spi_write_then_read(struct lcd_device *lcdev,
-				void *txbuf, u16 txlen,
-				void *rxbuf, u16 rxlen)
+				u8 *txbuf, u16 txlen,
+				u8 *rxbuf, u16 rxlen)
 {
 	struct hx8357_data *lcd = lcd_get_data(lcdev);
 	struct spi_message msg;
@@ -102,7 +102,7 @@ static int hx8357_spi_write_then_read(struct lcd_device *lcdev,
 		}
 
 		for (i = 0; i < txlen; i++) {
-			local_txbuf[i] = ((u8 *)txbuf)[i];
+			local_txbuf[i] = txbuf[i];
 			if (i > 0)
 				local_txbuf[i] |= 1 << 8;
 		}
-- 
1.7.10.4


  reply	other threads:[~2013-02-13 10:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-13 10:40 [PATCH 0/5] Cleanups and fixes for the Himax HX8357 Maxime Ripard
2013-02-13 10:40 ` Maxime Ripard [this message]
2013-02-13 10:40 ` [PATCH 2/5] fb: hx8357: Fix inverted parameters for kcalloc Maxime Ripard
2013-02-13 10:40 ` [PATCH 3/5] fb: hx8357: Remove useless error message Maxime Ripard
2013-02-13 10:40 ` [PATCH 4/5] fb: hx8357: Remove trailing period Maxime Ripard
2013-02-13 10:40 ` [PATCH 5/5] fb: hx8357: Use static arrays for LCD configuration Maxime Ripard

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=1360752028-7301-2-git-send-email-maxime.ripard@free-electrons.com \
    --to=maxime.ripard@free-electrons.com \
    --cc=FlorianSchandinat@gmx.de \
    --cc=akpm@linux-foundation.org \
    --cc=joe@perches.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rpurdie@rpsys.net \
    /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