lkml.org 
[lkml]   [2016]   [Dec]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2016-12-05 16:28    [W:0.580 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site