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