On Thu, Nov 17, 2022 at 12:08:13PM +0000, Lee Jones wrote: > +static inline bool f_hidg_is_open(struct f_hidg *hidg) > +{ > + return !!kref_read(&hidg->cdev.kobj.kref); > +} Ick, sorry, no, that's not going to work and is not allowed at all. That's some major layering violations there, AND it can change after you get the value as well. greg k-h