diff options
Diffstat (limited to 'drivers/rtc/rtc-ds1672.c')
-rw-r--r-- | drivers/rtc/rtc-ds1672.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/rtc/rtc-ds1672.c b/drivers/rtc/rtc-ds1672.c index 45d65c0b3a85..3fc2a4738027 100644 --- a/drivers/rtc/rtc-ds1672.c +++ b/drivers/rtc/rtc-ds1672.c | |||
@@ -155,11 +155,6 @@ static const struct rtc_class_ops ds1672_rtc_ops = { | |||
155 | 155 | ||
156 | static int ds1672_remove(struct i2c_client *client) | 156 | static int ds1672_remove(struct i2c_client *client) |
157 | { | 157 | { |
158 | struct rtc_device *rtc = i2c_get_clientdata(client); | ||
159 | |||
160 | if (rtc) | ||
161 | rtc_device_unregister(rtc); | ||
162 | |||
163 | return 0; | 158 | return 0; |
164 | } | 159 | } |
165 | 160 | ||
@@ -177,7 +172,7 @@ static int ds1672_probe(struct i2c_client *client, | |||
177 | 172 | ||
178 | dev_info(&client->dev, "chip found, driver version " DRV_VERSION "\n"); | 173 | dev_info(&client->dev, "chip found, driver version " DRV_VERSION "\n"); |
179 | 174 | ||
180 | rtc = rtc_device_register(ds1672_driver.driver.name, &client->dev, | 175 | rtc = devm_rtc_device_register(&client->dev, ds1672_driver.driver.name, |
181 | &ds1672_rtc_ops, THIS_MODULE); | 176 | &ds1672_rtc_ops, THIS_MODULE); |
182 | 177 | ||
183 | if (IS_ERR(rtc)) | 178 | if (IS_ERR(rtc)) |
@@ -202,7 +197,6 @@ static int ds1672_probe(struct i2c_client *client, | |||
202 | return 0; | 197 | return 0; |
203 | 198 | ||
204 | exit_devreg: | 199 | exit_devreg: |
205 | rtc_device_unregister(rtc); | ||
206 | return err; | 200 | return err; |
207 | } | 201 | } |
208 | 202 | ||