The RTC subsystem proides ops locking, no need to implement our own
Signed-off-by: dann frazier <dannf@hp.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Grant Grundler <grundler@parisc-linux.org>
Cc: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
/* as simple as can be, and no simpler. */
struct parisc_rtc {
struct rtc_device *rtc;
/* as simple as can be, and no simpler. */
struct parisc_rtc {
struct rtc_device *rtc;
};
static int parisc_get_time(struct device *dev, struct rtc_time *tm)
{
};
static int parisc_get_time(struct device *dev, struct rtc_time *tm)
{
- struct parisc_rtc *p = dev_get_drvdata(dev);
- unsigned long flags, ret;
- spin_lock_irqsave(&p->lock, flags);
- spin_unlock_irqrestore(&p->lock, flags);
if (ret & RTC_BATT_BAD)
return -EOPNOTSUPP;
if (ret & RTC_BATT_BAD)
return -EOPNOTSUPP;
static int parisc_set_time(struct device *dev, struct rtc_time *tm)
{
static int parisc_set_time(struct device *dev, struct rtc_time *tm)
{
- struct parisc_rtc *p = dev_get_drvdata(dev);
- unsigned long flags;
- spin_lock_irqsave(&p->lock, flags);
- spin_unlock_irqrestore(&p->lock, flags);
if (ret < 0)
return -EOPNOTSUPP;
if (ret < 0)
return -EOPNOTSUPP;
- spin_lock_init(&p->lock);
-
p->rtc = rtc_device_register("rtc-parisc", &dev->dev, &parisc_rtc_ops,
THIS_MODULE);
if (IS_ERR(p->rtc)) {
p->rtc = rtc_device_register("rtc-parisc", &dev->dev, &parisc_rtc_ops,
THIS_MODULE);
if (IS_ERR(p->rtc)) {