]> Git Repo - linux.git/blobdiff - drivers/pci/switch/switchtec.c
dt-bindings: net: dsa: make phylink bindings required for CPU/DSA ports
[linux.git] / drivers / pci / switch / switchtec.c
index c36c1238c604a2f8b8834d82e5f5e419652759d6..75be4fe225090573ab2f2b998a8d791f3065b706 100644 (file)
@@ -1376,8 +1376,7 @@ static struct switchtec_dev *stdev_create(struct pci_dev *pdev)
        dev->groups = switchtec_device_groups;
        dev->release = stdev_release;
 
-       minor = ida_simple_get(&switchtec_minor_ida, 0, 0,
-                              GFP_KERNEL);
+       minor = ida_alloc(&switchtec_minor_ida, GFP_KERNEL);
        if (minor < 0) {
                rc = minor;
                goto err_put;
@@ -1692,7 +1691,7 @@ static int switchtec_pci_probe(struct pci_dev *pdev,
 err_devadd:
        stdev_kill(stdev);
 err_put:
-       ida_simple_remove(&switchtec_minor_ida, MINOR(stdev->dev.devt));
+       ida_free(&switchtec_minor_ida, MINOR(stdev->dev.devt));
        put_device(&stdev->dev);
        return rc;
 }
@@ -1704,7 +1703,7 @@ static void switchtec_pci_remove(struct pci_dev *pdev)
        pci_set_drvdata(pdev, NULL);
 
        cdev_device_del(&stdev->cdev, &stdev->dev);
-       ida_simple_remove(&switchtec_minor_ida, MINOR(stdev->dev.devt));
+       ida_free(&switchtec_minor_ida, MINOR(stdev->dev.devt));
        dev_info(&stdev->dev, "unregistered.\n");
        stdev_kill(stdev);
        put_device(&stdev->dev);
This page took 0.044097 seconds and 4 git commands to generate.