mttcan: fix compilation error for android

1. nvidia-oot/drivers/net/can/mttcan/native/../
   include/m_ttcan_linux.h:35:10:
   fatal error: 'linux/tegra_prod.h' file not found
         ^~~~~~~~~~~~~~~~~~~~
   1 error generated.

2. nvidia-oot/drivers/net/can/mttcan/hal/m_ttcan.c:330:6:
   warning: unused variable _tdcr_reg_ [-Wunused-variable]
   330 |  u32 tdcr_reg;
      |      ^~~~~~~~

Bug 4174549

Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Change-Id: I57ae8d1234745996fb1277c64c632d2d1026a870
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2928348
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Bruce Xu <brucex@nvidia.com>
Tested-by: Bruce Xu <brucex@nvidia.com>
This commit is contained in:
Manish Bhardwaj
2023-06-29 09:51:56 +05:30
committed by mobile promotions
parent 6dc4368ca0
commit 16d1e13a3b
2 changed files with 3 additions and 1 deletions

View File

@@ -327,7 +327,9 @@ int ttcan_set_bitrate(struct mttcan_priv *priv)
u32 cccr_reg;
u32 nbtp_reg;
u32 dbtp_reg;
#if KERNEL_VERSION(5, 16, 0) < LINUX_VERSION_CODE
u32 tdcr_reg;
#endif
nbtp_reg = ((ttcan->bt_config.nominal.phase_seg2 - 1) <<
MTT_NBTP_NTSEG2_SHIFT) & MTT_NBTP_NTSEG2_MASK;

View File

@@ -32,7 +32,7 @@
#include <linux/spinlock.h>
#include <linux/clocksource.h>
#if KERNEL_VERSION(5, 16, 0) >= LINUX_VERSION_CODE
#include <linux/tegra_prod.h>
#include <linux/tegra-oot-prod.h>
#endif
#include <linux/platform/tegra/ptp-notifier.h>
#include <linux/mailbox_client.h>