dmaengine: ep93xx: Use struct_size()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 22 Jul 2023 15:58:40 +0000 (17:58 +0200)
committerVinod Koul <vkoul@kernel.org>
Tue, 1 Aug 2023 18:32:51 +0000 (00:02 +0530)
commit926a4b17e9366583142c57e074d8a9e52cadc755
treef5546729fd42b7565e89d4dbfa1bdb9f89c39600
parent897500c7ea91702966adb9b412fa39400b4edee6
dmaengine: ep93xx: Use struct_size()

Use struct_size() instead of hand-writing it, when allocating a structure
with a flex array.

This is less verbose, more robust and more informative.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/36fa11d95b448b5f3f1677da41fe35b9e2751427.1690041500.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/ep93xx_dma.c