forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f9004dbfff8a3fbbd7e2a88c8a4327c7f2f8e5b2
kernel/drivers/pinctrl/sunxi/pinctrl-sun50i-h5.c
....@@ -19,7 +19,6 @@
1919 #include <linux/platform_device.h>
2020 #include <linux/of.h>
2121 #include <linux/of_device.h>
22
-#include <linux/of_irq.h>
2322 #include <linux/pinctrl/pinctrl.h>
2423
2524 #include "pinctrl-sunxi.h"
....@@ -549,7 +548,17 @@
549548
550549 static int sun50i_h5_pinctrl_probe(struct platform_device *pdev)
551550 {
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) {
553562 case 2:
554563 dev_warn(&pdev->dev,
555564 "Your device tree's pinctrl node is broken, which has no IRQ of PG bank routed.\n");