Commit 80513607 authored by Mark Brown's avatar Mark Brown

ASoC: Constify static snd_pcm_hardware

Merge series from Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>:

Static 'struct snd_pcm_hardware' is not modified by few drivers and its
copy is passed to the core, so it can be made const for increased code
safety.
parents 741e987d 74a15fab
......@@ -16,7 +16,7 @@
#include "fsl_rpmsg.h"
#include "imx-pcm-rpmsg.h"
static struct snd_pcm_hardware imx_rpmsg_pcm_hardware = {
static const struct snd_pcm_hardware imx_rpmsg_pcm_hardware = {
.info = SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_BLOCK_TRANSFER |
SNDRV_PCM_INFO_BATCH |
......
......@@ -25,7 +25,7 @@
#define AIU_FIFO_I2S_BLOCK 256
static struct snd_pcm_hardware fifo_i2s_pcm = {
static const struct snd_pcm_hardware fifo_i2s_pcm = {
.info = (SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_MMAP |
SNDRV_PCM_INFO_MMAP_VALID |
......
......@@ -27,7 +27,7 @@
#define AIU_FIFO_SPDIF_BLOCK 8
static struct snd_pcm_hardware fifo_spdif_pcm = {
static const struct snd_pcm_hardware fifo_spdif_pcm = {
.info = (SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_MMAP |
SNDRV_PCM_INFO_MMAP_VALID |
......
......@@ -18,7 +18,7 @@ struct snd_pcm_hw_params;
struct platform_device;
struct aiu_fifo {
struct snd_pcm_hardware *pcm;
const struct snd_pcm_hardware *pcm;
unsigned int mem_offset;
unsigned int fifo_block;
struct clk *pclk;
......
......@@ -23,7 +23,7 @@
* These differences are handled in the respective DAI drivers
*/
static struct snd_pcm_hardware axg_fifo_hw = {
static const struct snd_pcm_hardware axg_fifo_hw = {
.info = (SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_MMAP |
SNDRV_PCM_INFO_MMAP_VALID |
......
......@@ -81,7 +81,7 @@ struct q6apm_dai_data {
long long sid;
};
static struct snd_pcm_hardware q6apm_dai_hardware_capture = {
static const struct snd_pcm_hardware q6apm_dai_hardware_capture = {
.info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_BLOCK_TRANSFER |
SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_RESUME |
......@@ -100,7 +100,7 @@ static struct snd_pcm_hardware q6apm_dai_hardware_capture = {
.fifo_size = 0,
};
static struct snd_pcm_hardware q6apm_dai_hardware_playback = {
static const struct snd_pcm_hardware q6apm_dai_hardware_playback = {
.info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_BLOCK_TRANSFER |
SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_RESUME |
......
......@@ -103,7 +103,7 @@ static const struct snd_pcm_hardware q6asm_dai_hardware_capture = {
.fifo_size = 0,
};
static struct snd_pcm_hardware q6asm_dai_hardware_playback = {
static const struct snd_pcm_hardware q6asm_dai_hardware_playback = {
.info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_BATCH |
SNDRV_PCM_INFO_BLOCK_TRANSFER |
SNDRV_PCM_INFO_MMAP_VALID |
......
......@@ -14,7 +14,7 @@
#include "aio.h"
static struct snd_pcm_hardware uniphier_aiodma_hw = {
static const struct snd_pcm_hardware uniphier_aiodma_hw = {
.info = SNDRV_PCM_INFO_MMAP |
SNDRV_PCM_INFO_MMAP_VALID |
SNDRV_PCM_INFO_INTERLEAVED,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment