mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
nvidia-oot: fix mttcan driver compilaiton error.
Using this patch we are fixing below compilation error of mttcan driver with stable kernel. nvidia-oot/drivers/net/can/mttcan/native/m_ttcan_linux.c:620:3: error: implicit declaration of function _can_led_event_ [-Werror=implicit-function-declaration] can_led_event(dev, CAN_LED_EVENT_TX); Bug 3767126 Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com> Change-Id: Ic7fa91a34b59f165ce689ad956f1c3779ef13f9a Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2787166 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Sachin Nikam <snikam@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
eda5ce0144
commit
bb37b5d666
@@ -617,7 +617,9 @@ static void mttcan_tx_complete(struct net_device *dev)
|
|||||||
while (completed_tx) {
|
while (completed_tx) {
|
||||||
msg_no = ffs(completed_tx) - 1;
|
msg_no = ffs(completed_tx) - 1;
|
||||||
can_get_echo_skb(dev, msg_no, NULL);
|
can_get_echo_skb(dev, msg_no, NULL);
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(6,0,0)
|
||||||
can_led_event(dev, CAN_LED_EVENT_TX);
|
can_led_event(dev, CAN_LED_EVENT_TX);
|
||||||
|
#endif
|
||||||
clear_bit(msg_no, &ttcan->tx_object);
|
clear_bit(msg_no, &ttcan->tx_object);
|
||||||
stats->tx_packets++;
|
stats->tx_packets++;
|
||||||
stats->tx_bytes += ttcan->tx_buf_dlc[msg_no];
|
stats->tx_bytes += ttcan->tx_buf_dlc[msg_no];
|
||||||
@@ -1303,7 +1305,9 @@ static int mttcan_open(struct net_device *dev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
napi_enable(&priv->napi);
|
napi_enable(&priv->napi);
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(6,0,0)
|
||||||
can_led_event(dev, CAN_LED_EVENT_OPEN);
|
can_led_event(dev, CAN_LED_EVENT_OPEN);
|
||||||
|
#endif
|
||||||
|
|
||||||
mttcan_start(dev);
|
mttcan_start(dev);
|
||||||
netif_start_queue(dev);
|
netif_start_queue(dev);
|
||||||
@@ -1330,7 +1334,9 @@ static int mttcan_close(struct net_device *dev)
|
|||||||
mttcan_power_down(dev);
|
mttcan_power_down(dev);
|
||||||
mttcan_pm_runtime_put_sync(priv);
|
mttcan_pm_runtime_put_sync(priv);
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(6,0,0)
|
||||||
can_led_event(dev, CAN_LED_EVENT_STOP);
|
can_led_event(dev, CAN_LED_EVENT_STOP);
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1529,8 +1535,10 @@ static int register_mttcan_dev(struct net_device *dev)
|
|||||||
|
|
||||||
dev->netdev_ops = &mttcan_netdev_ops;
|
dev->netdev_ops = &mttcan_netdev_ops;
|
||||||
err = register_candev(dev);
|
err = register_candev(dev);
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(6,0,0)
|
||||||
if (!err)
|
if (!err)
|
||||||
devm_can_led_init(dev);
|
devm_can_led_init(dev);
|
||||||
|
#endif
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user