]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
can: tcan4x5x: tcan4x5x_can_remove(): fix order of deregistration
authorMarc Kleine-Budde <mkl@pengutronix.de>
Mon, 10 Aug 2020 20:23:49 +0000 (22:23 +0200)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 20 Jan 2021 13:24:19 +0000 (14:24 +0100)
commit3c37354aca780662bb177d92dd8cebbc8f9fccfa
tree596fd773cfdbb7e04d48b5c30d5c8ab1f18d0328
parenta1399527e252511accbf0d4187aa50ee6c7acedf
can: tcan4x5x: tcan4x5x_can_remove(): fix order of deregistration

BugLink: https://bugs.launchpad.net/bugs/1908561
[ Upstream commit c81d0b6ca665477c761f227807010762630b089f ]

Change the order in tcan4x5x_can_remove() to be the exact inverse of
tcan4x5x_can_probe(). First m_can_class_unregister(), then power down the
device.

Fixes: 5443c226ba91 ("can: tcan4x5x: Add tcan4x5x driver to the kernel")
Cc: Dan Murphy <dmurphy@ti.com>
Link: http://lore.kernel.org/r/20201019154233.1262589-10-mkl@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Ian May <ian.may@canonical.com>
drivers/net/can/m_can/tcan4x5x.c