aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2023-12-19 06:07:12 +0100
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2024-01-08 01:48:51 +0100
commite3d3fe7e7bf08820a83c9d9a4c38c7b29a2927f1 (patch)
tree0dc8fbe751c352a3bb65c19e900ea3c35d083ed6
parent54e1898e113dc65974103620bbe7a9f856f80f6e (diff)
downloadlinux-next-e3d3fe7e7bf08820a83c9d9a4c38c7b29a2927f1.tar.gz
rtc: class: Remove usage of the deprecated ida_simple_xx() API
ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove(). This is less verbose. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/4f2c049cb09d46fed336e22445c71988b4f340d6.1702962419.git.christophe.jaillet@wanadoo.fr Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-rw-r--r--drivers/rtc/class.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c
index edfd942f8c5494..921ee182797439 100644
--- a/drivers/rtc/class.c
+++ b/drivers/rtc/class.c
@@ -256,7 +256,7 @@ static int rtc_device_get_id(struct device *dev)
of_id = of_alias_get_id(dev->parent->of_node, "rtc");
if (of_id >= 0) {
- id = ida_simple_get(&rtc_ida, of_id, of_id + 1, GFP_KERNEL);
+ id = ida_alloc_range(&rtc_ida, of_id, of_id, GFP_KERNEL);
if (id < 0)
dev_warn(dev, "/aliases ID %d not available\n", of_id);
}