[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <46C2F8C9.6020806@8d.com>
Date: Wed, 15 Aug 2007 08:59:53 -0400
From: Raphaël Assénat <raph@...com>
To: Mike Rapoport <mike@...pulab.co.il>
CC: LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] RTC v3020 fixes
Mike Rapoport wrote:
> Fix off-by-one in month calculations
> Add delay for bus accesses to satisfy Tw > 500ns
>
*snip*
> @@ -135,7 +140,7 @@ static int v3020_set_time(struct device *dev, struct
> rtc_time *dt)
> v3020_set_reg(chip, V3020_MINUTES, BIN2BCD(dt->tm_min));
> v3020_set_reg(chip, V3020_HOURS, BIN2BCD(dt->tm_hour));
> v3020_set_reg(chip, V3020_MONTH_DAY, BIN2BCD(dt->tm_mday));
> - v3020_set_reg(chip, V3020_MONTH, BIN2BCD(dt->tm_mon));
> + v3020_set_reg(chip, V3020_MONTH, BIN2BCD(dt->tm_mon) + 1);
This should be BIN2BCD(dt->tm_mon + 1)) instead. Otherwise, in october (month
9), the final value will be 0xa instead of 0x10.
Other than that, the patch looks fine to me. You can add
Acked-by: Raphael Assenat <raph@...com> to the updated patch.
Please add Alessandro Zummo <a.zummo@...ertech.it> in the CC list to make sure
he sees it.
Best regards,
Raphaël Assénat
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists