]> git.baikalelectronics.ru Git - kernel.git/commit
rtc: max77686: Fix unsupported year message
authorJavier Martinez Canillas <javier@osg.samsung.com>
Wed, 27 Jan 2016 03:36:43 +0000 (00:36 -0300)
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>
Thu, 4 Feb 2016 22:42:09 +0000 (23:42 +0100)
commitec475c6c13153bfb9e968126f9deb84691a308ff
treee02017700d402810bd00f2c0a2e158498c2ab648
parent46ddfe4e16bfbe0b67eb5f8442e1ee78520fb973
rtc: max77686: Fix unsupported year message

The max77686 RTC only supports a range of 99 years so instead of using
year 1900 as the base, the year 2000 is used. This means that 1900 to
1999 are unsupported years.

The driver was printing a warning for those values but was returning a
error so for consistency, print an error message instead and don't say
that a year 2000 is assumed, since the year is not set.

Also, it is better to use dev_* log functions instead of pr_* to print
information about the device in the kernel log in a standardized way.

This also allows to remove the local pr_fmt() defined macro.

Suggested-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by: Andi Shyti <andi.shyti@samsung.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
drivers/rtc/rtc-max77686.c