Re: [PATCH v2 4/6] gpio: cdev: put emitting the line state events on a workqueue

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

 



On Mon, Oct 14, 2024 at 4:09 AM Kent Gibson <warthog618@xxxxxxxxx> wrote:
>
> > +
> > +     scoped_guard(srcu, &ctx->gdev->srcu) {
> > +             gc = srcu_dereference(ctx->gdev->chip, &ctx->gdev->srcu);
> > +             if (!gc)
> > +                     return;
> > +
> > +             /*
> > +              * We're doing this late because it's a sleeping function. Pin
> > +              * functions are in general much more static and while it's not
> > +              * 100% bullet-proof, it's good enough for most cases.
> > +              */
> > +             if (!pinctrl_gpio_can_use_line(gc, ctx->chg.info.offset))
> > +                     ctx->chg.info.flags |= GPIO_V2_LINE_FLAG_USED;
> > +     }
> > +
>
> This block should be conditional on GPIO_V2_LINE_FLAG_USED not already
> being set - most of the time it will be and then this is pointless work.
>

Good point, thanks!

Bart





[Index of Archives]     [Linux SPI]     [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