lantiq: fix use of IRQF_DISABLED in lantiq kmods
authorJohn Crispin <john@openwrt.org>
Sun, 11 Oct 2015 16:24:43 +0000 (16:24 +0000)
committerJohn Crispin <john@openwrt.org>
Sun, 11 Oct 2015 16:24:43 +0000 (16:24 +0000)
The IRQF_DISABLED flag was removed in kernel 4.1 with commit
"genirq: Remove the deprecated 'IRQF_DISABLED' request_irq() flag entirely" [1].

Therefore the compilation of ltq-hcd and ltq-vmmc kmods fails.

[1] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=d8bf368d0631d4bc2612d8bf2e4e8e74e620d0cc

Signed-off-by: Mathias Kresin <openwrt@kresin.me>
SVN-Revision: 47180

package/kernel/lantiq/ltq-hcd/src/ifxhcd.c
package/kernel/lantiq/ltq-hcd/src/ifxusb_cif_h.c
package/kernel/lantiq/ltq-vmmc/patches/200-compat.patch [new file with mode: 0644]
package/kernel/lantiq/ltq-vmmc/patches/200-linux-310.patch [deleted file]
package/kernel/lantiq/ltq-vmmc/patches/400-falcon.patch
target/linux/lantiq/patches-4.1/0031-I2C-MIPS-lantiq-add-FALC-ON-i2c-bus-master.patch

index be0a91d..3fb00e0 100644 (file)
@@ -701,10 +701,7 @@ int ifxhcd_init(ifxhcd_hcd_t *_ifxhcd)
         * allocates the DMA buffer pool, registers the USB bus, requests the
         * IRQ line, and calls ifxusb_hcd_start method.
         */
         * allocates the DMA buffer pool, registers the USB bus, requests the
         * IRQ line, and calls ifxusb_hcd_start method.
         */
-       retval = usb_add_hcd(syshcd, _ifxhcd->core_if.irq, 0
-                                                          |IRQF_DISABLED
-                                                          |IRQF_SHARED
-                                                          );
+       retval = usb_add_hcd(syshcd, _ifxhcd->core_if.irq, 0 | IRQF_SHARED);
        if (retval < 0)
                goto error2;
 
        if (retval < 0)
                goto error2;
 
index e9e67bf..1fcdebf 100644 (file)
@@ -778,7 +778,6 @@ void ifxusb_vbus_free(ifxusb_core_if_t *_core_if)
                        //                                           | IRQF_TRIGGER_HIGH
                        //                                           | IRQF_TRIGGER_LOW
                        //                                           | IRQF_TRIGGER_PROBE
                        //                                           | IRQF_TRIGGER_HIGH
                        //                                           | IRQF_TRIGGER_LOW
                        //                                           | IRQF_TRIGGER_PROBE
-                                                                    | IRQF_DISABLED
                        //                                           | IRQF_SAMPLE_RANDOM
                        //                                           | IRQF_SHARED
                                                                     | IRQF_PROBE_SHARED
                        //                                           | IRQF_SAMPLE_RANDOM
                        //                                           | IRQF_SHARED
                                                                     | IRQF_PROBE_SHARED
@@ -806,7 +805,6 @@ void ifxusb_vbus_free(ifxusb_core_if_t *_core_if)
                        //                                           | IRQF_TRIGGER_HIGH
                        //                                           | IRQF_TRIGGER_LOW
                        //                                           | IRQF_TRIGGER_PROBE
                        //                                           | IRQF_TRIGGER_HIGH
                        //                                           | IRQF_TRIGGER_LOW
                        //                                           | IRQF_TRIGGER_PROBE
-                                                                    | IRQF_DISABLED
                        //                                           | IRQF_SAMPLE_RANDOM
                        //                                           | IRQF_SHARED
                                                                     | IRQF_PROBE_SHARED
                        //                                           | IRQF_SAMPLE_RANDOM
                        //                                           | IRQF_SHARED
                                                                     | IRQF_PROBE_SHARED
@@ -1009,7 +1007,6 @@ void ifxusb_vbus_free(ifxusb_core_if_t *_core_if)
                //                                        | IRQF_TRIGGER_HIGH
                //                                        | IRQF_TRIGGER_LOW
                //                                        | IRQF_TRIGGER_PROBE
                //                                        | IRQF_TRIGGER_HIGH
                //                                        | IRQF_TRIGGER_LOW
                //                                        | IRQF_TRIGGER_PROBE
-                                                         | IRQF_DISABLED
                //                                        | IRQF_SAMPLE_RANDOM
                //                                        | IRQF_SHARED
                                                          | IRQF_PROBE_SHARED
                //                                        | IRQF_SAMPLE_RANDOM
                //                                        | IRQF_SHARED
                                                          | IRQF_PROBE_SHARED
@@ -1174,7 +1171,6 @@ void ifxusb_vbus_free(ifxusb_core_if_t *_core_if)
        //                                        | IRQF_TRIGGER_HIGH
        //                                        | IRQF_TRIGGER_LOW
        //                                        | IRQF_TRIGGER_PROBE
        //                                        | IRQF_TRIGGER_HIGH
        //                                        | IRQF_TRIGGER_LOW
        //                                        | IRQF_TRIGGER_PROBE
-                                                 | IRQF_DISABLED
        //                                        | IRQF_SAMPLE_RANDOM
        //                                        | IRQF_SHARED
        //                                        | IRQF_PROBE_SHARED
        //                                        | IRQF_SAMPLE_RANDOM
        //                                        | IRQF_SHARED
        //                                        | IRQF_PROBE_SHARED
diff --git a/package/kernel/lantiq/ltq-vmmc/patches/200-compat.patch b/package/kernel/lantiq/ltq-vmmc/patches/200-compat.patch
new file mode 100644 (file)
index 0000000..70010c6
--- /dev/null
@@ -0,0 +1,56 @@
+--- a/src/drv_vmmc_linux.c
++++ b/src/drv_vmmc_linux.c
+@@ -54,6 +54,8 @@
+ #include "drv_vmmc_res.h"
+ #endif /* (VMMC_CFG_FEATURES & VMMC_FEAT_HDLC) */
+
++#undef VMMC_USE_PROC
++
+ /* ============================= */
+ /* Local Macros & Definitions    */
+ /* ============================= */
+--- a/src/mps/drv_mps_vmmc_linux.c
++++ b/src/mps/drv_mps_vmmc_linux.c
+@@ -80,11 +80,15 @@
+ /* ============================= */
+ #define IFX_MPS_DEV_NAME       "ifx_mps"
+
++#undef CONFIG_MPS_HISTORY_SIZE
++#define CONFIG_MPS_HISTORY_SIZE 0
+ #ifndef CONFIG_MPS_HISTORY_SIZE
+ #define CONFIG_MPS_HISTORY_SIZE 128
+ #warning CONFIG_MPS_HISTORY_SIZE should have been set via cofigure - setting to default 128
+ #endif
+
++#undef CONFIG_PROC_FS
++
+ /* ============================= */
+ /* Global variable definition    */
+ /* ============================= */
+@@ -2257,7 +2261,7 @@ IFX_int32_t __init ifx_mps_init_module (
+    ifx_mps_reset ();
+    result = request_irq (INT_NUM_IM4_IRL18,
+ #ifdef LINUX_2_6
+-                         ifx_mps_ad0_irq, IRQF_DISABLED
++                         ifx_mps_ad0_irq, 0x0
+ #else /* */
+                          (irqreturn_t (*)(int, IFX_void_t *, struct pt_regs *))
+                          ifx_mps_ad0_irq, SA_INTERRUPT
+@@ -2267,7 +2271,7 @@ IFX_int32_t __init ifx_mps_init_module (
+       return result;
+    result = request_irq (INT_NUM_IM4_IRL19,
+ #ifdef LINUX_2_6
+-                         ifx_mps_ad1_irq, IRQF_DISABLED
++                         ifx_mps_ad1_irq, 0x0
+ #else /* */
+                          (irqreturn_t (*)(int, IFX_void_t *, struct pt_regs *))
+                          ifx_mps_ad1_irq, SA_INTERRUPT
+@@ -2282,7 +2286,7 @@ IFX_int32_t __init ifx_mps_init_module (
+       sprintf (&voice_channel_int_name[i][0], "mps_mbx vc%d", i);
+       result = request_irq (INT_NUM_IM4_IRL14 + i,
+ #ifdef LINUX_2_6
+-                            ifx_mps_vc_irq, IRQF_DISABLED
++                            ifx_mps_vc_irq, 0x0
+ #else /* */
+                             (irqreturn_t (*)
+                              (int, IFX_void_t *,
diff --git a/package/kernel/lantiq/ltq-vmmc/patches/200-linux-310.patch b/package/kernel/lantiq/ltq-vmmc/patches/200-linux-310.patch
deleted file mode 100644 (file)
index 70f8829..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-Index: drv_vmmc-1.9.0/src/drv_vmmc_linux.c
-===================================================================
---- drv_vmmc-1.9.0.orig/src/drv_vmmc_linux.c   2013-09-05 22:34:31.920428685 +0200
-+++ drv_vmmc-1.9.0/src/drv_vmmc_linux.c        2013-09-05 22:35:54.940430772 +0200
-@@ -54,6 +54,8 @@
- #include "drv_vmmc_res.h"
- #endif /* (VMMC_CFG_FEATURES & VMMC_FEAT_HDLC) */
-+#undef VMMC_USE_PROC
-+
- /* ============================= */
- /* Local Macros & Definitions    */
- /* ============================= */
-Index: drv_vmmc-1.9.0/src/mps/drv_mps_vmmc_linux.c
-===================================================================
---- drv_vmmc-1.9.0.orig/src/mps/drv_mps_vmmc_linux.c   2013-09-05 22:34:31.988428687 +0200
-+++ drv_vmmc-1.9.0/src/mps/drv_mps_vmmc_linux.c        2013-09-05 22:54:01.544458009 +0200
-@@ -80,11 +80,15 @@
- /* ============================= */
- #define IFX_MPS_DEV_NAME       "ifx_mps"
-+#undef CONFIG_MPS_HISTORY_SIZE
-+#define CONFIG_MPS_HISTORY_SIZE 0
- #ifndef CONFIG_MPS_HISTORY_SIZE
- #define CONFIG_MPS_HISTORY_SIZE 128
- #warning CONFIG_MPS_HISTORY_SIZE should have been set via cofigure - setting to default 128
- #endif
-+#undef CONFIG_PROC_FS
-+
- /* ============================= */
- /* Global variable definition    */
- /* ============================= */
index 490d6e5..d2afc65 100644 (file)
  #define IFX_MPS_PLATFORM_NAME "MIPS24KEc"
 --- a/src/mps/drv_mps_vmmc_linux.c
 +++ b/src/mps/drv_mps_vmmc_linux.c
  #define IFX_MPS_PLATFORM_NAME "MIPS24KEc"
 --- a/src/mps/drv_mps_vmmc_linux.c
 +++ b/src/mps/drv_mps_vmmc_linux.c
-@@ -2225,7 +2225,7 @@ IFX_int32_t __init ifx_mps_init_module (
+@@ -2229,7 +2229,7 @@ IFX_int32_t __init ifx_mps_init_module (
  #if defined(CONFIG_MIPS) && !defined(CONFIG_MIPS_UNCACHED)
  #if defined(SYSTEM_DANUBE)
     bDoCacheOps = IFX_TRUE; /* on Danube always perform cache ops */
  #if defined(CONFIG_MIPS) && !defined(CONFIG_MIPS_UNCACHED)
  #if defined(SYSTEM_DANUBE)
     bDoCacheOps = IFX_TRUE; /* on Danube always perform cache ops */
     /* on AR9/VR9 cache is configured by BSP;
        here we check whether the D-cache is shared or partitioned;
        1) in case of shared D-cache all cache operations are omitted;
     /* on AR9/VR9 cache is configured by BSP;
        here we check whether the D-cache is shared or partitioned;
        1) in case of shared D-cache all cache operations are omitted;
-@@ -2255,7 +2255,8 @@ IFX_int32_t __init ifx_mps_init_module (
+@@ -2259,7 +2259,8 @@ IFX_int32_t __init ifx_mps_init_module (
  
     /* reset the device before initializing the device driver */
     ifx_mps_reset ();
  
     /* reset the device before initializing the device driver */
     ifx_mps_reset ();
 +
 +  result = request_irq (INT_NUM_IM4_IRL18,
  #ifdef LINUX_2_6
 +
 +  result = request_irq (INT_NUM_IM4_IRL18,
  #ifdef LINUX_2_6
-                          ifx_mps_ad0_irq, IRQF_DISABLED
+                          ifx_mps_ad0_irq, 0x0
  #else /* */
  #else /* */
-@@ -2396,7 +2397,7 @@ IFX_int32_t __init ifx_mps_init_module (
+@@ -2400,7 +2401,7 @@ IFX_int32_t __init ifx_mps_init_module (
     if (result = ifx_mps_init_gpt_danube ())
        return result;
  #endif /*DANUBE*/
     if (result = ifx_mps_init_gpt_danube ())
        return result;
  #endif /*DANUBE*/
     pMPSDev->event.MPS_Ad1Reg.val = MPS_Ad1StatusReg.val;
  
     /* use callback function or queue wake up to notify about data reception */
     pMPSDev->event.MPS_Ad1Reg.val = MPS_Ad1StatusReg.val;
  
     /* use callback function or queue wake up to notify about data reception */
-@@ -2977,11 +2990,13 @@ irqreturn_t ifx_mps_vc_irq (IFX_int32_t 
+@@ -2977,11 +2990,13 @@ irqreturn_t ifx_mps_vc_irq (IFX_int32_t
     IFX_MPS_CVC0SR[chan] = MPS_VCStatusReg.val;
     /* handle only enabled interrupts */
     MPS_VCStatusReg.val &= IFX_MPS_VC0ENR[chan];
     IFX_MPS_CVC0SR[chan] = MPS_VCStatusReg.val;
     /* handle only enabled interrupts */
     MPS_VCStatusReg.val &= IFX_MPS_VC0ENR[chan];
index 164c947..0fe9f04 100644 (file)
@@ -668,7 +668,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
 +      priv->irq_lb = irqres[0].start;
 +
 +      ret = devm_request_irq(&pdev->dev, irqres[0].start, ltq_i2c_isr_burst,
 +      priv->irq_lb = irqres[0].start;
 +
 +      ret = devm_request_irq(&pdev->dev, irqres[0].start, ltq_i2c_isr_burst,
-+              IRQF_DISABLED, "i2c lb", priv);
++              0x0, "i2c lb", priv);
 +      if (ret) {
 +              dev_err(&pdev->dev, "can't get last burst IRQ %d\n",
 +                      irqres[0].start);
 +      if (ret) {
 +              dev_err(&pdev->dev, "can't get last burst IRQ %d\n",
 +                      irqres[0].start);
@@ -676,7 +676,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
 +      }
 +
 +      ret = devm_request_irq(&pdev->dev, irqres[1].start, ltq_i2c_isr_burst,
 +      }
 +
 +      ret = devm_request_irq(&pdev->dev, irqres[1].start, ltq_i2c_isr_burst,
-+              IRQF_DISABLED, "i2c b", priv);
++              0x0, "i2c b", priv);
 +      if (ret) {
 +              dev_err(&pdev->dev, "can't get burst IRQ %d\n",
 +                      irqres[1].start);
 +      if (ret) {
 +              dev_err(&pdev->dev, "can't get burst IRQ %d\n",
 +                      irqres[1].start);
@@ -684,7 +684,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
 +      }
 +
 +      ret = devm_request_irq(&pdev->dev, irqres[2].start, ltq_i2c_isr,
 +      }
 +
 +      ret = devm_request_irq(&pdev->dev, irqres[2].start, ltq_i2c_isr,
-+              IRQF_DISABLED, "i2c err", priv);
++              0x0, "i2c err", priv);
 +      if (ret) {
 +              dev_err(&pdev->dev, "can't get error IRQ %d\n",
 +                      irqres[2].start);
 +      if (ret) {
 +              dev_err(&pdev->dev, "can't get error IRQ %d\n",
 +                      irqres[2].start);
@@ -692,7 +692,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
 +      }
 +
 +      ret = devm_request_irq(&pdev->dev, irqres[3].start, ltq_i2c_isr,
 +      }
 +
 +      ret = devm_request_irq(&pdev->dev, irqres[3].start, ltq_i2c_isr,
-+              IRQF_DISABLED, "i2c p", priv);
++              0x0, "i2c p", priv);
 +      if (ret) {
 +              dev_err(&pdev->dev, "can't get protocol IRQ %d\n",
 +                      irqres[3].start);
 +      if (ret) {
 +              dev_err(&pdev->dev, "can't get protocol IRQ %d\n",
 +                      irqres[3].start);