From: Greg KH <gregkh@linuxfoundation.org>
To: Andy Lutomirski <luto@amacapital.net>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: Releasing bus devices?
Date: Wed, 25 Nov 2015 08:37:07 -0800 [thread overview]
Message-ID: <20151125163707.GA5363@kroah.com> (raw)
In-Reply-To: <CALCETrVV9Nfj6oFjCojP2nTa3uzmO41bc6sf1OT=7YykQvbxqQ@mail.gmail.com>
On Wed, Nov 25, 2015 at 08:21:36AM -0800, Andy Lutomirski wrote:
> I'm writing a bus driver, and I'm confused.
Yeah, writing a new bus is a major pain, I keep meaning to work on the
api every year or so when I have to write a new one, but then I just
suffer through it and never get around to it :(
> If I create a class and class devices, I can set a release method on
> the class. But if I create a bus, there's no bus_type.dev_release.
> Am I really supposed to manually set .release on each struct device
> that I enumerate? If so, why?
No, you shouldn't have to do that, the "struct device_type" that is
assigned to your device has a .release callback, that is what will be
called. Make sure you set that for each device you create for your bus.
hope this helps,
greg k-h
next prev parent reply other threads:[~2015-11-25 16:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-25 16:21 Releasing bus devices? Andy Lutomirski
2015-11-25 16:37 ` Greg KH [this message]
2015-11-27 17:27 ` Andy Lutomirski
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=20151125163707.GA5363@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
/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