driver: clock: npcx: remove useless operands.
Remove useless operands since 'bit' field of npcx_clk_cfg structure is only 3-bit depth and always under 8. Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
This commit is contained in:
parent
0012ba5a38
commit
2134f9b72d
|
@ -39,7 +39,7 @@ static inline int npcx_clock_control_on(const struct device *dev,
|
|||
struct npcx_clk_cfg *clk_cfg = (struct npcx_clk_cfg *)(sub_system);
|
||||
const uint32_t pmc_base = DRV_CONFIG(dev)->base_pmc;
|
||||
|
||||
if (clk_cfg->ctrl >= NPCX_PWDWN_CTL_COUNT || clk_cfg->bit >= 8)
|
||||
if (clk_cfg->ctrl >= NPCX_PWDWN_CTL_COUNT)
|
||||
return -EINVAL;
|
||||
|
||||
/* Clear related PD (Power-Down) bit of module to turn on clock */
|
||||
|
@ -54,7 +54,7 @@ static inline int npcx_clock_control_off(const struct device *dev,
|
|||
struct npcx_clk_cfg *clk_cfg = (struct npcx_clk_cfg *)(sub_system);
|
||||
const uint32_t pmc_base = DRV_CONFIG(dev)->base_pmc;
|
||||
|
||||
if (clk_cfg->ctrl >= NPCX_PWDWN_CTL_COUNT || clk_cfg->bit >= 8)
|
||||
if (clk_cfg->ctrl >= NPCX_PWDWN_CTL_COUNT)
|
||||
return -EINVAL;
|
||||
|
||||
/* Set related PD (Power-Down) bit of module to turn off clock */
|
||||
|
|
Loading…
Reference in New Issue