Skip to content

em28xx: move more v4l/dvb specific code to the extension modules and fix the resources handling

Frank Schäfer linux-media 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8em28xx-v4l: fix device initialization in em28xx_v4l2_open() for radio and VBI modedrivers/media/usb/em28xx/em28xx-video.c+11 -50 replies
2/8em28xx: move usb buffer pre-allocation and transfer uninit from the core to the dvb extensiondrivers/media/usb/em28xx/em28xx-cards.c drivers/media/usb/em28xx/em28xx-dvb.c+23 -210 replies
3/8em28xx: move usb transfer uninit on device disconnect from the core to the v4l-extensiondrivers/media/usb/em28xx/em28xx-cards.c drivers/media/usb/em28xx/em28xx-video.c+3 -30 replies
4/8em28xx: move v4l2_device_disconnect() call from the core to the v4l extensiondrivers/media/usb/em28xx/em28xx-cards.c drivers/media/usb/em28xx/em28xx-video.c+5 -100 replies
5/8em28xx-v4l: move v4l2_ctrl_handler freeing and v4l2_device unregistration to em28xx_v4l2_finidrivers/media/usb/em28xx/em28xx-video.c+4 -30 replies
6/8em28xx: move v4l2 dummy clock deregistration from the core to the v4l extensiondrivers/media/usb/em28xx/em28xx-cards.c drivers/media/usb/em28xx/em28xx-video.c+6 -30 replies
7/8em28xx: always call em28xx_release_resources() in the usb disconnect handlerdrivers/media/usb/em28xx/em28xx-cards.c drivers/media/usb/em28xx/em28xx-video.c+5 -80 replies
8/8em28xx-v4l: fix the freeing of the video devices memorydrivers/media/usb/em28xx/em28xx-video.c+30 -260 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFT/RFC PATCH 0/8] em28xx: move more v4l/dvb specific code to the extension modules and fix the resources handling

Patch 1 is fix for the analog device initialization on the first open() call. Patches 2-7 move some dvb and v4l specific code from the core module to the extension modules and fix the resources releasing logic/order in the core and the v4l2 module. This will also fix the various sysfs group remove warnings which we can see since kernel 3.13.
Patch 8 finally removes some dead code lines and fixes leaking the memory of video, vbi and radio video_device structs.

I've tested all patches carefully with the devices I have, but because this is really critical stuff, they should be reviewed and tested by others, too.

Frank Schäfer (8):
em28xx-v4l: fix device initialization in em28xx_v4l2_open() for radio
and VBI mode
em28xx: move usb buffer pre-allocation and transfer uninit from the
core to the dvb extension
em28xx: move usb transfer uninit on device disconnect from the core to
the v4l-extension
em28xx: move v4l2_device_disconnect() call from the core to the v4l
extension
em28xx-v4l: move v4l2_ctrl_handler freeing and v4l2_device
unregistration to em28xx_v4l2_fini
em28xx: move v4l2 dummy clock deregistration from the core to the v4l
extension
em28xx: always call em28xx_release_resources() in the usb disconnect
handler
em28xx-v4l: fix the freeing of the video devices memory

 drivers/media/usb/em28xx/em28xx-cards.c |   48 ++--------------
 drivers/media/usb/em28xx/em28xx-dvb.c   |   23 ++++++++
 drivers/media/usb/em28xx/em28xx-video.c |   91 +++++++++++++++++++------------

3 Dateien geändert, 85 Zeilen hinzugefügt(+), 77 Zeilen entfernt(-)

Signature · 1 line
1.7.10.4