Skip to content

Commit 1bc6045

Browse files
ar-conclusivecarlescufi
authored andcommitted
drivers: clock_control: imx: Simplify pointer casting.
Use `uintptr_t` to cast a pointer to integer type for `clock_name`. While at it, also remove an unused variable. Signed-off-by: Artur Rojek <[email protected]>
1 parent 48214e8 commit 1bc6045

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

drivers/clock_control/clock_control_mcux_ccm.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,7 @@ static int mcux_ccm_get_subsys_rate(const struct device *dev,
6060
clock_control_subsys_t sub_system,
6161
uint32_t *rate)
6262
{
63-
#ifdef CONFIG_ARM64
64-
uint32_t clock_name = (uint32_t)(uint64_t) sub_system;
65-
#else
66-
uint32_t clock_name = (uint32_t) sub_system;
67-
#endif
68-
uint32_t mux __unused;
63+
uint32_t clock_name = (uintptr_t)sub_system;
6964

7065
switch (clock_name) {
7166

0 commit comments

Comments
 (0)