Re: No owner field in bus_type?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 02, 2004 at 10:00:57PM +0100, Frank.A.Uepping@t-online.de wrote:
> On Monday 02 February 2004 20:26, Greg KH wrote:
> > On Mon, Feb 02, 2004 at 08:18:34PM +0100, Frank.A.Uepping@t-online.de wrote:
> > > Hello,
> > > I am wondering, that there is no owner field in struct bus_type and
> > > struct device_driver! Both have callbacks; how does the caller prevent
> > > the owning module from unloading?
> >
> > The fact that you have to unregister the driver before being able to
> > remove your module?
> Yes.
> However, I have compared this to the struct file_operations which has 
> callbacks and register/unregister functions too, and additionally an owner 
> field. Hence, I am wondering why the one come with an owner field whereas the 
> others not?

Because, as I stated, it is not needed.  If you think it is, can you
show me where in the bus core code we could use the owner field to do
anything?  (hint, read the lkml archives, I already tried this, and
later realized it was pointless.)

> > p.s. remember module unload is unsupported in the 2.6 kernel :)
> Just a great dream of Rusty ;)

Not really, it is reality.  module unload is a big pain in the butt, and
is pretty much impossible to get correct without a huge effort of work
for almost no gain.  See the many flamewars on lkml during the 2.5
development cycle for more details.

greg k-h

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux