[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171018073348.GB1052@kroah.com>
Date: Wed, 18 Oct 2017 09:33:48 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: jeffy <jeffy.chen@...k-chips.com>
Cc: linux-kernel@...r.kernel.org, dmitry.torokhov@...il.com,
heiko@...ech.de, briannorris@...omium.org, rjw@...ysocki.net,
dianders@...omium.org, tfiga@...omium.org, broonie@...nel.org,
seanpaul@...omium.org, thierry.reding@...il.com
Subject: Re: [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
Powered by blists - more mailing lists