net/mlx5e: Remove double defined DMAC header re-write element
[sfrench/cifs-2.6.git] / drivers / rtc / rtc-ds1302.c
index 0ec4be62322bfaf7695eb99aa6efd428264a3771..2a881150d51c282802fc168b992448f37b0af66e 100644 (file)
@@ -43,7 +43,7 @@ static int ds1302_rtc_set_time(struct device *dev, struct rtc_time *time)
 {
        struct spi_device       *spi = dev_get_drvdata(dev);
        u8              buf[1 + RTC_CLCK_LEN];
-       u8              *bp = buf;
+       u8              *bp;
        int             status;
 
        /* Enable writing */
@@ -98,8 +98,7 @@ static int ds1302_rtc_get_time(struct device *dev, struct rtc_time *time)
        time->tm_mon = bcd2bin(buf[RTC_ADDR_MON]) - 1;
        time->tm_year = bcd2bin(buf[RTC_ADDR_YEAR]) + 100;
 
-       /* Time may not be set */
-       return rtc_valid_tm(time);
+       return 0;
 }
 
 static const struct rtc_class_ops ds1302_rtc_ops = {
@@ -112,7 +111,7 @@ static int ds1302_probe(struct spi_device *spi)
        struct rtc_device       *rtc;
        u8              addr;
        u8              buf[4];
-       u8              *bp = buf;
+       u8              *bp;
        int             status;
 
        /* Sanity check board setup data.  This may be hooked up