From patchwork Wed Feb 13 10:40:24 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 2135101 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id A8A9B3FCF6 for ; Wed, 13 Feb 2013 10:40:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753975Ab3BMKke (ORCPT ); Wed, 13 Feb 2013 05:40:34 -0500 Received: from mail.free-electrons.com ([94.23.35.102]:49789 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753941Ab3BMKkd (ORCPT ); Wed, 13 Feb 2013 05:40:33 -0500 Received: by mail.free-electrons.com (Postfix, from userid 106) id 0E85181C; Wed, 13 Feb 2013 11:40:33 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.3.2 Received: from localhost (col31-4-88-188-83-94.fbx.proxad.net [88.188.83.94]) by mail.free-electrons.com (Postfix) with ESMTPSA id 65A697B6; Wed, 13 Feb 2013 11:40:32 +0100 (CET) From: Maxime Ripard To: linux-fbdev@vger.kernel.org Cc: joe@perches.com, Andrew Morton , Richard Purdie , Florian Tobias Schandinat , linux-kernel@vger.kernel.org Subject: [PATCH 1/5] fb: hx8357: Change parameters of the write function to u8 Date: Wed, 13 Feb 2013 11:40:24 +0100 Message-Id: <1360752028-7301-2-git-send-email-maxime.ripard@free-electrons.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1360752028-7301-1-git-send-email-maxime.ripard@free-electrons.com> References: <1360752028-7301-1-git-send-email-maxime.ripard@free-electrons.com> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org Moving from void* to u8* removes the need for castslater on in the function. Signed-off-by: Maxime Ripard --- 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; }