From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: MIME-Version: 1.0 Received: from mail-wi0-x22d.google.com (mail-wi0-x22d.google.com. [2a00:1450:400c:c05::22d]) by gmr-mx.google.com with ESMTPS id et8si242718wib.2.2015.09.18.08.25.44 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Sep 2015 08:25:44 -0700 (PDT) Received: by mail-wi0-x22d.google.com with SMTP id fx3so68964623wic.1 for ; Fri, 18 Sep 2015 08:25:44 -0700 (PDT) From: Ivan Grimaldi To: a.zummo@towertech.it, mpfj@mimc.co.uk, alexandre.belloni@free-electrons.com Cc: rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org Subject: [rtc-linux] [PATCH v3 1/2] Fixed ds1390_get_reg returned value Date: Fri, 18 Sep 2015 17:22:38 +0200 Message-Id: <1442589759-29538-1-git-send-email-grimaldi.ivan@gmail.com> Reply-To: rtc-linux@googlegroups.com Content-Type: text/plain; charset=UTF-8 List-ID: List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , spi_write_then_read puts in rx_buf the received data starting from the first byte of the rx_buf Signed-off-by: Ivan Grimaldi --- drivers/rtc/rtc-ds1390.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-ds1390.c b/drivers/rtc/rtc-ds1390.c index e67bfcb..a4303b4 100644 --- a/drivers/rtc/rtc-ds1390.c +++ b/drivers/rtc/rtc-ds1390.c @@ -62,7 +62,7 @@ static int ds1390_get_reg(struct device *dev, unsigned char address, if (status != 0) return status; - *data = chip->txrx_buf[1]; + *data = chip->txrx_buf[0]; return 0; } -- 2.5.2 -- -- You received this message because you are subscribed to "rtc-linux". Membership options at http://groups.google.com/group/rtc-linux . Please read http://groups.google.com/group/rtc-linux/web/checklist before submitting a driver. --- You received this message because you are subscribed to the Google Groups "rtc-linux" group. To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/d/optout. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754014AbbIRPZr (ORCPT ); Fri, 18 Sep 2015 11:25:47 -0400 Received: from mail-wi0-f180.google.com ([209.85.212.180]:32854 "EHLO mail-wi0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751653AbbIRPZp (ORCPT ); Fri, 18 Sep 2015 11:25:45 -0400 From: Ivan Grimaldi To: a.zummo@towertech.it, mpfj@mimc.co.uk, alexandre.belloni@free-electrons.com Cc: rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org Subject: [PATCH v3 1/2] Fixed ds1390_get_reg returned value Date: Fri, 18 Sep 2015 17:22:38 +0200 Message-Id: <1442589759-29538-1-git-send-email-grimaldi.ivan@gmail.com> X-Mailer: git-send-email 2.5.2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org spi_write_then_read puts in rx_buf the received data starting from the first byte of the rx_buf Signed-off-by: Ivan Grimaldi --- drivers/rtc/rtc-ds1390.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-ds1390.c b/drivers/rtc/rtc-ds1390.c index e67bfcb..a4303b4 100644 --- a/drivers/rtc/rtc-ds1390.c +++ b/drivers/rtc/rtc-ds1390.c @@ -62,7 +62,7 @@ static int ds1390_get_reg(struct device *dev, unsigned char address, if (status != 0) return status; - *data = chip->txrx_buf[1]; + *data = chip->txrx_buf[0]; return 0; } -- 2.5.2