]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
v4l: xilinx: scd: Inline the xscd_dma_alloc_tx_descriptor() function
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Wed, 3 Apr 2019 20:01:55 +0000 (13:01 -0700)
committerMichal Simek <michal.simek@xilinx.com>
Fri, 5 Apr 2019 11:05:32 +0000 (13:05 +0200)
The function performs a single kzalloc() call, inline it in its caller
to simplify the code.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
drivers/media/platform/xilinx/xilinx-scenechange-dma.c

index b6fd1ce1e2c2d34686b872753b98b93cd5ec02c7..36b90e9d7788b49d508493dce5d45d972be81a59 100644 (file)
@@ -70,24 +70,6 @@ void xscd_dma_irq_handler(struct xscd_device *xscd)
  * Descriptors alloc and free
  */
 
-/**
- * xscd_dma_tx_descriptor - Allocate transaction descriptor
- * @chan: Driver specific dma channel
- *
- * Return: The allocated descriptor on success and NULL on failure.
- */
-static struct xscd_dma_tx_descriptor *
-xscd_dma_alloc_tx_descriptor(struct xscd_dma_chan *chan)
-{
-       struct xscd_dma_tx_descriptor *desc;
-
-       desc = kzalloc(sizeof(*desc), GFP_KERNEL);
-       if (!desc)
-               return NULL;
-
-       return desc;
-}
-
 /**
  * xscd_dma_tx_submit - Submit DMA transaction
  * @tx: Async transaction descriptor
@@ -259,7 +241,7 @@ xscd_dma_prep_interleaved(struct dma_chan *dchan,
        struct xscd_dma_tx_descriptor *desc;
        struct xscd_dma_desc *sw;
 
-       desc = xscd_dma_alloc_tx_descriptor(chan);
+       desc = kzalloc(sizeof(*desc), GFP_KERNEL);
        if (!desc)
                return NULL;