forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f9004dbfff8a3fbbd7e2a88c8a4327c7f2f8e5b2
kernel/arch/arm/mach-omap1/pm.c
....@@ -532,29 +532,15 @@
532532 return 0;
533533 }
534534
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);
547536
548537 static void omap_pm_init_debugfs(void)
549538 {
550539 struct dentry *d;
551540
552541 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);
558544 }
559545
560546 #endif /* CONFIG_DEBUG_FS */
....@@ -669,9 +655,13 @@
669655 irq = INT_7XX_WAKE_UP_REQ;
670656 else if (cpu_is_omap16xx())
671657 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
+ }
675665
676666 /* Program new power ramp-up time
677667 * (0 for most boards since we don't lower voltage when in deep sleep)