Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

+PM

  • Loading branch information...
commit 673c00b418d36996105d71dfd28bdac370f941f9 1 parent 6c4ad71
@makelinux authored
Showing with 27 additions and 3 deletions.
  1. +27 −3 ldt.c
View
30 ldt.c
@@ -32,6 +32,7 @@
* TODO:
* classic tracing
* linked list
+ * private instance state struct
*
*/
@@ -235,8 +236,8 @@ static int ldt_release(struct inode *inode, struct file *file)
{
_entry:
trl_();
- trvd_(iminor(inode));
trvd_(imajor(inode));
+ trvd_(iminor(inode));
trvd(isr_counter);
trvd(ldt_work_counter);
return 0;
@@ -491,8 +492,10 @@ static int uart_probe(void)
if (loopback)
outb(inb(port + UART_MCR) | UART_MCR_LOOP, port + UART_MCR);
}
- if (!uart_detected && loopback)
+ if (!uart_detected && loopback) {
pr_warn("Emulating loopback is software\n");
+ ret = -ENODEV;
+ }
}
trvx(uart_detected);
trvx_(inb(port + UART_IER));
@@ -547,7 +550,7 @@ static __devinit int ldt_probe(struct platform_device *pdev)
trl_();
trvs_(__DATE__);
trvs_(__TIME__);
- trvs_(KBUILD_MODNAME);
+ trvs_(ldt_name);
trl_();
trvp_(pdev);
trvd_(irq);
@@ -660,10 +663,31 @@ static int __devexit ldt_remove(struct platform_device *pdev)
* Following code requires platform_device (ldt_plat_dev.*) to work
*/
+#ifdef CONFIG_PM
+
+int ldt_suspend(struct platform_device *pdev, pm_message_t state)
+{
+_entry:
+ return 0;
+}
+
+int ldt_resume(struct platform_device *pdev)
+{
+_entry:
+ return 0;
+}
+
+#else
+#define ldt_suspend NULL
+#define ldt_resume NULL
+#endif
+
static struct platform_driver ldt_driver = {
.driver.name = "ldt_device_name",
.driver.owner = THIS_MODULE,
.probe = ldt_probe,
+ .suspend = ldt_suspend,
+ .resume = ldt_resume,
.remove = __devexit_p(ldt_remove),
};
Please sign in to comment.
Something went wrong with that request. Please try again.