[alsa-devel] [PATCH 2/2] ASoC: fsl_dma: Do not use 'full_name' node reference
Fabio Estevam
festevam at gmail.com
Wed Jan 7 18:21:52 CET 2015
From: Fabio Estevam <fabio.estevam at freescale.com>
The only usage of 'full_name' is inside an error message, which provides a
rather verbose node path.
A more concise error message can be obtained by using 'pdev->name' instead. It
also makes the kzalloc calculation simpler, as we don't need to take the length
of full_name into account.
Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>
---
Buit tested only.
sound/soc/fsl/fsl_dma.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/fsl/fsl_dma.c b/sound/soc/fsl/fsl_dma.c
index 026da0a..770de20 100644
--- a/sound/soc/fsl/fsl_dma.c
+++ b/sound/soc/fsl/fsl_dma.c
@@ -897,12 +897,12 @@ static int fsl_soc_dma_probe(struct platform_device *pdev)
ret = of_address_to_resource(ssi_np, 0, &res);
if (ret) {
dev_err(&pdev->dev, "could not determine resources for %s\n",
- ssi_np->full_name);
+ pdev->name);
of_node_put(ssi_np);
return ret;
}
- dma = kzalloc(sizeof(*dma) + strlen(np->full_name), GFP_KERNEL);
+ dma = kzalloc(sizeof(*dma), GFP_KERNEL);
if (!dma) {
dev_err(&pdev->dev, "could not allocate dma object\n");
of_node_put(ssi_np);
--
1.9.1
More information about the Alsa-devel
mailing list