Re: [PATCH] spi: Fix spi device unregister flow

From: Greg Kroah-Hartman
Date: Tue Apr 27 2021 - 07:49:51 EST


On Tue, Apr 27, 2021 at 02:42:19PM +0300, Andy Shevchenko wrote:
> On Tue, Apr 27, 2021 at 1:49 PM Mark Brown <broonie@xxxxxxxxxx> wrote:
> >
> > On Tue, Apr 27, 2021 at 09:52:48AM +0300, Andy Shevchenko wrote:
> > > +Cc Lukas
> >
> > The cleanup callback has been in release() since the framework was
> > merged AFAICT.
>
> Yep.
>
> Personally it feels to me wrong to require device_release() being
> atomic. It might be that I missed something in documentation or
> somewhere else that suggests the opposite.
> But let's wait for other comments if any.

There is no requirement from the driver core to have the release
callback be "atomic", you should be able to sleep just fine in there.

If not, something is wrong and has changed...

thanks,

greg k-h