ARM: integrator: grab PCI error IRQ in probe()
This moves the request of the PCI error interrupt to the probe() function for the device, uses the devm* managed call and switch to a dev_err() error print. Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
86adc39ffc
commit
5283456dad
1 changed files with 10 additions and 9 deletions
|
@ -495,7 +495,6 @@ static void __init pci_v3_preinit(void)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
unsigned int temp;
|
unsigned int temp;
|
||||||
int ret;
|
|
||||||
|
|
||||||
/* Remap the Integrator system controller */
|
/* Remap the Integrator system controller */
|
||||||
ap_syscon_base = ioremap(INTEGRATOR_SC_BASE, 0x100);
|
ap_syscon_base = ioremap(INTEGRATOR_SC_BASE, 0x100);
|
||||||
|
@ -579,14 +578,6 @@ static void __init pci_v3_preinit(void)
|
||||||
v3_writeb(V3_LB_IMASK, 0x28);
|
v3_writeb(V3_LB_IMASK, 0x28);
|
||||||
__raw_writel(3, ap_syscon_base + INTEGRATOR_SC_PCIENABLE_OFFSET);
|
__raw_writel(3, ap_syscon_base + INTEGRATOR_SC_PCIENABLE_OFFSET);
|
||||||
|
|
||||||
/*
|
|
||||||
* Grab the PCI error interrupt.
|
|
||||||
*/
|
|
||||||
ret = request_irq(IRQ_AP_V3INT, v3_irq, 0, "V3", NULL);
|
|
||||||
if (ret)
|
|
||||||
printk(KERN_ERR "PCI: unable to grab PCI error "
|
|
||||||
"interrupt: %d\n", ret);
|
|
||||||
|
|
||||||
raw_spin_unlock_irqrestore(&v3_lock, flags);
|
raw_spin_unlock_irqrestore(&v3_lock, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -684,7 +675,17 @@ static struct hw_pci pci_v3 __initdata = {
|
||||||
|
|
||||||
static int __init pci_v3_probe(struct platform_device *pdev)
|
static int __init pci_v3_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
ret = devm_request_irq(&pdev->dev, IRQ_AP_V3INT, v3_irq, 0, "V3", NULL);
|
||||||
|
if (ret) {
|
||||||
|
dev_err(&pdev->dev, "unable to grab PCI error interrupt: %d\n",
|
||||||
|
ret);
|
||||||
|
return -ENODEV;
|
||||||
|
}
|
||||||
|
|
||||||
pci_common_init(&pci_v3);
|
pci_common_init(&pci_v3);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue