diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2020-11-30 16:37:13 +0300 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2020-11-30 16:55:41 +0300 |
commit | 6d9986b46fc12f4a36fc243698deb774323b76f3 (patch) | |
tree | 25907951504d584137849d37246c926be56b4f68 /drivers/net/can/m_can | |
parent | ba844cb96f7735cbfea925c5fc723d8d769d5c51 (diff) | |
download | linux-6d9986b46fc12f4a36fc243698deb774323b76f3.tar.xz |
can: m_can: m_can_class_unregister(): move right after m_can_class_register()
This patch moves the function m_can_class_unregister() directly after the
m_can_class_register() function.
Link: https://lore.kernel.org/r/20201130133713.269256-7-mkl@pengutronix.de
Reviewed-by: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can/m_can')
-rw-r--r-- | drivers/net/can/m_can/m_can.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c index 553ff39199aa..05c978d1c53d 100644 --- a/drivers/net/can/m_can/m_can.c +++ b/drivers/net/can/m_can/m_can.c @@ -1869,6 +1869,14 @@ pm_runtime_fail: } EXPORT_SYMBOL_GPL(m_can_class_register); +void m_can_class_unregister(struct m_can_classdev *m_can_dev) +{ + unregister_candev(m_can_dev->net); + + m_can_clk_stop(m_can_dev); +} +EXPORT_SYMBOL_GPL(m_can_class_unregister); + int m_can_class_suspend(struct device *dev) { struct net_device *ndev = dev_get_drvdata(dev); @@ -1915,14 +1923,6 @@ int m_can_class_resume(struct device *dev) } EXPORT_SYMBOL_GPL(m_can_class_resume); -void m_can_class_unregister(struct m_can_classdev *m_can_dev) -{ - unregister_candev(m_can_dev->net); - - m_can_clk_stop(m_can_dev); -} -EXPORT_SYMBOL_GPL(m_can_class_unregister); - MODULE_AUTHOR("Dong Aisheng <b29396@freescale.com>"); MODULE_AUTHOR("Dan Murphy <dmurphy@ti.com>"); MODULE_LICENSE("GPL v2"); |