File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -984,7 +984,7 @@ static int vmd_probe(struct pci_dev *dev, const struct pci_device_id *id)
984
984
return - ENOMEM ;
985
985
986
986
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 );
988
988
if (vmd -> instance < 0 )
989
989
return vmd -> instance ;
990
990
@@ -1026,7 +1026,7 @@ static int vmd_probe(struct pci_dev *dev, const struct pci_device_id *id)
1026
1026
return 0 ;
1027
1027
1028
1028
out_release_instance :
1029
- ida_simple_remove (& vmd_instance_ida , vmd -> instance );
1029
+ ida_free (& vmd_instance_ida , vmd -> instance );
1030
1030
return err ;
1031
1031
}
1032
1032
@@ -1048,7 +1048,7 @@ static void vmd_remove(struct pci_dev *dev)
1048
1048
vmd_cleanup_srcu (vmd );
1049
1049
vmd_detach_resources (vmd );
1050
1050
vmd_remove_irq_domain (vmd );
1051
- ida_simple_remove (& vmd_instance_ida , vmd -> instance );
1051
+ ida_free (& vmd_instance_ida , vmd -> instance );
1052
1052
}
1053
1053
1054
1054
static void vmd_shutdown (struct pci_dev * dev )
You can’t perform that action at this time.
0 commit comments