public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: mahatma@eu.by, linux-kernel@vger.kernel.org,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: #2 (Re: More modaliases + patchtool)
Date: Mon, 13 Sep 2010 12:33:22 +0930	[thread overview]
Message-ID: <201009131233.23278.rusty@rustcorp.com.au> (raw)
In-Reply-To: <4C8AF933.9060304@goop.org>

On Sat, 11 Sep 2010 01:06:19 pm Jeremy Fitzhardinge wrote:
>  On 09/11/2010 12:14 PM, Rusty Russell wrote:
> > On Thu, 19 Aug 2010 10:12:36 pm Dzianis Kahanovich wrote:
> >> diff -pruN a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
> >> --- a/drivers/block/xen-blkfront.c	2010-08-19 15:20:56.344764984 +0300
> >> +++ b/drivers/block/xen-blkfront.c	2010-08-19 15:23:41.104764997 +0300
> >> @@ -1306,6 +1306,9 @@ static int __init xlblk_init(void)
> >>  
> >>  	return xenbus_register_frontend(&blkfront);
> >>  }
> >> +
> >> +MODULE_DEVICE_TABLE(xenbus, blkfront_ids);
> >> +
> >>  module_init(xlblk_init);
> > This seems very logical.  Jeremy?
> 
> Looks OK.  What will the effect be?  Will it allow better module
> auto-loading or something?

Normally yes.  Here's how it's supposed to work:
1) The bus provides a "modalias" field for devices, to say what driver module
   to probe for.  You already do this.
2) The driver marks the device table so scripts/mod/file2alias.c can find it.
   This is what this patch does.
3) scripts/mod/file2alias.c creates the wildcard aliases for the module, based
   on the device table.  You'd need to do this.

Instead you have manual MODULE_ALIAS lines for your drivers.  Your bus
matching is so simple and you have so few device types, that this works.
But the Right Way is to use the infrastructure to generate them as above.

Hope that clarifies!
Rusty.

  reply	other threads:[~2010-09-13  3:03 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4C6BE292.3060307@bspu.unibel.by>
2010-08-19  0:50 ` More modaliases + patchtool Rusty Russell
2010-08-19 14:58   ` #3 (Re: More modaliases + patchtool) Dzianis Kahanovich
     [not found]   ` <4C6D26BC.9040805@bspu.unibel.by>
2010-09-11  2:14     ` #2 " Rusty Russell
2010-09-11  3:36       ` Jeremy Fitzhardinge
2010-09-13  3:03         ` Rusty Russell [this message]
2010-09-11 17:51       ` Dmitry Torokhov
2010-09-13  3:24         ` Rusty Russell
2010-09-17 10:55       ` pci: Re: #2 (Re: More modaliases + patchtool)) Dzianis Kahanovich
2010-09-17 13:11       ` Dzianis Kahanovich
2010-09-17 13:26       ` xenbus: " Dzianis Kahanovich
2010-09-17 18:09         ` Jeremy Fitzhardinge
2010-09-17 13:27       ` usb: " Dzianis Kahanovich
2010-09-17 13:29       ` serio: " Dzianis Kahanovich
2010-09-17 13:29       ` pnp: " Dzianis Kahanovich
2010-09-17 13:32       ` of: " Dzianis Kahanovich
2010-09-17 13:35       ` i2c: " Dzianis Kahanovich
2010-09-17 14:06         ` Mark Brown
2010-09-17 15:47           ` Dzianis Kahanovich
2010-09-17 15:54             ` Mark Brown
2010-09-17 13:36       ` hid: " Dzianis Kahanovich
2010-09-17 13:36       ` dio: " Dzianis Kahanovich
2010-09-17 13:37       ` ccw: " Dzianis Kahanovich
2010-09-17 13:38       ` acpi: " Dzianis Kahanovich
2010-09-17 13:38       ` spi " Dzianis Kahanovich
2010-09-17 13:39       ` RapidIO: " Dzianis Kahanovich
2010-09-17 13:42       ` platform: " Dzianis Kahanovich
2010-09-17 13:54         ` Mark Brown
2010-09-17 15:55       ` acpi (signed): " Dzianis Kahanovich
2010-09-16 20:23 #2 (Re: More modaliases + patchtool) Denis Kaganovich

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=201009131233.23278.rusty@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=akpm@linux-foundation.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mahatma@eu.by \
    /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