mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-18 10:34:24 +08:00
[ARM] pxa: fix mci_init functions returning -1
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>
This commit is contained in:
parent
ca4d6cfcee
commit
2687bd3857
@ -487,18 +487,15 @@ static int cmx270_mci_init(struct device *dev,
|
|||||||
|
|
||||||
/* card detect IRQ on GPIO 83 */
|
/* card detect IRQ on GPIO 83 */
|
||||||
pxa_gpio_mode(IRQ_TO_GPIO(CMX270_MMC_IRQ));
|
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,
|
err = request_irq(CMX270_MMC_IRQ, cmx270_detect_int,
|
||||||
IRQF_DISABLED | IRQF_TRIGGER_FALLING,
|
IRQF_DISABLED | IRQF_TRIGGER_FALLING,
|
||||||
"MMC card detect", data);
|
"MMC card detect", data);
|
||||||
if (err) {
|
if (err)
|
||||||
printk(KERN_ERR "cmx270_mci_init: MMC/SD: can't"
|
printk(KERN_ERR "cmx270_mci_init: MMC/SD: can't"
|
||||||
" request MMC card detect IRQ\n");
|
" request MMC card detect IRQ\n");
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void cmx270_mci_setpower(struct device *dev, unsigned int vdd)
|
static void cmx270_mci_setpower(struct device *dev, unsigned int vdd)
|
||||||
|
@ -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,
|
err = request_irq(CORGI_IRQ_GPIO_nSD_DETECT, corgi_detect_int,
|
||||||
IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
|
IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
|
||||||
"MMC card detect", data);
|
"MMC card detect", data);
|
||||||
if (err) {
|
if (err)
|
||||||
printk(KERN_ERR "corgi_mci_init: MMC/SD: can't request MMC card detect IRQ\n");
|
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)
|
static void corgi_mci_setpower(struct device *dev, unsigned int vdd)
|
||||||
|
@ -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,
|
err = request_irq(MAINSTONE_MMC_IRQ, mstone_detect_int, IRQF_DISABLED,
|
||||||
"MMC card detect", data);
|
"MMC card detect", data);
|
||||||
if (err) {
|
if (err)
|
||||||
printk(KERN_ERR "mainstone_mci_init: MMC/SD: can't request MMC card detect IRQ\n");
|
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)
|
static void mainstone_mci_setpower(struct device *dev, unsigned int vdd)
|
||||||
|
@ -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,
|
err = request_irq(POODLE_IRQ_GPIO_nSD_DETECT, poodle_detect_int,
|
||||||
IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
|
IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
|
||||||
"MMC card detect", data);
|
"MMC card detect", data);
|
||||||
if (err) {
|
if (err)
|
||||||
printk(KERN_ERR "poodle_mci_init: MMC/SD: can't request MMC card detect IRQ\n");
|
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)
|
static void poodle_mci_setpower(struct device *dev, unsigned int vdd)
|
||||||
|
@ -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,
|
err = request_irq(SPITZ_IRQ_GPIO_nSD_DETECT, spitz_detect_int,
|
||||||
IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
|
IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
|
||||||
"MMC card detect", data);
|
"MMC card detect", data);
|
||||||
if (err) {
|
if (err)
|
||||||
printk(KERN_ERR "spitz_mci_init: MMC/SD: can't request MMC card detect IRQ\n");
|
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)
|
static void spitz_mci_setpower(struct device *dev, unsigned int vdd)
|
||||||
|
@ -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);
|
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);
|
"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");
|
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 err;
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void tosa_mci_setpower(struct device *dev, unsigned int vdd)
|
static void tosa_mci_setpower(struct device *dev, unsigned int vdd)
|
||||||
|
@ -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,
|
err = request_irq(TRIZEPS4_MMC_IRQ, mci_detect_int,
|
||||||
IRQF_DISABLED | IRQF_TRIGGER_RISING,
|
IRQF_DISABLED | IRQF_TRIGGER_RISING,
|
||||||
"MMC card detect", data);
|
"MMC card detect", data);
|
||||||
if (err) {
|
if (err)
|
||||||
printk(KERN_ERR "trizeps4_mci_init: MMC/SD: can't request MMC card detect IRQ\n");
|
printk(KERN_ERR "trizeps4_mci_init: MMC/SD: can't request MMC card detect IRQ\n");
|
||||||
return -1;
|
|
||||||
}
|
return err;
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void trizeps4_mci_exit(struct device *dev, void *data)
|
static void trizeps4_mci_exit(struct device *dev, void *data)
|
||||||
|
Loading…
Reference in New Issue
Block a user