diff options
author | 2024-01-15 12:10:39 -0600 | |
---|---|---|
committer | 2024-01-15 12:10:39 -0600 | |
commit | 161d42df9acfd14a5dd4e0ced023aed5879c5d64 (patch) | |
tree | 15f5f7a5025d4b09cfc1702dd7f31d95b60ceb84 | |
parent | Merge branch 'pci/controller/rcar' (diff) | |
parent | PCI: vmd: Remove usage of the deprecated ida_simple_xx() API (diff) | |
download | linux-161d42df9acfd14a5dd4e0ced023aed5879c5d64.tar.gz linux-161d42df9acfd14a5dd4e0ced023aed5879c5d64.tar.bz2 linux-161d42df9acfd14a5dd4e0ced023aed5879c5d64.zip |
Merge branch 'pci/controller/vmd'
- Use ida_alloc() instead of deprecated ida_simple_get() (Christophe JAILLET)
* pci/controller/vmd:
PCI: vmd: Remove usage of the deprecated ida_simple_xx() API
-rw-r--r-- | drivers/pci/controller/vmd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c index 94ba61fe1c44..00a4264711f1 100644 --- a/drivers/pci/controller/vmd.c +++ b/drivers/pci/controller/vmd.c @@ -984,7 +984,7 @@ static int vmd_probe(struct pci_dev *dev, const struct pci_device_id *id) return -ENOMEM; vmd->dev = dev; - vmd->instance = ida_simple_get(&vmd_instance_ida, 0, 0, GFP_KERNEL); + vmd->instance = ida_alloc(&vmd_instance_ida, GFP_KERNEL); if (vmd->instance < 0) return vmd->instance; @@ -1026,7 +1026,7 @@ static int vmd_probe(struct pci_dev *dev, const struct pci_device_id *id) return 0; out_release_instance: - ida_simple_remove(&vmd_instance_ida, vmd->instance); + ida_free(&vmd_instance_ida, vmd->instance); return err; } @@ -1048,7 +1048,7 @@ static void vmd_remove(struct pci_dev *dev) vmd_cleanup_srcu(vmd); vmd_detach_resources(vmd); vmd_remove_irq_domain(vmd); - ida_simple_remove(&vmd_instance_ida, vmd->instance); + ida_free(&vmd_instance_ida, vmd->instance); } static void vmd_shutdown(struct pci_dev *dev) |