lkml.org 
[lkml]   [2020]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 17/59] rtc: hym8563: stop using deprecated RTC API
Date
From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

devm_rtc_device_register() is deprecated. Use devm_rtc_allocate_device()
and devm_rtc_register_device() pair instead.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
drivers/rtc/rtc-hym8563.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/rtc/rtc-hym8563.c b/drivers/rtc/rtc-hym8563.c
index 24e0095be058..f39568c6d390 100644
--- a/drivers/rtc/rtc-hym8563.c
+++ b/drivers/rtc/rtc-hym8563.c
@@ -558,11 +558,11 @@ static int hym8563_probe(struct i2c_client *client,
dev_dbg(&client->dev, "rtc information is %s\n",
(ret & HYM8563_SEC_VL) ? "invalid" : "valid");

- hym8563->rtc = devm_rtc_device_register(&client->dev, client->name,
- &hym8563_rtc_ops, THIS_MODULE);
+ hym8563->rtc = devm_rtc_allocate_device(&client->dev);
if (IS_ERR(hym8563->rtc))
return PTR_ERR(hym8563->rtc);

+ hym8563->rtc->ops = &hym8563_rtc_ops;
/* the hym8563 alarm only supports a minute accuracy */
hym8563->rtc->uie_unsupported = 1;

@@ -570,7 +570,7 @@ static int hym8563_probe(struct i2c_client *client,
hym8563_clkout_register_clk(hym8563);
#endif

- return 0;
+ return devm_rtc_register_device(hym8563->rtc);
}

static const struct i2c_device_id hym8563_id[] = {
--
2.29.1
\
 
 \ /
  Last update: 2020-11-19 12:48    [W:0.185 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site