Re: [PATCH v2 4/6] gpio: cdev: wake up chardev poll() on device unbind

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

 



On Mon, Aug 21, 2023 at 2:43 PM Bartosz Golaszewski <brgl@xxxxxxxx> wrote:
>
> On Fri, Aug 18, 2023 at 12:31 PM Andy Shevchenko
> <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
> >
> > On Thu, Aug 17, 2023 at 08:49:56PM +0200, Bartosz Golaszewski wrote:
> > > From: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>
> > >
> > > Add a notifier block to the gpio_chardev_data structure and register it
> > > with the gpio_device's device notifier. Upon reception of an event, wake
> > > up the wait queue so that the user-space be forced out of poll() and need
> > > to go into a new system call which will then fail due to the chip being
> > > gone.
> >
> > ...
> >
> > > +     struct gpio_chardev_data *cdev = container_of(nb,
> > > +                                                   struct gpio_chardev_data,
> > > +                                                   device_unregistered_nb);
> >
> >         struct gpio_chardev_data *cdev =
> >                 container_of(nb, struct gpio_chardev_data, device_unregistered_nb);
> >
> > ?
>
> I could live with the other version but sure, why not.
>
> I will send a v3 with a helper wrapper around
> blocking_notifier_call_chain() for more brevity.
>

Scratch that, I need coffee. This was supposed to go under the line
state notifications patch.

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