remoteproc: core: Fix cdev remove and rproc del
authorSiddharth Gupta <sidgup@codeaurora.org>
Tue, 15 Jun 2021 02:21:10 +0000 (19:21 -0700)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Wed, 23 Jun 2021 18:41:44 +0000 (13:41 -0500)
commit930eec0be20c93a53160c74005a1485a230e6911
tree60ac0147afd0aedcb9bbaca7b7a7133f18517674
parent519346ecabd3c1d5821f076b5df1695ecfabe2f6
remoteproc: core: Fix cdev remove and rproc del

The rproc_char_device_remove() call currently unmaps the cdev
region instead of simply deleting the cdev that was added as a
part of the rproc_char_device_add() call. This change fixes that
behaviour, and also fixes the order in which device_del() and
cdev_del() need to be called.

Signed-off-by: Siddharth Gupta <sidgup@codeaurora.org>
Link: https://lore.kernel.org/r/1623723671-5517-4-git-send-email-sidgup@codeaurora.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
drivers/remoteproc/remoteproc_cdev.c
drivers/remoteproc/remoteproc_core.c