]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
media: marvell-ccic: convert tasklets to use new tasklet_setup() API
authorAllen Pais <allen.lkml@gmail.com>
Mon, 17 Aug 2020 08:31:49 +0000 (10:31 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sat, 29 Aug 2020 06:13:10 +0000 (08:13 +0200)
In preparation for unconditionally passing the
struct tasklet_struct pointer to all tasklet
callbacks, switch to using the new tasklet_setup()
and from_tasklet() to pass the tasklet pointer explicitly.

Signed-off-by: Romain Perier <romain.perier@gmail.com>
Signed-off-by: Allen Pais <allen.lkml@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/marvell-ccic/mcam-core.c

index a967f010341fa35bec28bfccfb51d786d5d4e647..f919cb401b40c7e565d925564f5737e469db9520 100644 (file)
@@ -439,9 +439,9 @@ static void mcam_ctlr_dma_vmalloc(struct mcam_camera *cam)
 /*
  * Copy data out to user space in the vmalloc case
  */
-static void mcam_frame_tasklet(unsigned long data)
+static void mcam_frame_tasklet(struct tasklet_struct *t)
 {
-       struct mcam_camera *cam = (struct mcam_camera *) data;
+       struct mcam_camera *cam = from_tasklet(cam, t, s_tasklet);
        int i;
        unsigned long flags;
        struct mcam_vb_buffer *buf;
@@ -1300,8 +1300,7 @@ static int mcam_setup_vb2(struct mcam_camera *cam)
                break;
        case B_vmalloc:
 #ifdef MCAM_MODE_VMALLOC
-               tasklet_init(&cam->s_tasklet, mcam_frame_tasklet,
-                               (unsigned long) cam);
+               tasklet_setup(&cam->s_tasklet, mcam_frame_tasklet);
                vq->ops = &mcam_vb2_ops;
                vq->mem_ops = &vb2_vmalloc_memops;
                cam->dma_setup = mcam_ctlr_dma_vmalloc;