From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Greg KH <gregkh@suse.de>
Cc: Jeff Garzik <jgarzik@pobox.com>,
Roland Dreier <rolandd@cisco.com>,
linux-kernel@vger.kernel.org
Subject: Re: What is struct pci_driver.owner for?
Date: Tue, 18 Oct 2005 22:04:55 +0100 [thread overview]
Message-ID: <20051018210455.GA22928@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20051018205908.GA32435@suse.de>
On Tue, Oct 18, 2005 at 01:59:08PM -0700, Greg KH wrote:
> On Tue, Oct 18, 2005 at 04:53:36PM -0400, Jeff Garzik wrote:
> > Roland Dreier wrote:
> > >I just noticed that at some point, struct pci_driver grew a .owner
> > >member. However, only a handful of drivers set it:
> > >
> > > $ grep -r -A10 pci_driver drivers/ | grep owner
> > > drivers/block/sx8.c- .owner = THIS_MODULE,
> > > drivers/ieee1394/pcilynx.c- .owner = THIS_MODULE,
> > > drivers/net/spider_net.c- .owner = THIS_MODULE,
> > > drivers/video/imsttfb.c- .owner = THIS_MODULE,
> > > drivers/video/kyro/fbdev.c- .owner = THIS_MODULE,
> > > drivers/video/tridentfb.c- .owner = THIS_MODULE,
> > >
> > >Should all drivers be setting .owner = THIS_MODULE? Is this a good
> > >kernel janitors task?
> >
> > In theory its for module refcounting. With so many PCI drivers and so
> > few pci_driver::owner users, it makes me wonder how needed it is.
>
> It might in the future be needed for refcounting, I originally added it
> when I thought it was needed.
Note that both pci_driver and pci_driver.driver both have an "owner"
field. One should go - there's no point needlessly duplicating stuff
like this.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core
next prev parent reply other threads:[~2005-10-18 21:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-18 20:47 What is struct pci_driver.owner for? Roland Dreier
2005-10-18 20:53 ` Jeff Garzik
2005-10-18 20:59 ` Greg KH
2005-10-18 21:04 ` Russell King [this message]
2005-10-18 21:06 ` Roland Dreier
2005-10-19 15:42 ` Jiri Slaby
2005-10-19 16:48 ` Roland Dreier
2005-10-19 16:51 ` Jiri Slaby
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=20051018210455.GA22928@flint.arm.linux.org.uk \
--to=rmk+lkml@arm.linux.org.uk \
--cc=gregkh@suse.de \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rolandd@cisco.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 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.