All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: James Bottomley <James.Bottomley@SteelEye.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	SCSI Mailing List <linux-scsi@vger.kernel.org>,
	linux-usb-devel@lists.sourceforge.net
Subject: Re: [RFC] put symbolic links between drivers and modules in the sysfs tree
Date: Wed, 22 Sep 2004 16:40:44 -0700	[thread overview]
Message-ID: <20040922234044.GA14552@kroah.com> (raw)
In-Reply-To: <20040922230650.GB14279@kroah.com>

On Wed, Sep 22, 2004 at 04:06:50PM -0700, Greg KH wrote:
> On Wed, Sep 22, 2004 at 04:04:23PM -0700, Greg KH wrote:
> > I'll post my usb core change after this, to show you how USB can
> > be hooked up to it.
> 
> And here's the 3 line patch that I added to the usb core to hook up both
> the usb and usb-serial drivers to support the modules symlinks.
> 
> I'll go mess with the pci core now, but as there is no "struct module *"
> in the pci driver structure, it will take a bit of auditing to get them
> all hooked up properly.

Here's that patch, if anyone cares...

thanks,

greg k-h

------


PCI: add "struct module *" to struct pci_driver to show symlink in sysfs for pci drivers.

Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>

diff -Nru a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
--- a/drivers/pci/pci-driver.c	2004-09-22 16:24:57 -07:00
+++ b/drivers/pci/pci-driver.c	2004-09-22 16:24:57 -07:00
@@ -417,6 +417,7 @@
 	drv->driver.bus = &pci_bus_type;
 	drv->driver.probe = pci_device_probe;
 	drv->driver.remove = pci_device_remove;
+	drv->driver.owner = drv->owner;
 	drv->driver.kobj.ktype = &pci_driver_kobj_type;
 	pci_init_dynids(&drv->dynids);
 
diff -Nru a/include/linux/pci.h b/include/linux/pci.h
--- a/include/linux/pci.h	2004-09-22 16:24:57 -07:00
+++ b/include/linux/pci.h	2004-09-22 16:24:57 -07:00
@@ -632,9 +632,11 @@
 	unsigned int use_driver_data:1; /* pci_driver->driver_data is used */
 };
 
+struct module;
 struct pci_driver {
 	struct list_head node;
 	char *name;
+	struct module *owner;
 	const struct pci_device_id *id_table;	/* must be non-NULL for probe to be called */
 	int  (*probe)  (struct pci_dev *dev, const struct pci_device_id *id);	/* New device inserted */
 	void (*remove) (struct pci_dev *dev);	/* Device removed (NULL if not a hot-plug capable driver) */

  reply	other threads:[~2004-09-22 23:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-20 17:29 [RFC] put symbolic links between drivers and modules in the sysfs tree James Bottomley
2004-09-22 23:04 ` Greg KH
2004-09-22 23:06   ` Greg KH
2004-09-22 23:40     ` Greg KH [this message]
2004-09-25  7:38 ` viro
2004-09-25  8:05   ` Herbert Xu
2004-09-25  8:21     ` Arjan van de Ven
2004-09-25 13:16       ` James Bottomley
2004-09-25 13:14   ` James Bottomley
2004-09-26 10:37     ` Herbert Xu
2004-09-26 10:37       ` Herbert Xu
2004-09-26 13:09       ` James Bottomley
2004-09-25 16:46   ` Greg KH

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=20040922234044.GA14552@kroah.com \
    --to=greg@kroah.com \
    --cc=James.Bottomley@SteelEye.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=rusty@rustcorp.com.au \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.