projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android
[firefly-linux-kernel-4.4.55.git]
/
drivers
/
rtc
/
rtc-da9063.c
diff --git
a/drivers/rtc/rtc-da9063.c
b/drivers/rtc/rtc-da9063.c
index 00a8f7f4f87cbc58426f11bb8cf83dfcf38ab90e..d6c853bbfa9fcbe0fee8968dda872041c6c8545a 100644
(file)
--- a/
drivers/rtc/rtc-da9063.c
+++ b/
drivers/rtc/rtc-da9063.c
@@
-1,15
+1,15
@@
/* rtc-da9063.c - Real time clock device driver for DA9063
/* rtc-da9063.c - Real time clock device driver for DA9063
- * Copyright (C) 2013-
14
Dialog Semiconductor Ltd.
+ * Copyright (C) 2013-
2015
Dialog Semiconductor Ltd.
*
*
- * This
library
is free software; you can redistribute it and/or
- * modify it under the terms of the GNU
Library General Public
- *
License as published by the Free Software Foundation; either
- *
version 2
of the License, or (at your option) any later version.
+ * This
program
is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU
General Public License
+ *
as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
*
- * This
library
is distributed in the hope that it will be useful,
+ * This
program
is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU
- *
Library
General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ *
GNU
General Public License for more details.
*/
#include <linux/delay.h>
*/
#include <linux/delay.h>
@@
-483,24
+483,23
@@
static int da9063_rtc_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, rtc);
platform_set_drvdata(pdev, rtc);
+ rtc->rtc_dev = devm_rtc_device_register(&pdev->dev, DA9063_DRVNAME_RTC,
+ &da9063_rtc_ops, THIS_MODULE);
+ if (IS_ERR(rtc->rtc_dev))
+ return PTR_ERR(rtc->rtc_dev);
+
+ da9063_data_to_tm(data, &rtc->alarm_time, rtc);
+ rtc->rtc_sync = false;
+
irq_alarm = platform_get_irq_byname(pdev, "ALARM");
ret = devm_request_threaded_irq(&pdev->dev, irq_alarm, NULL,
da9063_alarm_event,
IRQF_TRIGGER_LOW | IRQF_ONESHOT,
"ALARM", rtc);
irq_alarm = platform_get_irq_byname(pdev, "ALARM");
ret = devm_request_threaded_irq(&pdev->dev, irq_alarm, NULL,
da9063_alarm_event,
IRQF_TRIGGER_LOW | IRQF_ONESHOT,
"ALARM", rtc);
- if (ret)
{
+ if (ret)
dev_err(&pdev->dev, "Failed to request ALARM IRQ %d: %d\n",
irq_alarm, ret);
dev_err(&pdev->dev, "Failed to request ALARM IRQ %d: %d\n",
irq_alarm, ret);
- return ret;
- }
-
- rtc->rtc_dev = devm_rtc_device_register(&pdev->dev, DA9063_DRVNAME_RTC,
- &da9063_rtc_ops, THIS_MODULE);
- if (IS_ERR(rtc->rtc_dev))
- return PTR_ERR(rtc->rtc_dev);
- da9063_data_to_tm(data, &rtc->alarm_time, rtc);
- rtc->rtc_sync = false;
return ret;
}
return ret;
}
@@
-516,5
+515,5
@@
module_platform_driver(da9063_rtc_driver);
MODULE_AUTHOR("S Twiss <stwiss.opensource@diasemi.com>");
MODULE_DESCRIPTION("Real time clock device driver for Dialog DA9063");
MODULE_AUTHOR("S Twiss <stwiss.opensource@diasemi.com>");
MODULE_DESCRIPTION("Real time clock device driver for Dialog DA9063");
-MODULE_LICENSE("GPL
v2
");
+MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:" DA9063_DRVNAME_RTC);
MODULE_ALIAS("platform:" DA9063_DRVNAME_RTC);