dw-xdata: Remove usage of the deprecated ida_simple_xx() API
Subsystems (4)
PATCH 1/1 dw-xdata: Remove usage of the deprecated ida_simple_xx() API
ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove().
This is less verbose.
Signed-off-by Christophe JAILLET <[email protected]>
--- drivers/misc/dw-xdata-pcie.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/misc/dw-xdata-pcie.c +3 -3
@@ -333,7 +333,7 @@ static int dw_xdata_pcie_probe(struct pci_dev *pdev, dw->pdev = pdev; - id =ida_simple_get (&xdata_ida,0 ,0 ,GFP_KERNEL ); + id =ida_alloc (&xdata_ida,GFP_KERNEL );if (id <0 ) {dev_err (dev,"xData: unable to get id\n" );return id;
@@ -377,7 +377,7 @@ static int dw_xdata_pcie_probe(struct pci_dev *pdev,kfree (dw->misc_dev.name); err_ida_remove: -ida_simple_remove (&xdata_ida, id); +ida_free (&xdata_ida, id);return err; }
@@ -396,7 +396,7 @@ static void dw_xdata_pcie_remove(struct pci_dev *pdev)dw_xdata_stop (dw);misc_deregister (&dw->misc_dev);kfree (dw->misc_dev.name); -ida_simple_remove (&xdata_ida, id); +ida_free (&xdata_ida, id); }static const struct pci_device_id dw_xdata_pcie_id_table[] = {
Signature · 1 line
2.34.1
Krzysztof Wilczyński
AppliedHello,
Quoted 4 lines
ida_alloc()andida_free()should be preferred to the deprecatedida_simple_get()andida_simple_remove().This is less verbose.
Applied to remove-old-api, thank you!
[1/1] dw-xdata: Remove usage of the deprecated ida_simple_*() API
https://git.kernel.org/pci/pci/c/0171e067d7da Krzysztof