Skip to content

Commit

Permalink
arch: hpmicro: drivers: fix compile hpm_can waring and error apache#20
Browse files Browse the repository at this point in the history
…apache#21

- fix hpm_can waring

Signed-off-by: Runcheng Lu <[email protected]>
  • Loading branch information
RCSN authored and chenzhihong007 committed May 6, 2023
1 parent 2a9f79a commit c9eb1e0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arch/risc-v/src/hpmicro/hpm_can.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
#include "hpm_clock_drv.h"
#include "hpm_can.h"

#ifdef CONFIG_HPM_CAN_DRV
#if defined(CONFIG_HPM_CAN_DRV) && defined(CONFIG_HPM_CAN_CHARDRIVER)

/****************************************************************************
* Pre-processor Definitions
Expand Down Expand Up @@ -996,7 +996,7 @@ static int hpm_can_ioctl(struct can_dev_s *dev, int cmd,
bm->bm_loopback = 0;
}

if (priv == can_mode_listen_only)
if (priv->can_config.mode == can_mode_listen_only)
{
bm->bm_silent = 1;
}
Expand Down Expand Up @@ -1179,7 +1179,7 @@ static int hpm_can_ioctl(struct can_dev_s *dev, int cmd,

if(flag)
{
ret = can_set_cfg(priv);
ret = can_set_cfg(dev);
}

return ret;
Expand Down

0 comments on commit c9eb1e0

Please sign in to comment.