Skip to content

Commit fa72d14

Browse files
tititiou36sre
authored andcommitted
HSI: omap_ssi: 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: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/d72106fc9de28ef8db2ed653febe366d141362a4.1698831563.git.christophe.jaillet@wanadoo.fr Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
1 parent b85ea95 commit fa72d14

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/hsi/controllers/omap_ssi_core.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ static int ssi_add_controller(struct hsi_controller *ssi,
355355
if (!omap_ssi)
356356
return -ENOMEM;
357357

358-
err = ida_simple_get(&platform_omap_ssi_ida, 0, 0, GFP_KERNEL);
358+
err = ida_alloc(&platform_omap_ssi_ida, GFP_KERNEL);
359359
if (err < 0)
360360
return err;
361361
ssi->id = err;
@@ -417,7 +417,7 @@ static int ssi_add_controller(struct hsi_controller *ssi,
417417
return 0;
418418

419419
out_err:
420-
ida_simple_remove(&platform_omap_ssi_ida, ssi->id);
420+
ida_free(&platform_omap_ssi_ida, ssi->id);
421421
return err;
422422
}
423423

@@ -451,7 +451,7 @@ static void ssi_remove_controller(struct hsi_controller *ssi)
451451
tasklet_kill(&omap_ssi->gdd_tasklet);
452452
hsi_unregister_controller(ssi);
453453
clk_notifier_unregister(omap_ssi->fck, &omap_ssi->fck_nb);
454-
ida_simple_remove(&platform_omap_ssi_ida, id);
454+
ida_free(&platform_omap_ssi_ida, id);
455455
}
456456

457457
static inline int ssi_of_get_available_ports_count(const struct device_node *np)

0 commit comments

Comments
 (0)