| .. | .. |
|---|
| 532 | 532 | return 0; |
|---|
| 533 | 533 | } |
|---|
| 534 | 534 | |
|---|
| 535 | | -static int omap_pm_debug_open(struct inode *inode, struct file *file) |
|---|
| 536 | | -{ |
|---|
| 537 | | - return single_open(file, omap_pm_debug_show, |
|---|
| 538 | | - &inode->i_private); |
|---|
| 539 | | -} |
|---|
| 540 | | - |
|---|
| 541 | | -static const struct file_operations omap_pm_debug_fops = { |
|---|
| 542 | | - .open = omap_pm_debug_open, |
|---|
| 543 | | - .read = seq_read, |
|---|
| 544 | | - .llseek = seq_lseek, |
|---|
| 545 | | - .release = single_release, |
|---|
| 546 | | -}; |
|---|
| 535 | +DEFINE_SHOW_ATTRIBUTE(omap_pm_debug); |
|---|
| 547 | 536 | |
|---|
| 548 | 537 | static void omap_pm_init_debugfs(void) |
|---|
| 549 | 538 | { |
|---|
| 550 | 539 | struct dentry *d; |
|---|
| 551 | 540 | |
|---|
| 552 | 541 | d = debugfs_create_dir("pm_debug", NULL); |
|---|
| 553 | | - if (!d) |
|---|
| 554 | | - return; |
|---|
| 555 | | - |
|---|
| 556 | | - (void) debugfs_create_file("omap_pm", S_IWUSR | S_IRUGO, |
|---|
| 557 | | - d, NULL, &omap_pm_debug_fops); |
|---|
| 542 | + debugfs_create_file("omap_pm", S_IWUSR | S_IRUGO, d, NULL, |
|---|
| 543 | + &omap_pm_debug_fops); |
|---|
| 558 | 544 | } |
|---|
| 559 | 545 | |
|---|
| 560 | 546 | #endif /* CONFIG_DEBUG_FS */ |
|---|
| .. | .. |
|---|
| 669 | 655 | irq = INT_7XX_WAKE_UP_REQ; |
|---|
| 670 | 656 | else if (cpu_is_omap16xx()) |
|---|
| 671 | 657 | irq = INT_1610_WAKE_UP_REQ; |
|---|
| 672 | | - if (request_irq(irq, omap_wakeup_interrupt, 0, "peripheral wakeup", |
|---|
| 673 | | - NULL)) |
|---|
| 674 | | - pr_err("Failed to request irq %d (peripheral wakeup)\n", irq); |
|---|
| 658 | + else |
|---|
| 659 | + irq = -1; |
|---|
| 660 | + |
|---|
| 661 | + if (irq >= 0) { |
|---|
| 662 | + if (request_irq(irq, omap_wakeup_interrupt, 0, "peripheral wakeup", NULL)) |
|---|
| 663 | + pr_err("Failed to request irq %d (peripheral wakeup)\n", irq); |
|---|
| 664 | + } |
|---|
| 675 | 665 | |
|---|
| 676 | 666 | /* Program new power ramp-up time |
|---|
| 677 | 667 | * (0 for most boards since we don't lower voltage when in deep sleep) |
|---|