summaryrefslogtreecommitdiff
path: root/net/nfc
diff options
context:
space:
mode:
authorkeliu <liuke94@huawei.com>2022-05-27 09:42:25 +0300
committerDavid S. Miller <davem@davemloft.net>2022-05-28 17:28:47 +0300
commit911799172d2f703cc14e9000c55d124d5e0a91a2 (patch)
treedffc86a7296e125d30f4d15e85692962d0663158 /net/nfc
parent0649e4d63420ebc8cbebef3e9d39e12ffc5eb9fa (diff)
downloadlinux-911799172d2f703cc14e9000c55d124d5e0a91a2.tar.xz
net: nfc: Directly use ida_alloc()/free()
Use ida_alloc()/ida_free() instead of deprecated ida_simple_get()/ida_simple_remove() . Signed-off-by: keliu <liuke94@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/nfc')
-rw-r--r--net/nfc/core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/nfc/core.c b/net/nfc/core.c
index 6ff3e10ff8e3..eb2c0959e5b6 100644
--- a/net/nfc/core.c
+++ b/net/nfc/core.c
@@ -975,7 +975,7 @@ static void nfc_release(struct device *d)
kfree(se);
}
- ida_simple_remove(&nfc_index_ida, dev->idx);
+ ida_free(&nfc_index_ida, dev->idx);
kfree(dev);
}
@@ -1066,7 +1066,7 @@ struct nfc_dev *nfc_allocate_device(const struct nfc_ops *ops,
if (!dev)
return NULL;
- rc = ida_simple_get(&nfc_index_ida, 0, 0, GFP_KERNEL);
+ rc = ida_alloc(&nfc_index_ida, GFP_KERNEL);
if (rc < 0)
goto err_free_dev;
dev->idx = rc;