[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1476717288-12588-1-git-send-email-weiyj.lk@gmail.com>
Date: Mon, 17 Oct 2016 15:14:48 +0000
From: Wei Yongjun <weiyj.lk@...il.com>
To: Roy Pledge <roy.pledge@....com>, Scott Wood <oss@...error.net>,
Claudiu Manoil <claudiu.manoil@....com>
Cc: Wei Yongjun <weiyongjun1@...wei.com>, linux-kernel@...r.kernel.org
Subject: [PATCH -next] soc/qman_test: Use platform_device_unregister in allocate_frame_data()
From: Wei Yongjun <weiyongjun1@...wei.com>
platform_device_unregister() only calls platform_device_del() and
platform_device_put(), thus use platform_device_unregister() to
simplify the code.
Signed-off-by: Wei Yongjun <weiyongjun1@...wei.com>
---
drivers/soc/fsl/qbman/qman_test_stash.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/soc/fsl/qbman/qman_test_stash.c b/drivers/soc/fsl/qbman/qman_test_stash.c
index 43cf66b..dbe1ff8 100644
--- a/drivers/soc/fsl/qbman/qman_test_stash.c
+++ b/drivers/soc/fsl/qbman/qman_test_stash.c
@@ -231,8 +231,7 @@ static int allocate_frame_data(void)
}
frame_dma = dma_map_single(&pdev->dev, frame_ptr, 4 * HP_NUM_WORDS,
DMA_BIDIRECTIONAL);
- platform_device_del(pdev);
- platform_device_put(pdev);
+ platform_device_unregister(pdev);
return 0;
}
Powered by blists - more mailing lists