public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Scott James Remnant <scott@canonical.com>
Cc: linux-kernel@vger.kernel.org,
	Bjorn Helgaas <bjorn.helgaas@hp.com>,
	Philippe De Muyter <phdm@macqel.be>,
	Kay Sievers <kay.sievers@vrfy.org>
Subject: Re: [PATCH] floppy: Provide a PNP device table in the module.
Date: Fri, 6 Mar 2009 15:48:52 -0800	[thread overview]
Message-ID: <20090306154852.8354fe52.akpm@linux-foundation.org> (raw)
In-Reply-To: <E1LfeFk-0002mD-OE@zelda.netsplit.com>

On Fri, 6 Mar 2009 17:50:47 +0000
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.

Is this a regression?  Did 2.6.28 autoload OK?

> 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);
> +
>  #else
>  
>  __setup("floppy=", floppy_setup);

Either way, this looks like 2.6.29 stuff.

  parent reply	other threads:[~2009-03-06 23:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-06 17:50 [PATCH] floppy: Provide a PNP device table in the module Scott James Remnant
2009-03-06 18:30 ` Kay Sievers
2009-03-06 23:48 ` Andrew Morton [this message]
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=20090306154852.8354fe52.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=bjorn.helgaas@hp.com \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=phdm@macqel.be \
    --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