Skip to content
Commit 87d04409 authored by Tom Lendacky's avatar Tom Lendacky Committed by Herbert Xu
Browse files

crypto: ccp - Fix device IRQ counting by using platform_irq_count()



The ccp driver loops through the platform device resources array to get
the IRQ count for the device. With commit a1a2b712 ("of/platform: Drop
static setup of IRQ resource from DT core"), the IRQ resources are no
longer stored in the platform device resource array. As a result, the IRQ
count is now always zero. This causes the driver to issue a second call to
platform_get_irq(), which fails if the IRQ count is really 1, causing the
loading of the driver to fail.

Replace looping through the resources array to count the number of IRQs
with a call to platform_irq_count().

Fixes: a1a2b712 ("of/platform: Drop static setup of IRQ resource from DT core")
Signed-off-by: default avatarTom Lendacky <thomas.lendacky@amd.com>
Reviewed-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent abfed87e
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