Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 308718
b: refs/heads/master
c: ca7edd1
h: refs/heads/master
v: v3
  • Loading branch information
Lee Jones authored and Samuel Ortiz committed May 9, 2012
1 parent 5815108 commit 95dab47
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9fc63f670f53cf9dcdca5e523289dda35da47e63
refs/heads/master: ca7edd16ae488fe0eff5d4f8eb17c5caa8dcc5fa
29 changes: 19 additions & 10 deletions trunk/drivers/mfd/db8500-prcmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -2960,7 +2960,8 @@ static struct mfd_cell db8500_prcmu_devs[] = {
*/
static int __devinit db8500_prcmu_probe(struct platform_device *pdev)
{
int err = 0;
struct device_node *np = pdev->dev.of_node;
int irq = 0, err = 0;

if (ux500_is_svp())
return -ENODEV;
Expand All @@ -2970,8 +2971,14 @@ static int __devinit db8500_prcmu_probe(struct platform_device *pdev)
/* Clean up the mailbox interrupts after pre-kernel code. */
writel(ALL_MBOX_BITS, PRCM_ARM_IT1_CLR);

err = request_threaded_irq(IRQ_DB8500_PRCMU1, prcmu_irq_handler,
prcmu_irq_thread_fn, IRQF_NO_SUSPEND, "prcmu", NULL);
if (np)
irq = platform_get_irq(pdev, 0);

if (!np || irq <= 0)
irq = IRQ_DB8500_PRCMU1;

err = request_threaded_irq(irq, prcmu_irq_handler,
prcmu_irq_thread_fn, IRQF_NO_SUSPEND, "prcmu", NULL);
if (err < 0) {
pr_err("prcmu: Failed to allocate IRQ_DB8500_PRCMU1.\n");
err = -EBUSY;
Expand All @@ -2981,14 +2988,16 @@ static int __devinit db8500_prcmu_probe(struct platform_device *pdev)
if (cpu_is_u8500v20_or_later())
prcmu_config_esram0_deep_sleep(ESRAM0_DEEP_SLEEP_STATE_RET);

err = mfd_add_devices(&pdev->dev, 0, db8500_prcmu_devs,
ARRAY_SIZE(db8500_prcmu_devs), NULL,
0);
if (!np) {
err = mfd_add_devices(&pdev->dev, 0, db8500_prcmu_devs,
ARRAY_SIZE(db8500_prcmu_devs), NULL, 0);
if (err) {
pr_err("prcmu: Failed to add subdevices\n");
return err;
}
}

if (err)
pr_err("prcmu: Failed to add subdevices\n");
else
pr_info("DB8500 PRCMU initialized\n");
pr_info("DB8500 PRCMU initialized\n");

no_irq_return:
return err;
Expand Down

0 comments on commit 95dab47

Please sign in to comment.