summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-04-29 16:19:31 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-29 18:28:29 -0700
commit4e440681f47709ce0a8fe61831e263f8a1bbec46 (patch)
treedd84d042e7286fbbf2a6ede7c5111c20a75d3b60
parent6c0686057fe18754060842b525112b46d4f72ba4 (diff)
downloadop-kernel-dev-4e440681f47709ce0a8fe61831e263f8a1bbec46.zip
op-kernel-dev-4e440681f47709ce0a8fe61831e263f8a1bbec46.tar.gz
rtc: rtc-bq32k: use devm_rtc_device_register()
devm_rtc_device_register() is device managed and makes cleanup paths simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/rtc/rtc-bq32k.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/rtc/rtc-bq32k.c b/drivers/rtc/rtc-bq32k.c
index 036cb89..fea78bc 100644
--- a/drivers/rtc/rtc-bq32k.c
+++ b/drivers/rtc/rtc-bq32k.c
@@ -153,7 +153,7 @@ static int bq32k_probe(struct i2c_client *client,
if (error)
return error;
- rtc = rtc_device_register(bq32k_driver.driver.name, &client->dev,
+ rtc = devm_rtc_device_register(&client->dev, bq32k_driver.driver.name,
&bq32k_rtc_ops, THIS_MODULE);
if (IS_ERR(rtc))
return PTR_ERR(rtc);
@@ -165,9 +165,6 @@ static int bq32k_probe(struct i2c_client *client,
static int bq32k_remove(struct i2c_client *client)
{
- struct rtc_device *rtc = i2c_get_clientdata(client);
-
- rtc_device_unregister(rtc);
return 0;
}
OpenPOWER on IntegriCloud