mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kay Sievers <kay.sievers@vrfy.org>
To: Scott James Remnant <scott@canonical.com>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org
Subject: Re: [PATCH] floppy: Provide a PNP device table in the module.
Date: Fri, 6 Mar 2009 19:30:52 +0100	[thread overview]
Message-ID: <ac3eb2510903061030j339578dfi116ae729f43604d1@mail.gmail.com> (raw)
In-Reply-To: <E1LfeFk-0002mD-OE@zelda.netsplit.com>

On Fri, Mar 6, 2009 at 18:50, Scott James Remnant <scott@canonical.com> 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@canonical.com>
> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
> ---
>  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@vrfy.org>

Kay

  reply	other threads:[~2009-03-06 18:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-06 17:50 Scott James Remnant
2009-03-06 18:30 ` Kay Sievers [this message]
2009-03-06 23:48 ` Andrew Morton
2009-03-06 23:52   ` Kay Sievers
2009-03-07  0:02     ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ac3eb2510903061030j339578dfi116ae729f43604d1@mail.gmail.com \
    --to=kay.sievers@vrfy.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=scott@canonical.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®