drivers: can: stm32fd: fix type of clock rate
the rate_tmp varaiable was int, but should be const uint32_t. Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
This commit is contained in:
parent
21200b54f7
commit
41643b0fac
1 changed files with 1 additions and 3 deletions
|
@ -24,9 +24,7 @@ Allowed values are 1 or 2 * n, where n <= 15
|
||||||
int can_stm32fd_get_core_clock(const struct device *dev, uint32_t *rate)
|
int can_stm32fd_get_core_clock(const struct device *dev, uint32_t *rate)
|
||||||
{
|
{
|
||||||
ARG_UNUSED(dev);
|
ARG_UNUSED(dev);
|
||||||
int rate_tmp;
|
const uint32_t rate_tmp = LL_RCC_GetFDCANClockFreq(LL_RCC_FDCAN_CLKSOURCE);
|
||||||
|
|
||||||
rate_tmp = LL_RCC_GetFDCANClockFreq(LL_RCC_FDCAN_CLKSOURCE);
|
|
||||||
|
|
||||||
if (rate_tmp == LL_RCC_PERIPH_FREQUENCY_NO) {
|
if (rate_tmp == LL_RCC_PERIPH_FREQUENCY_NO) {
|
||||||
LOG_ERR("Can't read core clock");
|
LOG_ERR("Can't read core clock");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue