Commit f93b30e5 authored by Jiasheng Jiang's avatar Jiasheng Jiang Committed by David S. Miller

net: systemport: Replace platform_get_irq with platform_get_irq_optional

Replace platform_get_irq with platform_get_irq_optional because wol_irq
is optional.
Signed-off-by: default avatarJiasheng Jiang <jiasheng@iscas.ac.cn>
Reviewed-by: default avatarFlorian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e209fee4
......@@ -2531,9 +2531,9 @@ static int bcm_sysport_probe(struct platform_device *pdev)
priv->irq0 = platform_get_irq(pdev, 0);
if (!priv->is_lite) {
priv->irq1 = platform_get_irq(pdev, 1);
priv->wol_irq = platform_get_irq(pdev, 2);
priv->wol_irq = platform_get_irq_optional(pdev, 2);
} else {
priv->wol_irq = platform_get_irq(pdev, 1);
priv->wol_irq = platform_get_irq_optional(pdev, 1);
}
if (priv->irq0 <= 0 || (priv->irq1 <= 0 && !priv->is_lite)) {
ret = -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment