.. | .. |
---|
19 | 19 | #include <linux/platform_device.h> |
---|
20 | 20 | #include <linux/of.h> |
---|
21 | 21 | #include <linux/of_device.h> |
---|
22 | | -#include <linux/of_irq.h> |
---|
23 | 22 | #include <linux/pinctrl/pinctrl.h> |
---|
24 | 23 | |
---|
25 | 24 | #include "pinctrl-sunxi.h" |
---|
.. | .. |
---|
549 | 548 | |
---|
550 | 549 | static int sun50i_h5_pinctrl_probe(struct platform_device *pdev) |
---|
551 | 550 | { |
---|
552 | | - switch (of_irq_count(pdev->dev.of_node)) { |
---|
| 551 | + int ret; |
---|
| 552 | + |
---|
| 553 | + ret = platform_irq_count(pdev); |
---|
| 554 | + if (ret < 0) { |
---|
| 555 | + if (ret != -EPROBE_DEFER) |
---|
| 556 | + dev_err(&pdev->dev, "Couldn't determine irq count: %pe\n", |
---|
| 557 | + ERR_PTR(ret)); |
---|
| 558 | + return ret; |
---|
| 559 | + } |
---|
| 560 | + |
---|
| 561 | + switch (ret) { |
---|
553 | 562 | case 2: |
---|
554 | 563 | dev_warn(&pdev->dev, |
---|
555 | 564 | "Your device tree's pinctrl node is broken, which has no IRQ of PG bank routed.\n"); |
---|