linux/drivers/net/can/m_can
Marc Kleine-Budde c6b7348924 can: m_can: use struct m_can_classdev as drvdata
The m_can driver's suspend and resume functions (m_can_class_suspend() and
m_can_class_resume()) make use of dev_get_drvdata() and assume that the drvdata
is a pointer to the struct net_device.

With upcoming conversion of the tcan4x5x driver to pm_runtime this assumption
is no longer valid. As the suspend and resume functions actually need a struct
m_can_classdev pointer, change the m_can_platform and the m_can_pci driver to
hold a pointer to struct m_can_classdev instead, as the tcan4x5x driver already
does.

Link: https://lore.kernel.org/r/20201212175518.139651-8-mkl@pengutronix.de
Reviewed-by: Sean Nyekjaer <sean@geanix.com>
Reviewed-by: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2020-12-14 14:24:17 +01:00
..
Kconfig can: m_can: add PCI glue driver for Intel Elkhart Lake 2020-12-10 10:40:10 +01:00
m_can_pci.c can: m_can: use struct m_can_classdev as drvdata 2020-12-14 14:24:17 +01:00
m_can_platform.c can: m_can: use struct m_can_classdev as drvdata 2020-12-14 14:24:17 +01:00
m_can.c can: m_can: use struct m_can_classdev as drvdata 2020-12-14 14:24:17 +01:00
m_can.h can: m_can: let m_can_class_allocate_dev() allocate driver specific private data 2020-12-14 14:24:14 +01:00
Makefile can: m_can: add PCI glue driver for Intel Elkhart Lake 2020-12-10 10:40:10 +01:00
tcan4x5x.c can: m_can: let m_can_class_allocate_dev() allocate driver specific private data 2020-12-14 14:24:14 +01:00