From d5752a3a6787213d6462fc534109d8219c36595d Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Wed, 3 Apr 2019 13:01:55 -0700 Subject: [PATCH 1/1] v4l: xilinx: scd: Inline the xscd_dma_alloc_tx_descriptor() function The function performs a single kzalloc() call, inline it in its caller to simplify the code. Signed-off-by: Laurent Pinchart Reviewed-by: Hyun Kwon --- .../platform/xilinx/xilinx-scenechange-dma.c | 20 +------------------ 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/drivers/media/platform/xilinx/xilinx-scenechange-dma.c b/drivers/media/platform/xilinx/xilinx-scenechange-dma.c index b6fd1ce1e2c2..36b90e9d7788 100644 --- a/drivers/media/platform/xilinx/xilinx-scenechange-dma.c +++ b/drivers/media/platform/xilinx/xilinx-scenechange-dma.c @@ -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; -- 2.39.2