diff options
Diffstat (limited to 'drivers/rtc')
| -rw-r--r-- | drivers/rtc/rtc-bfin.c | 30 | ||||
| -rw-r--r-- | drivers/rtc/rtc-ds1374.c | 4 | ||||
| -rw-r--r-- | drivers/rtc/rtc-vr41xx.c | 4 | 
3 files changed, 19 insertions, 19 deletions
diff --git a/drivers/rtc/rtc-bfin.c b/drivers/rtc/rtc-bfin.c index aafd3e6ebb0..a118eb0f1e6 100644 --- a/drivers/rtc/rtc-bfin.c +++ b/drivers/rtc/rtc-bfin.c @@ -1,8 +1,8 @@  /*   * Blackfin On-Chip Real Time Clock Driver - *  Supports BF52[257]/BF53[123]/BF53[467]/BF54[24789] + *  Supports BF51x/BF52x/BF53[123]/BF53[467]/BF54x   * - * Copyright 2004-2008 Analog Devices Inc. + * Copyright 2004-2009 Analog Devices Inc.   *   * Enter bugs at http://blackfin.uclinux.org/   * @@ -363,7 +363,7 @@ static int __devinit bfin_rtc_probe(struct platform_device *pdev)  	struct bfin_rtc *rtc;  	struct device *dev = &pdev->dev;  	int ret = 0; -	unsigned long timeout; +	unsigned long timeout = jiffies + HZ;  	dev_dbg_stamp(dev); @@ -374,32 +374,32 @@ static int __devinit bfin_rtc_probe(struct platform_device *pdev)  	platform_set_drvdata(pdev, rtc);  	device_init_wakeup(dev, 1); +	/* Register our RTC with the RTC framework */ +	rtc->rtc_dev = rtc_device_register(pdev->name, dev, &bfin_rtc_ops, +						THIS_MODULE); +	if (unlikely(IS_ERR(rtc->rtc_dev))) { +		ret = PTR_ERR(rtc->rtc_dev); +		goto err; +	} +  	/* Grab the IRQ and init the hardware */  	ret = request_irq(IRQ_RTC, bfin_rtc_interrupt, IRQF_SHARED, pdev->name, dev);  	if (unlikely(ret)) -		goto err; +		goto err_reg;  	/* sometimes the bootloader touched things, but the write complete was not  	 * enabled, so let's just do a quick timeout here since the IRQ will not fire ...  	 */ -	timeout = jiffies + HZ;  	while (bfin_read_RTC_ISTAT() & RTC_ISTAT_WRITE_PENDING)  		if (time_after(jiffies, timeout))  			break;  	bfin_rtc_reset(dev, RTC_ISTAT_WRITE_COMPLETE);  	bfin_write_RTC_SWCNT(0); -	/* Register our RTC with the RTC framework */ -	rtc->rtc_dev = rtc_device_register(pdev->name, dev, &bfin_rtc_ops, THIS_MODULE); -	if (unlikely(IS_ERR(rtc->rtc_dev))) { -		ret = PTR_ERR(rtc->rtc_dev); -		goto err_irq; -	} -  	return 0; - err_irq: -	free_irq(IRQ_RTC, dev); - err: +err_reg: +	rtc_device_unregister(rtc->rtc_dev); +err:  	kfree(rtc);  	return ret;  } diff --git a/drivers/rtc/rtc-ds1374.c b/drivers/rtc/rtc-ds1374.c index 32b27739ec2..713f7bf5afb 100644 --- a/drivers/rtc/rtc-ds1374.c +++ b/drivers/rtc/rtc-ds1374.c @@ -283,7 +283,7 @@ static void ds1374_work(struct work_struct *work)  	stat = i2c_smbus_read_byte_data(client, DS1374_REG_SR);  	if (stat < 0) -		return; +		goto unlock;  	if (stat & DS1374_REG_SR_AF) {  		stat &= ~DS1374_REG_SR_AF; @@ -302,7 +302,7 @@ static void ds1374_work(struct work_struct *work)  out:  	if (!ds1374->exiting)  		enable_irq(client->irq); - +unlock:  	mutex_unlock(&ds1374->mutex);  } diff --git a/drivers/rtc/rtc-vr41xx.c b/drivers/rtc/rtc-vr41xx.c index f11297aff85..2c839d0d21b 100644 --- a/drivers/rtc/rtc-vr41xx.c +++ b/drivers/rtc/rtc-vr41xx.c @@ -1,7 +1,7 @@  /*   *  Driver for NEC VR4100 series Real Time Clock unit.   * - *  Copyright (C) 2003-2008  Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> + *  Copyright (C) 2003-2008  Yoichi Yuasa <yuasa@linux-mips.org>   *   *  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 @@ -33,7 +33,7 @@  #include <asm/io.h>  #include <asm/uaccess.h> -MODULE_AUTHOR("Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>"); +MODULE_AUTHOR("Yoichi Yuasa <yuasa@linux-mips.org>");  MODULE_DESCRIPTION("NEC VR4100 series RTC driver");  MODULE_LICENSE("GPL v2");  | 
