diff options
Diffstat (limited to 'drivers/rtc/rtc-rx8581.c')
-rw-r--r-- | drivers/rtc/rtc-rx8581.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/rtc/rtc-rx8581.c b/drivers/rtc/rtc-rx8581.c index b0c272658fa2..07f3037b18f4 100644 --- a/drivers/rtc/rtc-rx8581.c +++ b/drivers/rtc/rtc-rx8581.c | |||
@@ -240,8 +240,8 @@ static int rx8581_probe(struct i2c_client *client, | |||
240 | 240 | ||
241 | dev_info(&client->dev, "chip found, driver version " DRV_VERSION "\n"); | 241 | dev_info(&client->dev, "chip found, driver version " DRV_VERSION "\n"); |
242 | 242 | ||
243 | rtc = rtc_device_register(rx8581_driver.driver.name, | 243 | rtc = devm_rtc_device_register(&client->dev, rx8581_driver.driver.name, |
244 | &client->dev, &rx8581_rtc_ops, THIS_MODULE); | 244 | &rx8581_rtc_ops, THIS_MODULE); |
245 | 245 | ||
246 | if (IS_ERR(rtc)) | 246 | if (IS_ERR(rtc)) |
247 | return PTR_ERR(rtc); | 247 | return PTR_ERR(rtc); |
@@ -253,10 +253,6 @@ static int rx8581_probe(struct i2c_client *client, | |||
253 | 253 | ||
254 | static int rx8581_remove(struct i2c_client *client) | 254 | static int rx8581_remove(struct i2c_client *client) |
255 | { | 255 | { |
256 | struct rtc_device *rtc = i2c_get_clientdata(client); | ||
257 | |||
258 | rtc_device_unregister(rtc); | ||
259 | |||
260 | return 0; | 256 | return 0; |
261 | } | 257 | } |
262 | 258 | ||