diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2017-06-01 21:48:11 +0200 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2017-06-06 23:53:49 -0700 |
commit | d27a30bbc8b0c84a4cc922b201f9e85e9a2de741 (patch) | |
tree | ea268bbb64db80e6a90ded536312b27bc7055ac5 /arch/arm/mach-omap1/dma.c | |
parent | 2ea659a9ef488125eb46da6eb571de5eae5c43f6 (diff) | |
download | linux-d27a30bbc8b0c84a4cc922b201f9e85e9a2de741.tar.gz |
ARM: OMAP1: DMA: Improve a size determination in omap1_system_dma_init()
Replace the specification of a data structure by a pointer dereference
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap1/dma.c')
-rw-r--r-- | arch/arm/mach-omap1/dma.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-omap1/dma.c b/arch/arm/mach-omap1/dma.c index c821c1d5610e..823dba3dc033 100644 --- a/arch/arm/mach-omap1/dma.c +++ b/arch/arm/mach-omap1/dma.c @@ -339,7 +339,7 @@ static int __init omap1_system_dma_init(void) goto exit_iounmap; } - d = kzalloc(sizeof(struct omap_dma_dev_attr), GFP_KERNEL); + d = kzalloc(sizeof(*d), GFP_KERNEL); if (!d) { dev_err(&pdev->dev, "%s: Unable to allocate 'd' for %s\n", __func__, pdev->name); |