From a233c283feb8c2930603b9f72fd2f5953fb51acf Mon Sep 17 00:00:00 2001 From: Etienne Carriere Date: Wed, 14 Aug 2019 11:53:47 +0200 Subject: [PATCH] module clock: minor export and braces fixup Prevents module_ctx variable from being exported outside the scope of the clock module source file. Adds braces around conditioned multi-line instruction block: consider inline comment a part of the instruction block. Signed-off-by: Etienne Carriere --- module/clock/src/mod_clock.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/module/clock/src/mod_clock.c b/module/clock/src/mod_clock.c index 42020b9d0..f49810e3f 100644 --- a/module/clock/src/mod_clock.c +++ b/module/clock/src/mod_clock.c @@ -33,7 +33,7 @@ struct clock_ctx { unsigned int dev_count; }; -struct clock_ctx module_ctx; +static struct clock_ctx module_ctx; /* * Module API functions @@ -198,9 +198,10 @@ static int clock_bind(fwk_id_t id, unsigned int round) if (round == 1) return FWK_SUCCESS; - if (!fwk_id_is_type(id, FWK_ID_TYPE_ELEMENT)) + if (!fwk_id_is_type(id, FWK_ID_TYPE_ELEMENT)) { /* Only element binding is supported */ return FWK_SUCCESS; + } ctx = module_ctx.dev_ctx_table + fwk_id_get_element_idx(id); @@ -254,9 +255,10 @@ static int clock_start(fwk_id_t id) static int clock_process_bind_request(fwk_id_t source_id, fwk_id_t target_id, fwk_id_t api_id, const void **api) { - if (fwk_id_get_api_idx(api_id) != MOD_CLOCK_API_TYPE_HAL) + if (fwk_id_get_api_idx(api_id) != MOD_CLOCK_API_TYPE_HAL) { /* The requested API is not supported. */ return FWK_E_ACCESS; + } *api = &clock_api; return FWK_SUCCESS; -- GitLab