Skip to content

Commit

Permalink
HSI: omap_ssi: Remove usage of the deprecated ida_simple_xx() API
Browse files Browse the repository at this point in the history
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 <[email protected]>
Link: https://lore.kernel.org/r/d72106fc9de28ef8db2ed653febe366d141362a4.1698831563.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Sebastian Reichel <[email protected]>
  • Loading branch information
tititiou36 authored and sre committed Nov 13, 2023
1 parent b85ea95 commit fa72d14
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/hsi/controllers/omap_ssi_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ static int ssi_add_controller(struct hsi_controller *ssi,
if (!omap_ssi)
return -ENOMEM;

err = ida_simple_get(&platform_omap_ssi_ida, 0, 0, GFP_KERNEL);
err = ida_alloc(&platform_omap_ssi_ida, GFP_KERNEL);
if (err < 0)
return err;
ssi->id = err;
Expand Down Expand Up @@ -417,7 +417,7 @@ static int ssi_add_controller(struct hsi_controller *ssi,
return 0;

out_err:
ida_simple_remove(&platform_omap_ssi_ida, ssi->id);
ida_free(&platform_omap_ssi_ida, ssi->id);
return err;
}

Expand Down Expand Up @@ -451,7 +451,7 @@ static void ssi_remove_controller(struct hsi_controller *ssi)
tasklet_kill(&omap_ssi->gdd_tasklet);
hsi_unregister_controller(ssi);
clk_notifier_unregister(omap_ssi->fck, &omap_ssi->fck_nb);
ida_simple_remove(&platform_omap_ssi_ida, id);
ida_free(&platform_omap_ssi_ida, id);
}

static inline int ssi_of_get_available_ports_count(const struct device_node *np)
Expand Down

0 comments on commit fa72d14

Please sign in to comment.