Commit 9bd9fbd9 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Corey Minyard

ipmi: 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: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Message-Id: <b1a7a75263400742e5fda6bd7ba426772dc8ef11.1702961986.git.christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarCorey Minyard <minyard@acm.org>
parent 242c6fd4
...@@ -3053,7 +3053,7 @@ static void cleanup_bmc_work(struct work_struct *work) ...@@ -3053,7 +3053,7 @@ static void cleanup_bmc_work(struct work_struct *work)
int id = bmc->pdev.id; /* Unregister overwrites id */ int id = bmc->pdev.id; /* Unregister overwrites id */
platform_device_unregister(&bmc->pdev); platform_device_unregister(&bmc->pdev);
ida_simple_remove(&ipmi_bmc_ida, id); ida_free(&ipmi_bmc_ida, id);
} }
static void static void
...@@ -3169,7 +3169,7 @@ static int __ipmi_bmc_register(struct ipmi_smi *intf, ...@@ -3169,7 +3169,7 @@ static int __ipmi_bmc_register(struct ipmi_smi *intf,
bmc->pdev.name = "ipmi_bmc"; bmc->pdev.name = "ipmi_bmc";
rv = ida_simple_get(&ipmi_bmc_ida, 0, 0, GFP_KERNEL); rv = ida_alloc(&ipmi_bmc_ida, GFP_KERNEL);
if (rv < 0) { if (rv < 0) {
kfree(bmc); kfree(bmc);
goto out; goto out;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment