-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "ASoC: tegra: Stack buffer overflow in pcm"
This reverts commit ffb71c4. Reason for revert: No stack buffer overflow as this function is used only in audio driver and with known inputs. Bug 3463493 Change-Id: I262894daa21caf8a1a309a7eb2715a215d9f3b0f Signed-off-by: Mohan Kumar <[email protected]> Reviewed-on: https://git-master.nvidia.com/r/c/linux-4.9/+/2656994 Tested-by: mobile promotions <[email protected]> Reviewed-by: Sharad Gupta <[email protected]> Reviewed-by: mobile promotions <[email protected]> GVS: Gerrit_Virtual_Submit
- Loading branch information
Showing
3 changed files
with
7 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* tegra_pcm.c - Tegra PCM driver | ||
* | ||
* Author: Stephen Warren <[email protected]> | ||
* Copyright (C) 2010-2021, NVIDIA CORPORATION. All rights reserved. | ||
* Copyright (C) 2010,2012 - NVIDIA, Inc. | ||
* | ||
* Based on code copyright/by: | ||
* | ||
|
@@ -58,9 +58,6 @@ static const struct snd_dmaengine_pcm_config tegra_dmaengine_pcm_config = { | |
|
||
int tegra_pcm_platform_register(struct device *dev) | ||
{ | ||
if (!dev) | ||
return -ENOMEM; | ||
|
||
return snd_dmaengine_pcm_register(dev, &tegra_dmaengine_pcm_config, 0); | ||
} | ||
EXPORT_SYMBOL_GPL(tegra_pcm_platform_register); | ||
|
@@ -69,31 +66,17 @@ int tegra_pcm_platform_register_with_chan_names(struct device *dev, | |
struct snd_dmaengine_pcm_config *config, | ||
char *txdmachan, char *rxdmachan) | ||
{ | ||
if (!dev || !config) | ||
return -ENOMEM; | ||
|
||
*config = tegra_dmaengine_pcm_config; | ||
config->dma_dev = dev->parent; | ||
|
||
if (txdmachan && (strlen(txdmachan) < CHAN_NAME_WIDTH)) | ||
config->chan_names[0] = txdmachan; | ||
else | ||
return -ENOMEM; | ||
|
||
if (rxdmachan && (strlen(rxdmachan) < CHAN_NAME_WIDTH)) | ||
config->chan_names[1] = rxdmachan; | ||
else | ||
return -ENOMEM; | ||
config->chan_names[0] = txdmachan; | ||
config->chan_names[1] = rxdmachan; | ||
|
||
return snd_dmaengine_pcm_register(dev, config, 0); | ||
} | ||
EXPORT_SYMBOL_GPL(tegra_pcm_platform_register_with_chan_names); | ||
|
||
void tegra_pcm_platform_unregister(struct device *dev) | ||
{ | ||
if (!dev) | ||
return; | ||
|
||
return snd_dmaengine_pcm_unregister(dev); | ||
} | ||
EXPORT_SYMBOL_GPL(tegra_pcm_platform_unregister); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* tegra_pcm.h - Definitions for Tegra PCM driver | ||
* | ||
* Author: Stephen Warren <[email protected]> | ||
* Copyright (C) 2010-2021, NVIDIA CORPORATION. All rights reserved. | ||
* Copyright (C) 2010,2012 - NVIDIA, Inc. | ||
* | ||
* Based on code copyright/by: | ||
* | ||
|
@@ -31,8 +31,6 @@ | |
#ifndef __TEGRA_PCM_H__ | ||
#define __TEGRA_PCM_H__ | ||
|
||
#define CHAN_NAME_WIDTH 8 | ||
|
||
struct snd_dmaengine_pcm_config; | ||
|
||
int tegra_pcm_platform_register(struct device *dev); | ||
|