platform_get_irq: Revert to platform_get_resource if of_irq_get fails
platform_get_irq: Revert to platform_get_resource if of_irq_get fails

Commits 9ec36ca (of/irq: do irq resolution in platform_get_irq)
and ad69674 (of/irq: do irq resolution in platform_get_irq_byname)
change the semantics of platform_get_irq and platform_get_irq_byname
to always rely on devicetree information if devicetree is enabled
and if a devicetree node is attached to the device. The functions
now return an error if the devicetree data does not include interrupt
information, even if the information is available as platform resource
data.

This causes mfd client drivers to fail if the interrupt number is
passed via platform resources. Therefore, if of_irq_get fails, try
platform_get_resource as method of last resort. This restores the
original functionality for drivers depending on platform resources
to get irq information.

Cc: Russell King <ba324ca7b1c77fc20bb970d5aff6eea9377918a5@arm.linux.org.uk>
Cc: Tony Lindgren <1001e8702733cced254345e193c88aaa47a4f5de@atomide.com>
Cc: Grant Likely <9069e6f5a2b566e2674a0ba1e2bf39c12c195fad@linaro.org>
Cc: Grygorii Strashko <bfa0a1520768723a1c60e18250fb841c342eb8d8@ti.com>
Signed-off-by: Guenter Roeck <ba324ca7b1c77fc20bb970d5aff6eea9377918a5@roeck-us.net>
Acked-by: Rob Herring <fbb37eacae100e13076d5c4b46f06cfa4d6fa9f8@kernel.org>
Cc: stable <4fbacc2fa0ffdbb11bf1ad6925b886ebd08dd15f@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <4645f7897fd33786a2ee1264d590b3c400559d85@linuxfoundation.org>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs