From: Alexander Viro <viro@math.psu.edu>
To: Patrick Mochel <mochel@osdl.org>
Cc: torvalds@transmeta.com, alan@lxorguk.ukuu.org.uk,
andre@linux-ide.org, linux-kernel@vger.kernel.org
Subject: Re: [patch] IDE driver model update
Date: Mon, 7 Oct 2002 18:58:04 -0400 (EDT) [thread overview]
Message-ID: <Pine.GSO.4.21.0210071851370.29030-100000@weyl.math.psu.edu> (raw)
In-Reply-To: <Pine.LNX.4.44.0210071547230.16276-100000@cherise.pdx.osdl.net>
On Mon, 7 Oct 2002, Patrick Mochel wrote:
> > On Mon, 7 Oct 2002, Patrick Mochel wrote:
> >
> > > --- a/drivers/ide/ide-probe.c Mon Oct 7 12:19:11 2002
> > > +++ b/drivers/ide/ide-probe.c Mon Oct 7 12:19:11 2002
> > > @@ -952,6 +952,15 @@
> > >
> > > EXPORT_SYMBOL(init_irq);
> > >
> > > +static void ide_device_release(struct device * dev)
> > > +{
> > > + ide_drive_t * drive = dev->driver_data;
> > > + ide_driver_t * driver = drive->driver;
> > > +
> > > + if (driver && driver->cleanup)
> > > + driver->cleanup(drive);
> > > +}
> > > +
> > > /*
> > > * init_gendisk() (as opposed to ide_geninit) is called for each major device,
> > > * after probing for drives, to allocate partition tables and other data
> > > @@ -986,6 +995,8 @@
> > > "%s","IDE Drive");
> > > disk->disk_dev.parent = &hwif->gendev;
> > > disk->disk_dev.bus = &ide_bus_type;
> > > + disk->disk_dev.driver_data = &hwif->drives[unit];
> > > + disk->disk_dev.release = ide_device_release;
> >
> > That is Wrong(tm). Logics around ->cleanup() doesn't belong to driverfs.
> > As far as IDE code is concerned, any outside calls of ->cleanup() are
> > illegal. What are you trying to achieve with that?
>
> It's the desctrutor for the device object. ->release() is the last thing
> called when the last reference to the device goes away. That's the only
> time it's called.
???
Details, please. When can it happen and what normally holds that object
pinned?
next prev parent reply other threads:[~2002-10-07 22:53 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-07 19:30 [patch] IDE driver model update Patrick Mochel
2002-10-07 19:31 ` Patrick Mochel
2002-10-07 19:31 ` Patrick Mochel
2002-10-11 23:06 ` Pavel Machek
2002-10-07 19:31 ` Patrick Mochel
2002-10-07 22:42 ` Alexander Viro
2002-10-07 22:51 ` Patrick Mochel
2002-10-07 22:58 ` Alexander Viro [this message]
2002-10-07 23:06 ` Patrick Mochel
2002-10-08 2:17 ` Alexander Viro
2002-10-08 12:21 ` Alan Cox
2002-10-08 12:24 ` Alexander Viro
2002-10-08 13:05 ` Alan Cox
2002-10-08 19:18 ` Andries Brouwer
2002-10-08 13:25 ` jbradford
2002-10-08 14:31 ` Ketil Froyn
2002-10-08 21:34 ` Xavier Bestel
2002-10-08 21:57 ` Pavel Machek
2002-10-08 15:05 ` Benjamin Herrenschmidt
2002-10-08 18:43 ` Patrick Mochel
2002-10-08 20:47 ` [RFC] embedded struct device " Alexander Viro
2002-10-08 21:29 ` Linus Torvalds
2002-10-08 21:42 ` Alexander Viro
2002-10-08 21:53 ` Kai Germaschewski
2002-10-08 21:57 ` Patrick Mochel
2002-10-08 22:51 ` Alan Cox
2002-10-08 21:54 ` Patrick Mochel
2002-10-08 22:12 ` Linus Torvalds
2002-10-08 22:48 ` Kai Germaschewski
2002-10-08 23:28 ` Linus Torvalds
2002-10-08 22:29 ` Greg KH
2002-10-08 21:30 ` 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=Pine.GSO.4.21.0210071851370.29030-100000@weyl.math.psu.edu \
--to=viro@math.psu.edu \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=andre@linux-ide.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mochel@osdl.org \
--cc=torvalds@transmeta.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).