Skip to content

Commit eddcaef

Browse files
committed
Merge branch 'pci/remove-old-api'
- In dw-xdata-pcie, pci_endpoint_test, and vmd, replace usage of deprecated ida_simple_*() API with ida_alloc() and ida_free() (Christophe JAILLET) * pci/remove-old-api: dw-xdata: Remove usage of the deprecated ida_simple_*() API misc: pci_endpoint_test: Remove usage of the deprecated ida_simple_*() API PCI: vmd: Remove usage of the deprecated ida_simple_*() API
2 parents d43e423 + 0171e06 commit eddcaef

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

drivers/misc/dw-xdata-pcie.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ static int dw_xdata_pcie_probe(struct pci_dev *pdev,
333333

334334
dw->pdev = pdev;
335335

336-
id = ida_simple_get(&xdata_ida, 0, 0, GFP_KERNEL);
336+
id = ida_alloc(&xdata_ida, GFP_KERNEL);
337337
if (id < 0) {
338338
dev_err(dev, "xData: unable to get id\n");
339339
return id;
@@ -377,7 +377,7 @@ static int dw_xdata_pcie_probe(struct pci_dev *pdev,
377377
kfree(dw->misc_dev.name);
378378

379379
err_ida_remove:
380-
ida_simple_remove(&xdata_ida, id);
380+
ida_free(&xdata_ida, id);
381381

382382
return err;
383383
}
@@ -396,7 +396,7 @@ static void dw_xdata_pcie_remove(struct pci_dev *pdev)
396396
dw_xdata_stop(dw);
397397
misc_deregister(&dw->misc_dev);
398398
kfree(dw->misc_dev.name);
399-
ida_simple_remove(&xdata_ida, id);
399+
ida_free(&xdata_ida, id);
400400
}
401401

402402
static const struct pci_device_id dw_xdata_pcie_id_table[] = {

drivers/misc/pci_endpoint_test.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -860,7 +860,7 @@ static int pci_endpoint_test_probe(struct pci_dev *pdev,
860860

861861
pci_set_drvdata(pdev, test);
862862

863-
id = ida_simple_get(&pci_endpoint_test_ida, 0, 0, GFP_KERNEL);
863+
id = ida_alloc(&pci_endpoint_test_ida, GFP_KERNEL);
864864
if (id < 0) {
865865
err = id;
866866
dev_err(dev, "Unable to get id\n");
@@ -907,7 +907,7 @@ static int pci_endpoint_test_probe(struct pci_dev *pdev,
907907
kfree(test->name);
908908

909909
err_ida_remove:
910-
ida_simple_remove(&pci_endpoint_test_ida, id);
910+
ida_free(&pci_endpoint_test_ida, id);
911911

912912
err_iounmap:
913913
for (bar = 0; bar < PCI_STD_NUM_BARS; bar++) {
@@ -943,7 +943,7 @@ static void pci_endpoint_test_remove(struct pci_dev *pdev)
943943
misc_deregister(&test->miscdev);
944944
kfree(misc_device->name);
945945
kfree(test->name);
946-
ida_simple_remove(&pci_endpoint_test_ida, id);
946+
ida_free(&pci_endpoint_test_ida, id);
947947
for (bar = 0; bar < PCI_STD_NUM_BARS; bar++) {
948948
if (test->bar[bar])
949949
pci_iounmap(pdev, test->bar[bar]);

0 commit comments

Comments
 (0)