Skip to content

Commit f5da5dd

Browse files
committed
Merge tag 'v5.19-p3' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fix from Herbert Xu: "Fix a regression that breaks the ccp driver" * tag 'v5.19-p3' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: ccp - Fix device IRQ counting by using platform_irq_count()
2 parents d9b2ba6 + 87d0440 commit f5da5dd

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

drivers/crypto/ccp/sp-platform.c

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -85,17 +85,9 @@ static int sp_get_irqs(struct sp_device *sp)
8585
struct sp_platform *sp_platform = sp->dev_specific;
8686
struct device *dev = sp->dev;
8787
struct platform_device *pdev = to_platform_device(dev);
88-
unsigned int i, count;
8988
int ret;
9089

91-
for (i = 0, count = 0; i < pdev->num_resources; i++) {
92-
struct resource *res = &pdev->resource[i];
93-
94-
if (resource_type(res) == IORESOURCE_IRQ)
95-
count++;
96-
}
97-
98-
sp_platform->irq_count = count;
90+
sp_platform->irq_count = platform_irq_count(pdev);
9991

10092
ret = platform_get_irq(pdev, 0);
10193
if (ret < 0) {
@@ -104,7 +96,7 @@ static int sp_get_irqs(struct sp_device *sp)
10496
}
10597

10698
sp->psp_irq = ret;
107-
if (count == 1) {
99+
if (sp_platform->irq_count == 1) {
108100
sp->ccp_irq = ret;
109101
} else {
110102
ret = platform_get_irq(pdev, 1);

0 commit comments

Comments
 (0)