lkml.org 
[lkml]   [2022]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] driver core: Refactor sysfs and drv/bus remove hooks
On Wed, Feb 23, 2022 at 04:52:57PM -0600, Rob Herring wrote:
> There are 3 copies of the same device sysfs cleanup and drv/bus remove()
> hooks used for probe failure, testing re-probing, and device unbinding.
>
> Let's refactor the code to its own function.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> Note that driver_sysfs_remove() remains a separate call because in
> __device_release_driver() it is called with a pm runtime get/put and
> before the unbind notifier. Browsing the history, it doesn't seem like
> there's any particular reason for this ordering. We also have other
> sysfs teardown done later. It would be more logical to do all the
> sysfs teardown at once. Thoughts?

I think it should be unified, so you can send a follow-on patch to do
that.

I'll go queue these changes up now, thanks for the cleanups!

greg k-h

\
 
 \ /
  Last update: 2022-02-24 10:08    [W:0.056 / U:1.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site