net: mvmdio: Check for a valid interrupt instead of an error
authorEzequiel Garcia <ezequiel.garcia@free-electrons.com>
Wed, 30 Apr 2014 16:28:51 +0000 (13:28 -0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 2 May 2014 20:18:54 +0000 (16:18 -0400)
commit39076b047b160821110cb4deed13424ddfdf8d00
treeaabbab28ca9bfe23bcee95efefab4717d2d3fd87
parente46e08b843d8ff8c46ad8d7b0b95acaacc4e6195
net: mvmdio: Check for a valid interrupt instead of an error

The following commit:

commit 9ec36cafe43bf835f8f29273597a5b0cbc8267ef
Author: Rob Herring <robh@kernel.org>
Date:   Wed Apr 23 17:57:41 2014 -0500

    of/irq: do irq resolution in platform_get_irq

changed platform_get_irq() which now returns EINVAL and EPROBE_DEFER,
in addition to ENXIO. If there's no interrupt for mvmdio, platform_get_irq()
returns EINVAL, but we currently check only for ENXIO.

Fix this by looking for a positive integer, which is the proper way of
validating a virtual interrupt number.

While at it, add a proper handling for the deferral probe case.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Reviewed-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvmdio.c