USB disconnect(). Question

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



I am using the V4l1 *new* api for my driver.

What should the driver do when USB disconnect() is called while the camera is 
open?

I think i can safely:
1) video_unregister_device() it directly
2) wake_up() everything is waiting for something (this will return ERROR)
3) kfree() the main camera structure
4) so return -EIO if any ioctl, read, mmap is called when the main camera 
structure doesn't exist...
5) in that case, close() will just decrease the open count

Is it the best solution?






[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux