Skip to content

Commit 83f9ef4

Browse files
Scott James Remnanttorvalds
authored andcommitted
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>
1 parent 97f76d3 commit 83f9ef4

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎drivers/block/floppy.c‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ static int print_unex = 1;
177177
#include <linux/interrupt.h>
178178
#include <linux/init.h>
179179
#include <linux/platform_device.h>
180+
#include <linux/mod_devicetable.h>
180181
#include <linux/buffer_head.h> /* for invalidate_buffers() */
181182
#include <linux/mutex.h>
182183

@@ -4597,6 +4598,13 @@ MODULE_AUTHOR("Alain L. Knaff");
45974598
MODULE_SUPPORTED_DEVICE("fd");
45984599
MODULE_LICENSE("GPL");
45994600

4601+
/* This doesn't actually get used other than for module information */
4602+
static const struct pnp_device_id floppy_pnpids[] = {
4603+
{ "PNP0700", 0 },
4604+
{ }
4605+
};
4606+
MODULE_DEVICE_TABLE(pnp, floppy_pnpids);
4607+
46004608
#else
46014609

46024610
__setup("floppy=", floppy_setup);

0 commit comments

Comments
 (0)