Skip to content

Commit

Permalink
net: hns: use to_platform_device()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Geliang Tang authored and David S. Miller committed Dec 29, 2015
1 parent bd0ed56 commit da0bcb4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down

0 comments on commit da0bcb4

Please sign in to comment.