Re: [PATCH v3 08/10] iio: adc: ad_sigma_delta: Check for previous ready signals

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

 



Hello Andy,

On Fri, Nov 22, 2024 at 10:17:51PM +0200, Andy Shevchenko wrote:
> On Fri, Nov 22, 2024 at 1:34 PM Uwe Kleine-König
> <u.kleine-koenig@xxxxxxxxxxxx> wrote:
> > +static int ad_sigma_delta_clear_pending_event(struct ad_sigma_delta *sigma_delta)
> > +{
> > +       int ret = 0;
> 
> Unneeded assignment, see below.

With the changes you suggested below this can get a more local scope,
too. That's what I did for v4.
 
> > +               spi_message_add_tail(&t[1], &m);
> 
> Instead you can also use
> 
>   if (...)
>     spi_message_init_with_transfers(..., 2);
>   else
>     spi_message_init_with_transfers(..., 1);

I kept it as is to match the register read function.

Implemented your other suggestions, stay tuned for v4.

Best regards
Uwe

Attachment: signature.asc
Description: PGP signature


[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