Skip to content

Commit 0f373e6

Browse files
tititiou36akpm00
authored andcommitted
intel_th: 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. Link: https://lkml.kernel.org/r/2aca50a9d061faecfd4ded80b5874cd3be9b855d.1713086613.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 4a45857 commit 0f373e6

File tree

1 file changed

+3
-3
lines changed
  • drivers/hwtracing/intel_th

1 file changed

+3
-3
lines changed

drivers/hwtracing/intel_th/core.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,7 @@ intel_th_alloc(struct device *dev, const struct intel_th_drvdata *drvdata,
871871
if (!th)
872872
return ERR_PTR(-ENOMEM);
873873

874-
th->id = ida_simple_get(&intel_th_ida, 0, 0, GFP_KERNEL);
874+
th->id = ida_alloc(&intel_th_ida, GFP_KERNEL);
875875
if (th->id < 0) {
876876
err = th->id;
877877
goto err_alloc;
@@ -931,7 +931,7 @@ intel_th_alloc(struct device *dev, const struct intel_th_drvdata *drvdata,
931931
"intel_th/output");
932932

933933
err_ida:
934-
ida_simple_remove(&intel_th_ida, th->id);
934+
ida_free(&intel_th_ida, th->id);
935935

936936
err_alloc:
937937
kfree(th);
@@ -964,7 +964,7 @@ void intel_th_free(struct intel_th *th)
964964
__unregister_chrdev(th->major, 0, TH_POSSIBLE_OUTPUTS,
965965
"intel_th/output");
966966

967-
ida_simple_remove(&intel_th_ida, th->id);
967+
ida_free(&intel_th_ida, th->id);
968968

969969
kfree(th);
970970
}

0 commit comments

Comments
 (0)