mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 20:33:58 -04:00
can: m_can: m_can_class_free_dev(): introduce new function
[ Upstream commit a8c22f5b0c689a29f45ef4a110d09fd391debcbc ]
This patch creates a common function that peripherials can call to free the
netdev device when failures occur.
Fixes: f524f829b7 ("can: m_can: Create a m_can platform framework")
Reported-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Dan Murphy <dmurphy@ti.com>
Link: http://lore.kernel.org/r/20200227183829.21854-2-dmurphy@ti.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
9b0596c07d
commit
db2f5579e7
2 changed files with 7 additions and 0 deletions
|
|
@ -1764,6 +1764,12 @@ out:
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(m_can_class_allocate_dev);
|
||||
|
||||
void m_can_class_free_dev(struct net_device *net)
|
||||
{
|
||||
free_candev(net);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(m_can_class_free_dev);
|
||||
|
||||
int m_can_class_register(struct m_can_classdev *m_can_dev)
|
||||
{
|
||||
int ret;
|
||||
|
|
|
|||
|
|
@ -99,6 +99,7 @@ struct m_can_classdev {
|
|||
};
|
||||
|
||||
struct m_can_classdev *m_can_class_allocate_dev(struct device *dev);
|
||||
void m_can_class_free_dev(struct net_device *net);
|
||||
int m_can_class_register(struct m_can_classdev *cdev);
|
||||
void m_can_class_unregister(struct m_can_classdev *cdev);
|
||||
int m_can_class_get_clocks(struct m_can_classdev *cdev);
|
||||
|
|
|
|||
Loading…
Reference in a new issue