From: Laxman Dewangan Date: Thu, 7 Feb 2013 01:27:46 +0000 (+1100) Subject: rtc-add-rtc-driver-for-tps80031-tps80032-v2 X-Git-Tag: next-20130218~1^2~204 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=5b8451c463b24000a6423235dec7e95c0b741af0;p=karo-tx-linux.git rtc-add-rtc-driver-for-tps80031-tps80032-v2 Changes from V1: - remvoe the checks for alarm time whether this is past or not in set_alarm. - add error prints if rtc registration failed. - add include of pm.h Signed-off-by: Laxman Dewangan Cc: Devendra Naga Signed-off-by: Andrew Morton --- diff --git a/drivers/rtc/rtc-tps80031.c b/drivers/rtc/rtc-tps80031.c index 4a24249b6b66..89ab9d8ea3c3 100644 --- a/drivers/rtc/rtc-tps80031.c +++ b/drivers/rtc/rtc-tps80031.c @@ -4,7 +4,7 @@ * RTC driver for TI TPS80031/TPS80032 Fully Integrated * Power Management with Power Path and Battery Charger * - * Copyright (c) 2012-2013, NVIDIA Corporation. + * Copyright (c) 2012, NVIDIA Corporation. * * Author: Laxman Dewangan * @@ -233,7 +233,7 @@ static const struct rtc_class_ops tps80031_rtc_ops = { .alarm_irq_enable = tps80031_rtc_alarm_irq_enable, }; -static int tps80031_rtc_probe(struct platform_device *pdev) +static int __devinit tps80031_rtc_probe(struct platform_device *pdev) { struct tps80031_rtc *rtc; struct rtc_time tm; @@ -261,7 +261,7 @@ static int tps80031_rtc_probe(struct platform_device *pdev) (tm.tm_mday == TPS80031_RTC_POR_DAY)) { tm.tm_year = 2000; tm.tm_mday = 1; - tm.tm_mon = 0; + tm.tm_mon = 1; ret = tps80031_rtc_set_time(&pdev->dev, &tm); if (ret < 0) { dev_err(&pdev->dev, @@ -298,7 +298,7 @@ static int tps80031_rtc_probe(struct platform_device *pdev) return 0; } -static int tps80031_rtc_remove(struct platform_device *pdev) +static int __devexit tps80031_rtc_remove(struct platform_device *pdev) { struct tps80031_rtc *rtc = platform_get_drvdata(pdev);