Re: [PATCH] floppy: Provide a PNP device table in the module.

From: Kay Sievers
Date: Fri Mar 06 2009 - 13:31:12 EST


On Fri, Mar 6, 2009 at 18:50, Scott James Remnant <scott@xxxxxxxxxxxxx> wrote:
> 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@xxxxxxxxxxxxx>
> Signed-off-by: Tim Gardner <tim.gardner@xxxxxxxxxxxxx>
> ---
> Âdrivers/block/floppy.c | Â Â8 ++++++++
> Â1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
> index 83d8ed3..7aa1264 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>
>
> @@ -4598,6 +4599,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);
> +

Looks good to me. Thanks for doing that.

Acked-by: Kay Sievers <kay.sievers@xxxxxxxx>

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