[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161205152752.btnbja25daxn2dha@piout.net>
Date: Mon, 5 Dec 2016 16:27:52 +0100
From: Alexandre Belloni <alexandre.belloni@...e-electrons.com>
To: Emil Bartczak <emilbart@...il.com>
Cc: a.zummo@...ertech.it, rtc-linux@...glegroups.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/4] rtc: mcp795: use bcd2bin/bin2bcd.
On 05/12/2016 at 14:11:53 +0100, Emil Bartczak wrote :
> Change rtc-mcp795.c to use the bcd2bin/bin2bcd functions.
> ---
> drivers/rtc/rtc-mcp795.c | 28 +++++++++++++---------------
> 1 file changed, 13 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/rtc/rtc-mcp795.c b/drivers/rtc/rtc-mcp795.c
> index c9ad46c..1d823f9 100644
> --- a/drivers/rtc/rtc-mcp795.c
> +++ b/drivers/rtc/rtc-mcp795.c
> @@ -22,6 +22,7 @@
> #include <linux/rtc.h>
> #include <linux/of.h>
> #include <linux/delay.h>
> +#include <linux/bcd.h>
>
> /* MCP795 Instructions, see datasheet table 3-1 */
> #define MCP795_EEREAD 0x03
> @@ -137,7 +138,6 @@ static int mcp795_start_oscillator(struct device *dev)
>
> static int mcp795_set_time(struct device *dev, struct rtc_time *tim)
> {
> - int month;
You just introduced this variable to fix a bug. Maybe it was not necessary?
--
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
Powered by blists - more mailing lists