mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
of/irq: do irq resolution in platform_get_irq_byname()
The commit 9ec36cafe4
"of/irq: do irq resolution in platform_get_irq" from Rob Herring -
moves resolving of the interrupt resources in platform_get_irq().
But this solution isn't complete because platform_get_irq_byname()
need to be modified the same way.
Hence, fix it by adding interrupt resolution code at the
platform_get_irq_byname() function too.
Cc: Russell King <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Tony Lindgren <[email protected]>
Cc: Grant Likely <[email protected]>
Cc: Thierry Reding <[email protected]>
Signed-off-by: Grygorii Strashko <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
This commit is contained in:
parent
ae91ff72e9
commit
ad69674e73
3 changed files with 32 additions and 2 deletions
|
|
@ -131,9 +131,12 @@ EXPORT_SYMBOL_GPL(platform_get_resource_byname);
|
|||
*/
|
||||
int platform_get_irq_byname(struct platform_device *dev, const char *name)
|
||||
{
|
||||
struct resource *r = platform_get_resource_byname(dev, IORESOURCE_IRQ,
|
||||
name);
|
||||
struct resource *r;
|
||||
|
||||
if (IS_ENABLED(CONFIG_OF_IRQ) && dev->dev.of_node)
|
||||
return of_irq_get_byname(dev->dev.of_node, name);
|
||||
|
||||
r = platform_get_resource_byname(dev, IORESOURCE_IRQ, name);
|
||||
return r ? r->start : -ENXIO;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(platform_get_irq_byname);
|
||||
|
|
|
|||
Loading…
Reference in a new issue