Skip to contentSkip to conversation

soc/qman: Use platform_device_unregister in qman_destroy_portal()

PATCH New Wei Yongjun 1 participant 1 message Oct 17, 2016 Freescale SoC drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 soc/qman: Use platform_device_unregister in qman_destroy_portal()

From: Wei Yongjun <[email protected]>

platform_device_unregister() only calls platform_device_del() and platform_device_put(), thus use platform_device_unregister() to simplify the code.

---
 drivers/soc/fsl/qbman/qman.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/soc/fsl/qbman/qman.c +1 -2
index 119054b..4cd7eff 100644
@@ -1321,8 +1321,7 @@ static void qman_destroy_portal(struct qman_portal *qm)
 	qm_dqrr_finish(&qm->p);
 	qm_eqcr_finish(&qm->p);
 
-	platform_device_del(qm->pdev);
-	platform_device_put(qm->pdev);
+	platform_device_unregister(qm->pdev);
 
 	qm->config = NULL;
 }