Title: [9764] trunk/drivers/input/keyboard/adp5589-keys.c: Input: ADP5589: Apply review feedback
Revision
9764
Author
hennerich
Date
2011-03-24 06:26:50 -0400 (Thu, 24 Mar 2011)

Log Message

Input: ADP5589:  Apply review feedback

Use CONFIG_PM_SLEEP.
Use convenient macro SIMPLE_DEV_PM_OPS.
Remove MODULE_ALIAS.
Add missing driver owner and fix indention.

Modified Paths

Diff

Modified: trunk/drivers/input/keyboard/adp5589-keys.c (9763 => 9764)


--- trunk/drivers/input/keyboard/adp5589-keys.c	2011-03-24 06:50:01 UTC (rev 9763)
+++ trunk/drivers/input/keyboard/adp5589-keys.c	2011-03-24 10:26:50 UTC (rev 9764)
@@ -697,7 +697,7 @@
 	return 0;
 }
 
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 static int adp5589_suspend(struct device *dev)
 {
 	struct adp5589_kpad *kpad = dev_get_drvdata(dev);
@@ -723,13 +723,10 @@
 
 	return 0;
 }
-
-static const struct dev_pm_ops adp5589_dev_pm_ops = {
-	.suspend = adp5589_suspend,
-	.resume = adp5589_resume,
-};
 #endif
 
+static SIMPLE_DEV_PM_OPS(adp5589_dev_pm_ops, adp5589_suspend, adp5589_resume);
+
 static const struct i2c_device_id adp5589_id[] = {
 	{"adp5589-keys", 0},
 	{}
@@ -739,11 +736,10 @@
 
 static struct i2c_driver adp5589_driver = {
 	.driver = {
-		   .name = KBUILD_MODNAME,
-#ifdef CONFIG_PM
-		   .pm = &adp5589_dev_pm_ops,
-#endif
-		   },
+		.name = KBUILD_MODNAME,
+		.owner = THIS_MODULE,
+		.pm = &adp5589_dev_pm_ops,
+	},
 	.probe = adp5589_probe,
 	.remove = __devexit_p(adp5589_remove),
 	.id_table = adp5589_id,
@@ -766,4 +762,3 @@
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Michael Hennerich <[email protected]>");
 MODULE_DESCRIPTION("ADP5589 Keypad driver");
-MODULE_ALIAS("i2c:adp5589-keys");
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to