提交 91179917 编写于 作者: K keliu 提交者: David S. Miller

net: nfc: Directly use ida_alloc()/free()

Use ida_alloc()/ida_free() instead of deprecated
ida_simple_get()/ida_simple_remove() .
Signed-off-by: Nkeliu <liuke94@huawei.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 0649e4d6
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册