Skip to contentSkip to conversation

Need to take dev->sem, do it directly or use wrapper?

DISCUSSION Dmitry Torokhov 2 participants 2 messages Jan 4, 2010

lore
Share & tools
lore
#0 lore raw

Greg,

I was looking at restructuring serio a bit and rely more on the infrastructure in the drivre core now that it is more flexible. It all looks good except for one detail - serio provides "reconnect" method which allows user to reinitialize a port whithout tearing down its children input devices. To properly serialize with probe(), remove() and other bus operations I'd need to take dev->sem semaphore. I(s bus code allowed to do this? Can I do it directly or we need to add a wrapper (like device_serialize_access(dev, bool))?

Thanks.

Signature · 1 line
Dmitry
#1 lore raw
Quoted 10 lines · Dmitry Torokhov

Greg,

I was looking at restructuring serio a bit and rely more on the infrastructure in the drivre core now that it is more flexible. It all looks good except for one detail - serio provides "reconnect" method which allows user to reinitialize a port whithout tearing down its children input devices. To properly serialize with probe(), remove() and other bus operations I'd need to take dev->sem semaphore. I(s bus code allowed to do this? Can I do it directly or we need to add a wrapper (like device_serialize_access(dev, bool))?

Adding a wrapper would be best to do.

thanks,

greg k-h