From 6c1e423a3c84953edcf91ff03ab97829b287184a Mon Sep 17 00:00:00 2001 From: Oliver Hartkopp Date: Wed, 18 May 2022 17:45:27 +0200 Subject: can: can-dev: remove obsolete CAN LED support Since commit 30f3b42147ba6f ("can: mark led trigger as broken") the CAN specific LED support was disabled and marked as BROKEN. As the common LED support with CONFIG_LEDS_TRIGGER_NETDEV should do this work now the code can be removed as preparation for a CAN netdevice Kconfig rework. Link: https://lore.kernel.org/all/20220518154527.29046-1-socketcan@hartkopp.net Suggested-by: Vincent Mailhol Signed-off-by: Oliver Hartkopp [mkl: remove led.h from MAINTAINERS] Signed-off-by: Marc Kleine-Budde --- drivers/net/can/m_can/m_can.c | 11 ----------- drivers/net/can/m_can/m_can.h | 1 - 2 files changed, 12 deletions(-) (limited to 'drivers/net/can/m_can') diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c index 7582908e1192..5d0c82d8b9a9 100644 --- a/drivers/net/can/m_can/m_can.c +++ b/drivers/net/can/m_can/m_can.c @@ -565,9 +565,6 @@ static int m_can_do_rx_poll(struct net_device *dev, int quota) rxfs = m_can_read(cdev, M_CAN_RXF0S); } - if (pkts) - can_led_event(dev, CAN_LED_EVENT_RX); - return pkts; } @@ -1087,8 +1084,6 @@ static irqreturn_t m_can_isr(int irq, void *dev_id) if (cdev->is_peripheral) timestamp = m_can_get_timestamp(cdev); m_can_tx_update_stats(cdev, 0, timestamp); - - can_led_event(dev, CAN_LED_EVENT_TX); netif_wake_queue(dev); } } else { @@ -1097,7 +1092,6 @@ static irqreturn_t m_can_isr(int irq, void *dev_id) if (m_can_echo_tx_event(dev) != 0) goto out_fail; - can_led_event(dev, CAN_LED_EVENT_TX); if (netif_queue_stopped(dev) && !m_can_tx_fifo_full(cdev)) netif_wake_queue(dev); @@ -1562,7 +1556,6 @@ static int m_can_close(struct net_device *dev) can_rx_offload_disable(&cdev->offload); close_candev(dev); - can_led_event(dev, CAN_LED_EVENT_STOP); phy_power_off(cdev->transceiver); @@ -1806,8 +1799,6 @@ static int m_can_open(struct net_device *dev) /* start the m_can controller */ m_can_start(dev); - can_led_event(dev, CAN_LED_EVENT_OPEN); - if (!cdev->is_peripheral) napi_enable(&cdev->napi); @@ -1995,8 +1986,6 @@ int m_can_class_register(struct m_can_classdev *cdev) goto rx_offload_del; } - devm_can_led_init(cdev->net); - of_can_transceiver(cdev->net); dev_info(cdev->dev, "%s device registered (irq=%d, version=%d)\n", diff --git a/drivers/net/can/m_can/m_can.h b/drivers/net/can/m_can/m_can.h index d18b515e6ccc..4c0267f9f297 100644 --- a/drivers/net/can/m_can/m_can.h +++ b/drivers/net/can/m_can/m_can.h @@ -7,7 +7,6 @@ #define _CAN_M_CAN_H_ #include -#include #include #include #include -- cgit v1.2.3