Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux: Kernel

[PATCH] floppy: switch driver to dev_pm_ops

 

 

Linux kernel RSS feed   Index | Next | Previous | View Threaded


elendil at planet

Jul 8, 2009, 5:48 AM

Post #1 of 1 (93 views)
Permalink
[PATCH] floppy: switch driver to dev_pm_ops

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

Signed-off-by: Frans Pop <elendil [at] planet>
Cc: Rafael J. Wysocki <rjw [at] sisk>
---

Looked straightforward enough for me to give it a shot.

diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
index 91b7530..597fe3a 100644
--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -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,
},
};

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Linux kernel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.