lkml.org 
[lkml]   [2017]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] driver core: Make sure device detached from driver before deleting it
On Wed, Oct 18, 2017 at 03:06:54PM +0800, jeffy wrote:
> Hi Greg,
>
> Thanks for your reply.
>
> On 10/18/2017 02:19 PM, Greg Kroah-Hartman wrote:
> > On Wed, Oct 18, 2017 at 01:49:26PM +0800, Jeffy Chen wrote:
> > > >There are cases we call device_del() without detaching it from the
> > > >driver(e.g. spi core del children devices).
> > Why would you do that? Shouldn't that be fixed instead of this odd
> > work-around for a broken bus?
> >
> i was thinking since the device_unregister() is called everywhere, maybe
> there are some other drivers missing that too?
>
> and the driver calls device_add(), then the core attaches the device to the
> driver automatically, maybe it would make sense to let the core automatic
> detach it somehow...
>
> but i know nothing about driver core, maybe i should fix it in spi core,
> i'll send new patch for that :)

The SPI core should have some internal housekeeping to do there as well,
right? Is this the only bus that gets this "wrong"?

thanks,

greg k-h

\
 
 \ /
  Last update: 2017-10-22 17:09    [W:0.063 / U:2.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site