projects/linux·commit 83f9ef46

floppy: provide a PNP device table in the module.

83f9ef46 · Scott James Remnant <[email protected]> · 2009-04-02 16:56:47 -07:00

The missing device table means that the floppy module is not auto-loaded,
even when the appropriate PNP device (0700) is found.

We don't actually use the table in the module, since the device doesn't
have a struct pnp_driver, but it's sufficient to cause an alias in the
module that udev/modprobe will use.

Signed-off-by: Scott James Remnant <[email protected]>
Signed-off-by: Tim Gardner <[email protected]>
Cc: Bjorn Helgaas <[email protected]>
Cc: Philippe De Muyter <[email protected]>
Acked-by: Kay Sievers <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
83f9ef463bcb4ba7b4fee1d6212fac7d277010d3
Parents
97f76d3d

Changes

1 files changed · +8 −0

FileStatusAddDelContent
drivers/block/floppy.cmodified+8−0View file

drivers/block/floppy.c

View file
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
index c2c95e6..1300df6 100644
--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -177,6 +177,7 @@ static int print_unex = 1;
#include <linux/interrupt.h>
#include <linux/init.h>
#include <linux/platform_device.h>
+#include <linux/mod_devicetable.h>
#include <linux/buffer_head.h> /* for invalidate_buffers() */
#include <linux/mutex.h>
@@ -4597,6 +4598,13 @@ MODULE_AUTHOR("Alain L. Knaff");
MODULE_SUPPORTED_DEVICE("fd");
MODULE_LICENSE("GPL");
+/* This doesn't actually get used other than for module information */
+static const struct pnp_device_id floppy_pnpids[] = {
+ { "PNP0700", 0 },
+ { }
+};
+MODULE_DEVICE_TABLE(pnp, floppy_pnpids);
+
#else
__setup("floppy=", floppy_setup);