Permalink
Browse files

ddrdrive: add initial pci driver framework

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information...
1 parent 399a067 commit 3d78e54afee6f3136243576d03bdf89641b08d62 @gregkh committed Jun 26, 2009
Showing with 38 additions and 1 deletion.
  1. +38 −1 ddrdrive.c
View
@@ -10,14 +10,51 @@
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/module.h>
+#include <linux/pci.h>
-static int __init ddrdrive_init(void)
+static struct pci_device_id ids[] = {
+ { PCI_DEVICE(0x19e3, 0xdd52) },
+ { },
+};
+MODULE_DEVICE_TABLE(pci, ids);
+
+static int __devinit ddr_probe(struct pci_dev *pdev,
+ const struct pci_device_id *id)
+{
+ return 0;
+}
+
+static void __devexit ddr_remove(struct pci_dev *pdev)
+{
+}
+
+static int ddr_suspend(struct pci_dev *pdev, pm_message_t state)
{
return 0;
}
+static int ddr_resume(struct pci_dev *pdev)
+{
+ return 0;
+}
+
+static struct pci_driver ddr_driver = {
+ .name = KBUILD_MODNAME,
+ .id_table = ids,
+ .probe = ddr_probe,
+ .remove = ddr_remove,
+ .suspend = ddr_suspend,
+ .resume = ddr_resume,
+};
+
+static int __init ddrdrive_init(void)
+{
+ return pci_register_driver(&ddr_driver);
+}
+
static void __exit ddrdrive_exit(void)
{
+ pci_unregister_driver(&ddr_driver);
}
module_init(ddrdrive_init);

0 comments on commit 3d78e54

Please sign in to comment.