summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorGeliang Tang <geliangtang@163.com>2015-12-27 21:15:44 +0800
committerDavid S. Miller <davem@davemloft.net>2015-12-29 15:32:25 -0500
commitda0bcb4e36411c1e9e327359c36507e2e04964a1 (patch)
treeb12bc697d5cd54e42f97bb2122bbf345892aa7aa /drivers
parentbd0ed561356db935d0b5a68e2be32d976e6963c4 (diff)
net: hns: use to_platform_device()
Use to_platform_device() instead of open-coding it. Signed-off-by: Geliang Tang <geliangtang@163.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c
index 8c30cec8850a..d2263c72bd8a 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c
@@ -499,8 +499,7 @@ void hns_rcb_get_cfg(struct rcb_common_cb *rcb_common)
int base_irq_idx = hns_rcb_get_base_irq_idx(rcb_common);
struct device_node *np = rcb_common->dsaf_dev->dev->of_node;
struct platform_device *pdev =
- container_of(rcb_common->dsaf_dev->dev,
- struct platform_device, dev);
+ to_platform_device(rcb_common->dsaf_dev->dev);
bool is_ver1 = AE_IS_VER1(rcb_common->dsaf_dev->dsaf_ver);
for (i = 0; i < ring_num; i++) {