Re: [PATCH] mmc: renesas_sdhi: improve registering irqs

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

 



On Mon, 31 Mar 2025 at 08:44, Wolfram Sang
<wsa+renesas@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> The probe() function is convoluted enough, so merge sanity checks for
> number of irqs into one place. Also, change the error code for 'no irq'
> because ENXIO will not print a warning from the driver core.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>

Applied for next, thanks!

Kind regards
Uffe


> ---
>
> Tested on a Renesas Spider board (R-Car S4)
>
>  drivers/mmc/host/renesas_sdhi_core.c | 11 +++--------
>  1 file changed, 3 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
> index 8c83e203c516..4642fdb8bf65 100644
> --- a/drivers/mmc/host/renesas_sdhi_core.c
> +++ b/drivers/mmc/host/renesas_sdhi_core.c
> @@ -1240,15 +1240,10 @@ int renesas_sdhi_probe(struct platform_device *pdev,
>
>         sd_ctrl_write32_as_16_and_16(host, CTL_IRQ_MASK, host->sdcard_irq_mask_all);
>
> -       num_irqs = platform_irq_count(pdev);
> -       if (num_irqs < 0) {
> -               ret = num_irqs;
> -               goto edisclk;
> -       }
> -
>         /* There must be at least one IRQ source */
> -       if (!num_irqs) {
> -               ret = -ENXIO;
> +       num_irqs = platform_irq_count(pdev);
> +       if (num_irqs <= 0) {
> +               ret = num_irqs ?: -ENOENT;
>                 goto edisclk;
>         }
>
> --
> 2.47.2
>




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux