lkml.org 
[lkml]   [2015]   [Nov]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Releasing bus devices?
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


\
 
 \ /
  Last update: 2015-11-25 18:01    [W:0.062 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site