Re: [PATCH v3 03/11] spi: Lock controller idling transition inside the io_mutex

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

 



On Tue, Jun 21, 2022 at 8:15 AM David Jander <david@xxxxxxxxxxx> wrote:
>
> This way, the spi sync path does not need to deal with the idling
> transition.

...

> -       mutex_lock(&ctlr->io_mutex);
>         ret = __spi_pump_transfer_message(ctlr, msg, was_busy);
>         mutex_unlock(&ctlr->io_mutex);
>
>         /* Prod the scheduler in case transfer_one() was busy waiting */

>         if (!ret)
>                 cond_resched();

In the similar way


ret = ...
if (ret)
  goto out_unlock;

mutex_unlock();
cond_resched();
return;

> +       return;
> +
> +out_unlock:
> +       mutex_unlock(&ctlr->io_mutex);

-- 
With Best Regards,
Andy Shevchenko



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux