rust: shorten `con_id`s in `get` methods in clk module
authorOnur Özkan <work@onurozkan.dev>
Wed, 18 Jun 2025 09:35:08 +0000 (12:35 +0300)
committerStephen Boyd <sboyd@kernel.org>
Thu, 19 Jun 2025 19:42:38 +0000 (12:42 -0700)
commitb112dfc74b2040721959935b317d784455c5f635
tree6559552578d6251339474d6e0f7f31aded5b1984
parentbbbaea850e52c408654a586e0c4fbff8c1efc6f1
rust: shorten `con_id`s in `get` methods in clk module

Converts `if-else` blocks into one line code using `map_or`
for simplicity.

Signed-off-by: Onur Özkan <work@onurozkan.dev>
Link: https://lore.kernel.org/r/20250618093508.16343-1-work@onurozkan.dev
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
rust/kernel/clk.rs