lkml.org 
[lkml]   [2002]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] PnP Layer Rewrite V0.7 - 2.4.42
On Tue, Oct 15, 2002 at 04:09:46PM +0000, Adam Belay wrote:
> > > +static const struct pnp_id pnp_dev_table[] = {
> > > + /* Standard LPT Printer Port */
> > > + { "PNP0400", 0 },
> >
> > Using named initializers are preferred.
>
> I'm not quite sure what you mean here.

Something like:
static const struct pnp_id pnp_dev_table[] = {
/* standard printer port */
{ .name = "PNP0400", .data = 0},

or whatever those fields are called.

> > pnp_register_driver() should be implemented so that you don't need a
> > #ifdef around it to call it. Put the #ifdef in the header file.
>
> Actually pnp_register_driver is implemented in this way. The reason it
> has #ifdef around it is becuase of the previous #ifdef statement
> (where parport_pc_pnp_driver is defined).

Removing #ifdefs is also nice :)

> Also I had a hotplug related question? Is it possible for pnp drivers
> to use this and if so what do I need to do?
>
> MODULE_DEVICE_TABLE(pnp, pnp_dev_table);

To fully support this, you need to modify modutils to generate the
proper modules.pnpmap file from the .o files. Take a look at the source
for it for how to do this.

Also, some kind of /sbin/hotplug notification when a pnp device is found
is a good idea. Hm, looks like you already get that for free right now
with the existing driver code, nevermind :)

thanks,

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

\
 
 \ /
  Last update: 2005-03-22 13:30    [W:0.054 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site