Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit da0bcb4e authored by Geliang Tang's avatar Geliang Tang Committed by David S. Miller
Browse files

net: hns: use to_platform_device()



Use to_platform_device() instead of open-coding it.

Signed-off-by: default avatarGeliang Tang <geliangtang@163.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bd0ed561
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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++) {