> > > > > +static int lineinfo_ensure_abi_version(struct gpio_chardev_data > > > > > *cdata, > > > > > + unsigned int version) > > > > > +{ > > > > > > > > > + int abiv = atomic_read(&cdata->watch_abi_version); > > > > > + > > > > > + if (abiv ...
> static int lineinfo_ensure_abi_version(struct gpio_chardev_data *cdata, > unsigned int version) > { > int abiv = atomic_cmpxchg(&cdata->watch_abi_version, 0, version); > > if (abiv == version) > return 0; > > return abiv; > } > > > Does that work for you? (assuming ...