summaryrefslogtreecommitdiffstats
path: root/drivers/misc/bcm-vk
diff options
context:
space:
mode:
authorBreno Leitao <leitao@debian.org>2022-08-12 11:47:17 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-09-01 16:29:32 +0200
commit5cb14f15d79a8edfb9197deb97c7061d55b819ab (patch)
treef0e1639ea46a92c737f1e73068a04ca05ce7db7f /drivers/misc/bcm-vk
parentmisc: bcm-vk: Specify the minimum number of IRQ vecs (diff)
downloadlinux-5cb14f15d79a8edfb9197deb97c7061d55b819ab.tar.xz
linux-5cb14f15d79a8edfb9197deb97c7061d55b819ab.zip
misc: bcm_vk: Remove usage of deprecated functions
ida_simple_get() and ida_simple_remove() functions are deprecated now. These functions were replaced by ida_alloc() and ida_free() respectively. This patch modernize bcm_vk to use the replacement functions. Acked-by: Scott Branden <scott.branden@broadcom.com> Signed-off-by: Breno Leitao <leitao@debian.org> Link: https://lore.kernel.org/r/20220812094717.4097179-1-leitao@debian.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/bcm-vk')
-rw-r--r--drivers/misc/bcm-vk/bcm_vk_dev.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/misc/bcm-vk/bcm_vk_dev.c b/drivers/misc/bcm-vk/bcm_vk_dev.c
index bedab17884b8..d4a96137728d 100644
--- a/drivers/misc/bcm-vk/bcm_vk_dev.c
+++ b/drivers/misc/bcm-vk/bcm_vk_dev.c
@@ -1401,7 +1401,7 @@ static int bcm_vk_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
bcm_vk_tty_set_irq_enabled(vk, i);
}
- id = ida_simple_get(&bcm_vk_ida, 0, 0, GFP_KERNEL);
+ id = ida_alloc(&bcm_vk_ida, GFP_KERNEL);
if (id < 0) {
err = id;
dev_err(dev, "unable to get id\n");
@@ -1500,7 +1500,7 @@ err_kfree_name:
misc_device->name = NULL;
err_ida_remove:
- ida_simple_remove(&bcm_vk_ida, id);
+ ida_free(&bcm_vk_ida, id);
err_irq:
for (i = 0; i < vk->num_irqs; i++)
@@ -1573,7 +1573,7 @@ static void bcm_vk_remove(struct pci_dev *pdev)
if (misc_device->name) {
misc_deregister(misc_device);
kfree(misc_device->name);
- ida_simple_remove(&bcm_vk_ida, vk->devid);
+ ida_free(&bcm_vk_ida, vk->devid);
}
for (i = 0; i < vk->num_irqs; i++)
devm_free_irq(&pdev->dev, pci_irq_vector(pdev, i), vk);