Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

floppy: provide a PNP device table in the module.

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 <scott@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Philippe De Muyter <phdm@macqel.be>
Acked-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Scott James Remnant and committed by
Linus Torvalds
83f9ef46 97f76d3d

+8
+8
drivers/block/floppy.c
··· 177 177 #include <linux/interrupt.h> 178 178 #include <linux/init.h> 179 179 #include <linux/platform_device.h> 180 + #include <linux/mod_devicetable.h> 180 181 #include <linux/buffer_head.h> /* for invalidate_buffers() */ 181 182 #include <linux/mutex.h> 182 183 ··· 4597 4596 MODULE_AUTHOR("Alain L. Knaff"); 4598 4597 MODULE_SUPPORTED_DEVICE("fd"); 4599 4598 MODULE_LICENSE("GPL"); 4599 + 4600 + /* This doesn't actually get used other than for module information */ 4601 + static const struct pnp_device_id floppy_pnpids[] = { 4602 + { "PNP0700", 0 }, 4603 + { } 4604 + }; 4605 + MODULE_DEVICE_TABLE(pnp, floppy_pnpids); 4600 4606 4601 4607 #else 4602 4608