summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-09-22 16:38:58 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-09-22 16:38:58 +0200
commitf47551bd6bfdd9971a5e99e64e12575980d4539f (patch)
tree059a162847faddd566a08a77d082af4bf788170a /drivers
parentcca1fd41ab2862465d75443822d751e4f9a112ee (diff)
parentc0c725d7350ec8b8453257676a440bb4b2df2422 (diff)
downloadlinux-f47551bd6bfdd9971a5e99e64e12575980d4539f.tar.bz2
Merge tag 'gnss-6.1-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/gnss into char-misc-next
Johan writes: "GNSS updates for 6.1-rc1 Here are the GNSS updates for 6.1-rc1, which includes a single IDA API cleanup. Everything has been in linux-next with no reported issues." * tag 'gnss-6.1-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/gnss: gnss: replace ida_simple API
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gnss/core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gnss/core.c b/drivers/gnss/core.c
index e6f94501cb28..1e82b7967570 100644
--- a/drivers/gnss/core.c
+++ b/drivers/gnss/core.c
@@ -217,7 +217,7 @@ static void gnss_device_release(struct device *dev)
kfree(gdev->write_buf);
kfifo_free(&gdev->read_fifo);
- ida_simple_remove(&gnss_minors, gdev->id);
+ ida_free(&gnss_minors, gdev->id);
kfree(gdev);
}
@@ -232,7 +232,7 @@ struct gnss_device *gnss_allocate_device(struct device *parent)
if (!gdev)
return NULL;
- id = ida_simple_get(&gnss_minors, 0, GNSS_MINORS, GFP_KERNEL);
+ id = ida_alloc_max(&gnss_minors, GNSS_MINORS - 1, GFP_KERNEL);
if (id < 0) {
kfree(gdev);
return NULL;