Skip to contentSkip to conversation

floppy: switch driver to dev_pm_ops

PATCH New Frans Pop 1 participant 1 message Jul 8, 2009

Subsystems (2)
lore
Share & tools
lore

Frans Pop

author
#0 lore raw

PATCH 1/1 floppy: switch driver to dev_pm_ops

Gets rid of the following warning:
Platform driver 'floppy' needs updating - please use dev_pm_ops

Cc Rafael J. Wysocki <[email protected]>

---

Looked straightforward enough for me to give it a shot.

drivers/block/floppy.c +6 -2
index 91b7530..597fe3a 100644
@@ -4151,7 +4151,7 @@ static void floppy_device_release(struct device *dev)
 {
 }
 
-static int floppy_resume(struct platform_device *dev)
+static int floppy_resume(struct device *dev)
 {
 	int fdc;
 
@@ -4162,10 +4162,14 @@ static int floppy_resume(struct platform_device *dev)
 	return 0;
 }
 
-static struct platform_driver floppy_driver = {
+static struct dev_pm_ops floppy_pm_ops = {
 	.resume = floppy_resume,
+};
+
+static struct platform_driver floppy_driver = {
 	.driver = {
 		.name = "floppy",
+		.pm = &floppy_pm_ops,
 	},
 };