Skip to content

Commit 0010b77

Browse files
tmilkovic51nashif
authored andcommitted
drivers: can: can_tcan4x5x: fix compiler build warning/error
Fix compiler warning when optional property reset-gpios is not supplied in the ti,tcan4x5x-compatible device tree node Signed-off-by: Tomislav Milkovic <[email protected]> (cherry picked from commit fb98387)
1 parent 1182a4c commit 0010b77

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/can/can_tcan4x5x.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,8 +508,10 @@ static int tcan4x5x_wake(const struct device *dev)
508508

509509
static int tcan4x5x_reset(const struct device *dev)
510510
{
511+
#if TCAN4X5X_RST_GPIO_SUPPORT
511512
const struct can_mcan_config *mcan_config = dev->config;
512513
const struct tcan4x5x_config *tcan_config = mcan_config->custom;
514+
#endif /* TCAN4X5X_RST_GPIO_SUPPORT */
513515
int err;
514516

515517
err = tcan4x5x_wake(dev);

0 commit comments

Comments
 (0)