提交 7bb8c996 编写于 作者: A Andrew Lunn 提交者: David S. Miller

net: dsa: mv88e6xxx: Be explicit about DT or pdata

Make it explicit that either device tree is used or platform data.  If
neither is available, abort the probe.
Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
Fixes: 877b7cb0 ("net: dsa: mv88e6xxx: Add minimal platform_data support")
Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
Reviewed-by: NVivien Didelot <vivien.didelot@savoirfairelinux.com>
Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 e2b3e493
......@@ -4389,6 +4389,9 @@ static int mv88e6xxx_probe(struct mdio_device *mdiodev)
int port;
int err;
if (!np && !pdata)
return -EINVAL;
if (np)
compat_info = of_device_get_match_data(dev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册