]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00210937:v4l2: kernel dump caused by remove mxc_v4l2_capture
authorWu Guoxing <b39297@freescale.com>
Thu, 21 Jun 2012 08:11:34 +0000 (16:11 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:34:51 +0000 (08:34 +0200)
kernel dump when do "modprobe -r mxc_v4l2_capture"
this is caused by unregister wrong v4l2 int device when rmmod

Signed-off-by: Wu Guoxing <b39297@freescale.com>
drivers/media/video/mxc/capture/mxc_v4l2_capture.c

index dcfc86800940cace78d8639ff1b258bd99f997c5..5bd4886fec02415b850e2abcf4fa9585d7f693c0 100644 (file)
@@ -176,15 +176,6 @@ static struct v4l2_int_master mxc_v4l2_master = {
        .detach = mxc_v4l2_master_detach,
 };
 
-static struct v4l2_int_device mxc_v4l2_int_device = {
-       .module = THIS_MODULE,
-       .name = "mxc_v4l2_cap",
-       .type = v4l2_int_type_master,
-       .u = {
-               .master = &mxc_v4l2_master,
-               },
-};
-
 /***************************************************************************
  * Functions for handling Frame buffers.
  **************************************************************************/
@@ -2678,7 +2669,6 @@ static int mxc_v4l2_probe(struct platform_device *pdev)
 
        /* Set up the v4l2 device and register it*/
        cam->self->priv = cam;
-       /* This function contains a bug that won't let this be rmmod'd. */
        v4l2_int_device_register(cam->self);
 
        /* register v4l video device */
@@ -2727,7 +2717,7 @@ static int mxc_v4l2_remove(struct platform_device *pdev)
                        &dev_attr_fsl_v4l2_overlay_property);
 
                pr_info("V4L2 freeing image input device\n");
-               v4l2_int_device_unregister(&mxc_v4l2_int_device);
+               v4l2_int_device_unregister(cam->self);
                video_unregister_device(cam->video_dev);
 
                mxc_free_frame_buf(cam);