Skip to content

Commit 161d42d

Browse files
committed
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
2 parents 67b9ef2 + 991801b commit 161d42d

File tree

1 file changed

+3
-3
lines changed
  • drivers/pci/controller

1 file changed

+3
-3
lines changed

drivers/pci/controller/vmd.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -984,7 +984,7 @@ static int vmd_probe(struct pci_dev *dev, const struct pci_device_id *id)
984984
return -ENOMEM;
985985

986986
vmd->dev = dev;
987-
vmd->instance = ida_simple_get(&vmd_instance_ida, 0, 0, GFP_KERNEL);
987+
vmd->instance = ida_alloc(&vmd_instance_ida, GFP_KERNEL);
988988
if (vmd->instance < 0)
989989
return vmd->instance;
990990

@@ -1026,7 +1026,7 @@ static int vmd_probe(struct pci_dev *dev, const struct pci_device_id *id)
10261026
return 0;
10271027

10281028
out_release_instance:
1029-
ida_simple_remove(&vmd_instance_ida, vmd->instance);
1029+
ida_free(&vmd_instance_ida, vmd->instance);
10301030
return err;
10311031
}
10321032

@@ -1048,7 +1048,7 @@ static void vmd_remove(struct pci_dev *dev)
10481048
vmd_cleanup_srcu(vmd);
10491049
vmd_detach_resources(vmd);
10501050
vmd_remove_irq_domain(vmd);
1051-
ida_simple_remove(&vmd_instance_ida, vmd->instance);
1051+
ida_free(&vmd_instance_ida, vmd->instance);
10521052
}
10531053

10541054
static void vmd_shutdown(struct pci_dev *dev)

0 commit comments

Comments
 (0)