staging/vc04_services: Resolve merge issue over atomic_inc/dec
authorDave Stevenson <dave.stevenson@raspberrypi.org>
Mon, 5 Aug 2019 09:44:38 +0000 (10:44 +0100)
committerPhil Elwell <pelwell@users.noreply.github.com>
Tue, 6 Aug 2019 16:42:50 +0000 (17:42 +0100)
e59fc3ed "staging: bcm2835_camera: Ensure all buffers are returned on
disable" was upstreamed and then backported to 4.19 as fcbc6ddcd.
In merging that upstream update back into our tree, the merge
has failed and we have ended up with duplication of the lines.

Fix up this merge issue.

https://github.com/raspberrypi/linux/issues/3124

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c

index 134b2e7..5bfba5b 100644 (file)
@@ -270,8 +270,6 @@ static void buffer_work_cb(struct work_struct *work)
        if (!buffer->cmd)
                atomic_dec(&msg_context->u.bulk.port->buffers_with_vpu);
 
-       atomic_dec(&msg_context->u.bulk.port->buffers_with_vpu);
-
        msg_context->u.bulk.port->buffer_cb(msg_context->u.bulk.instance,
                                            msg_context->u.bulk.port,
                                            msg_context->u.bulk.status,
@@ -415,8 +413,6 @@ buffer_from_host(struct vchiq_mmal_instance *instance,
 
        atomic_inc(&port->buffers_with_vpu);
 
-       atomic_inc(&port->buffers_with_vpu);
-
        /* prep the buffer from host message */
        memset(&m, 0xbc, sizeof(m));    /* just to make debug clearer */