]> err.no Git - linux-2.6/commitdiff
[ARM] pxa: fix mci_init functions returning -1
authorRussell King <rmk@dyn-67.arm.linux.org.uk>
Wed, 23 Jan 2008 14:05:58 +0000 (14:05 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 28 Jan 2008 13:13:26 +0000 (13:13 +0000)
Fix all those PXA mci_init functions which return -1 rather than
propagating the error code to the higher levels.  Remove the silly
set_irq_type() calls as well - use the flags for request_irq()
instead.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-pxa/cm-x270.c
arch/arm/mach-pxa/corgi.c
arch/arm/mach-pxa/mainstone.c
arch/arm/mach-pxa/poodle.c
arch/arm/mach-pxa/spitz.c
arch/arm/mach-pxa/tosa.c
arch/arm/mach-pxa/trizeps4.c

index a16349272f54db89e1c7fbfa1a846c57f2430047..28cfd71c032d2bf533621ef6f3503968e6668f7c 100644 (file)
@@ -487,18 +487,15 @@ static int cmx270_mci_init(struct device *dev,
 
        /* card detect IRQ on GPIO 83 */
        pxa_gpio_mode(IRQ_TO_GPIO(CMX270_MMC_IRQ));
-       set_irq_type(CMX270_MMC_IRQ, IRQT_FALLING);
 
        err = request_irq(CMX270_MMC_IRQ, cmx270_detect_int,
                          IRQF_DISABLED | IRQF_TRIGGER_FALLING,
                          "MMC card detect", data);
-       if (err) {
+       if (err)
                printk(KERN_ERR "cmx270_mci_init: MMC/SD: can't"
                       " request MMC card detect IRQ\n");
-               return -1;
-       }
 
-       return 0;
+       return err;
 }
 
 static void cmx270_mci_setpower(struct device *dev, unsigned int vdd)
index 7304fdbfbb0fe86beb602159b8ad86ea9f7dd32a..9292576b83b3fc9557bee7f2a54dcc89b3e500c1 100644 (file)
@@ -419,12 +419,10 @@ static int corgi_mci_init(struct device *dev, irq_handler_t corgi_detect_int, vo
        err = request_irq(CORGI_IRQ_GPIO_nSD_DETECT, corgi_detect_int,
                          IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
                          "MMC card detect", data);
-       if (err) {
+       if (err)
                printk(KERN_ERR "corgi_mci_init: MMC/SD: can't request MMC card detect IRQ\n");
-               return -1;
-       }
 
-       return 0;
+       return err;
 }
 
 static void corgi_mci_setpower(struct device *dev, unsigned int vdd)
index ac78dbd6a634b6cdf0d1faac889b15daabe646c2..345c3deeb02ef586eeae1628459ef16aa1cf7c6f 100644 (file)
@@ -379,12 +379,10 @@ static int mainstone_mci_init(struct device *dev, irq_handler_t mstone_detect_in
 
        err = request_irq(MAINSTONE_MMC_IRQ, mstone_detect_int, IRQF_DISABLED,
                             "MMC card detect", data);
-       if (err) {
+       if (err)
                printk(KERN_ERR "mainstone_mci_init: MMC/SD: can't request MMC card detect IRQ\n");
-               return -1;
-       }
 
-       return 0;
+       return err;
 }
 
 static void mainstone_mci_setpower(struct device *dev, unsigned int vdd)
index 655668d4d0e9936a0eb925fa1b8d292ecde31a0f..dd54496083cb2d7b89471d53a3e10ec6eb249cff 100644 (file)
@@ -215,12 +215,10 @@ static int poodle_mci_init(struct device *dev, irq_handler_t poodle_detect_int,
        err = request_irq(POODLE_IRQ_GPIO_nSD_DETECT, poodle_detect_int,
                          IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
                          "MMC card detect", data);
-       if (err) {
+       if (err)
                printk(KERN_ERR "poodle_mci_init: MMC/SD: can't request MMC card detect IRQ\n");
-               return -1;
-       }
 
-       return 0;
+       return err;
 }
 
 static void poodle_mci_setpower(struct device *dev, unsigned int vdd)
index bb4b65d352c9351c5eab910ebee90c98fbe62f79..5078edeadf9637ef0be1ca626e0043a0a3dcebc8 100644 (file)
@@ -374,12 +374,10 @@ static int spitz_mci_init(struct device *dev, irq_handler_t spitz_detect_int, vo
        err = request_irq(SPITZ_IRQ_GPIO_nSD_DETECT, spitz_detect_int,
                          IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
                          "MMC card detect", data);
-       if (err) {
+       if (err)
                printk(KERN_ERR "spitz_mci_init: MMC/SD: can't request MMC card detect IRQ\n");
-               return -1;
-       }
 
-       return 0;
+       return err;
 }
 
 static void spitz_mci_setpower(struct device *dev, unsigned int vdd)
index 240fd042083da10e6639f36c2b33dec5c2b8f895..1919756900f48daa9c12d64508a218a86f330f75 100644 (file)
@@ -184,16 +184,13 @@ static int tosa_mci_init(struct device *dev, irq_handler_t tosa_detect_int, void
 
        tosa_mci_platform_data.detect_delay = msecs_to_jiffies(250);
 
-       err = request_irq(TOSA_IRQ_GPIO_nSD_DETECT, tosa_detect_int, IRQF_DISABLED,
+       err = request_irq(TOSA_IRQ_GPIO_nSD_DETECT, tosa_detect_int,
+                         IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
                                "MMC/SD card detect", data);
-       if (err) {
+       if (err)
                printk(KERN_ERR "tosa_mci_init: MMC/SD: can't request MMC card detect IRQ\n");
-               return -1;
-       }
-
-       set_irq_type(TOSA_IRQ_GPIO_nSD_DETECT, IRQT_BOTHEDGE);
 
-       return 0;
+       return err;
 }
 
 static void tosa_mci_setpower(struct device *dev, unsigned int vdd)
index e4ba43bdf85d9756123e13bd105b1024ef42a240..853fc9433750efc0ea33987aa62df87a7ed237f6 100644 (file)
@@ -296,11 +296,10 @@ static int trizeps4_mci_init(struct device *dev, irq_handler_t mci_detect_int, v
        err = request_irq(TRIZEPS4_MMC_IRQ, mci_detect_int,
                          IRQF_DISABLED | IRQF_TRIGGER_RISING,
                          "MMC card detect", data);
-       if (err) {
+       if (err)
                printk(KERN_ERR "trizeps4_mci_init: MMC/SD: can't request MMC card detect IRQ\n");
-               return -1;
-       }
-       return 0;
+
+       return err;
 }
 
 static void trizeps4_mci_exit(struct device *dev, void *data)