USB: dwc3: qcom: simplify wakeup interrupt setup
authorJohan Hovold <johan+linaro@kernel.org>
Mon, 20 Nov 2023 16:16:07 +0000 (17:16 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Nov 2023 12:14:25 +0000 (12:14 +0000)
Use the IRQF_NO_AUTOEN irq flag when requesting the wakeup interrupts
instead of setting it separately.

No functional change intended.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
Link: https://lore.kernel.org/r/20231120161607.7405-4-johan+linaro@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc3/dwc3-qcom.c

index cf200342273afe3a1a53df16235a0e91fe564756..8a76973f1fa2b2362cb8935453700da08480c568 100644 (file)
@@ -546,10 +546,9 @@ static int dwc3_qcom_setup_irq(struct platform_device *pdev)
                                pdata ? pdata->hs_phy_irq_index : -1);
        if (irq > 0) {
                /* Keep wakeup interrupts disabled until suspend */
-               irq_set_status_flags(irq, IRQ_NOAUTOEN);
                ret = devm_request_threaded_irq(qcom->dev, irq, NULL,
                                        qcom_dwc3_resume_irq,
-                                       IRQF_ONESHOT,
+                                       IRQF_ONESHOT | IRQF_NO_AUTOEN,
                                        "qcom_dwc3 HS", qcom);
                if (ret) {
                        dev_err(qcom->dev, "hs_phy_irq failed: %d\n", ret);
@@ -561,10 +560,9 @@ static int dwc3_qcom_setup_irq(struct platform_device *pdev)
        irq = dwc3_qcom_get_irq(pdev, "dp_hs_phy_irq",
                                pdata ? pdata->dp_hs_phy_irq_index : -1);
        if (irq > 0) {
-               irq_set_status_flags(irq, IRQ_NOAUTOEN);
                ret = devm_request_threaded_irq(qcom->dev, irq, NULL,
                                        qcom_dwc3_resume_irq,
-                                       IRQF_ONESHOT,
+                                       IRQF_ONESHOT | IRQF_NO_AUTOEN,
                                        "qcom_dwc3 DP_HS", qcom);
                if (ret) {
                        dev_err(qcom->dev, "dp_hs_phy_irq failed: %d\n", ret);
@@ -576,10 +574,9 @@ static int dwc3_qcom_setup_irq(struct platform_device *pdev)
        irq = dwc3_qcom_get_irq(pdev, "dm_hs_phy_irq",
                                pdata ? pdata->dm_hs_phy_irq_index : -1);
        if (irq > 0) {
-               irq_set_status_flags(irq, IRQ_NOAUTOEN);
                ret = devm_request_threaded_irq(qcom->dev, irq, NULL,
                                        qcom_dwc3_resume_irq,
-                                       IRQF_ONESHOT,
+                                       IRQF_ONESHOT | IRQF_NO_AUTOEN,
                                        "qcom_dwc3 DM_HS", qcom);
                if (ret) {
                        dev_err(qcom->dev, "dm_hs_phy_irq failed: %d\n", ret);
@@ -591,10 +588,9 @@ static int dwc3_qcom_setup_irq(struct platform_device *pdev)
        irq = dwc3_qcom_get_irq(pdev, "ss_phy_irq",
                                pdata ? pdata->ss_phy_irq_index : -1);
        if (irq > 0) {
-               irq_set_status_flags(irq, IRQ_NOAUTOEN);
                ret = devm_request_threaded_irq(qcom->dev, irq, NULL,
                                        qcom_dwc3_resume_irq,
-                                       IRQF_ONESHOT,
+                                       IRQF_ONESHOT | IRQF_NO_AUTOEN,
                                        "qcom_dwc3 SS", qcom);
                if (ret) {
                        dev_err(qcom->dev, "ss_phy_irq failed: %d\n", ret);