diff options
author | Alessandro Zummo <alessandro.zummo@towertech.it> | 2009-12-15 16:45:53 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-16 07:19:58 -0800 |
commit | b74d2caa64f8e542e9c6716ae6ed4a60d681ea9f (patch) | |
tree | 3d34fb87043b4a800bd35455725ba81638541cc3 /drivers/rtc/rtc-pcf8563.c | |
parent | d1b2efa83fbf7b33919238fa29ef6ab935820103 (diff) | |
download | op-kernel-dev-b74d2caa64f8e542e9c6716ae6ed4a60d681ea9f.zip op-kernel-dev-b74d2caa64f8e542e9c6716ae6ed4a60d681ea9f.tar.gz |
rtc: fix driver data issues in several rtc drivers
Herton Ronaldo Krzesinski recently raised up, and fixed, an issue with the
rtc_cmos driver, which was referring to an inconsistent driver data.
This patch ensures that driver data registration happens before
rtc_device_register().
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Acked-by: Thomas Hommel <thomas.hommel@gefanuc.com>
Acked-by: Hans-Christian Egtvedt <hcegtvedt@atmel.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Cc: David S. Miller <davem@davemloft.net>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Andrew Sharp <andy.sharp@onstor.com>
Cc: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: Alexander Bigga <ab@mycable.de>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Mark Zhan <rongkai.zhan@windriver.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc/rtc-pcf8563.c')
-rw-r--r-- | drivers/rtc/rtc-pcf8563.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-pcf8563.c b/drivers/rtc/rtc-pcf8563.c index b725913..65f346b 100644 --- a/drivers/rtc/rtc-pcf8563.c +++ b/drivers/rtc/rtc-pcf8563.c @@ -212,6 +212,8 @@ static int pcf8563_probe(struct i2c_client *client, dev_info(&client->dev, "chip found, driver version " DRV_VERSION "\n"); + i2c_set_clientdata(client, pcf8563); + pcf8563->rtc = rtc_device_register(pcf8563_driver.driver.name, &client->dev, &pcf8563_rtc_ops, THIS_MODULE); @@ -220,8 +222,6 @@ static int pcf8563_probe(struct i2c_client *client, goto exit_kfree; } - i2c_set_clientdata(client, pcf8563); - return 0; exit_kfree: |