Re: [PATCH 01/10] iio: locking: introduce __cleanup() based direct mode claiming infrastructure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 4 Feb 2024 18:26:16 +0200
andy.shevchenko@xxxxxxxxx wrote:

> Sun, Jan 28, 2024 at 03:05:28PM +0000, Jonathan Cameron kirjoitti:
> > From: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
> > 
> > Allows use of:
> > 
> >        iio_device_claim_direct_scoped(return -EBUSY, indio_dev) {
> >        }
> > 
> > to automatically call iio_device_release_direct_mode() based on scope.
> > Typically seen in combination with local device specific locks which
> > are already have automated cleanup options via guard(mutex)(&st->lock)
> > and scoped_guard(). Using both together allows most error handling to
> > be automated.  
> 
> ...
> 
> > +/* This autocleanup logic is normally used via iio_claim_direct_scoped */  
> 
> Wrong name? And missing parentheses.
> 
Oops. I renamed it and missed the comment. Will fix up.




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux