• Mauro Carvalho Chehab's avatar
    [media] cx231xx: Fix unregister logic · 7528cd27
    Mauro Carvalho Chehab authored
    There are several weirdness at the unregister logic.
    
    First of all, IR has a poll thread. This thread needs to be
    removed, as it uses some resources associated to the main driver.
    So, the driver needs to explicitly unregister the I2C client for
    ir-kbd-i2c.
    
    If, for some reason, the driver needs to wait for a close()
    to happen, not all memories will be freed, because the free
    logic were in the wrong place.
    
    Also, v4l2_device_unregister() seems to be called too early,
    as devices are still using it.
    
    Finally, even with the device disconnected, there is one
    USB function call that will still try to talk with it.
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
    7528cd27
ir-kbd-i2c.c 12.1 KB