* [PATCH] floppy: Provide a PNP device table in the module.
@ 2009-03-06 17:50 Scott James Remnant
2009-03-06 18:30 ` Kay Sievers
2009-03-06 23:48 ` Andrew Morton
0 siblings, 2 replies; 5+ messages in thread
From: Scott James Remnant @ 2009-03-06 17:50 UTC (permalink / raw)
To: linux-kernel; +Cc: akpm
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);
+
#else
__setup("floppy=", floppy_setup);
--
1.6.0.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] floppy: Provide a PNP device table in the module.
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
1 sibling, 0 replies; 5+ messages in thread
From: Kay Sievers @ 2009-03-06 18:30 UTC (permalink / raw)
To: Scott James Remnant; +Cc: linux-kernel, akpm
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] floppy: Provide a PNP device table in the module.
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
2009-03-06 23:52 ` Kay Sievers
1 sibling, 1 reply; 5+ messages in thread
From: Andrew Morton @ 2009-03-06 23:48 UTC (permalink / raw)
To: Scott James Remnant
Cc: linux-kernel, Bjorn Helgaas, Philippe De Muyter, Kay Sievers
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] floppy: Provide a PNP device table in the module.
2009-03-06 23:48 ` Andrew Morton
@ 2009-03-06 23:52 ` Kay Sievers
2009-03-07 0:02 ` Andrew Morton
0 siblings, 1 reply; 5+ messages in thread
From: Kay Sievers @ 2009-03-06 23:52 UTC (permalink / raw)
To: Andrew Morton
Cc: Scott James Remnant, linux-kernel, Bjorn Helgaas,
Philippe De Muyter
On Sat, Mar 7, 2009 at 00:48, Andrew Morton <akpm@linux-foundation.org> wrote:
> 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?
No, it was never autoloaded by a kernel supplied alias. We ship
special modprobe rules which define the alias, and this is part of an
ongoing effort to move that information where it belongs, into the
module itself.
Thanks,
Kay
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] floppy: Provide a PNP device table in the module.
2009-03-06 23:52 ` Kay Sievers
@ 2009-03-07 0:02 ` Andrew Morton
0 siblings, 0 replies; 5+ messages in thread
From: Andrew Morton @ 2009-03-07 0:02 UTC (permalink / raw)
To: Kay Sievers; +Cc: scott, linux-kernel, bjorn.helgaas, phdm
On Sat, 7 Mar 2009 00:52:50 +0100
Kay Sievers <kay.sievers@vrfy.org> wrote:
> On Sat, Mar 7, 2009 at 00:48, Andrew Morton <akpm@linux-foundation.org> wrote:
> > 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?
>
> No, it was never autoloaded by a kernel supplied alias. We ship
> special modprobe rules which define the alias, and this is part of an
> ongoing effort to move that information where it belongs, into the
> module itself.
>
OK, thanks, I tossed it onto the 2.6.30 pile.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-03-07 0:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2009-03-06 23:52 ` Kay Sievers
2009-03-07 0:02 ` Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox