[U-Boot] [PATCH v2 03/22] dm: sound: Rename samsung_i2s_priv to i2s_uc_priv
Simon Glass
sjg at chromium.org
Mon Dec 10 17:37:32 UTC 2018
This structure contains information that is likely needed by any i2s
driver so it seems useful to attach it to the (forthcoming) i2c uclass.
For now, just rename it.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
Changes in v2: None
drivers/sound/samsung-i2s.c | 4 ++--
drivers/sound/sound-i2s.c | 10 +++++-----
include/i2s.h | 6 +++---
3 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/sound/samsung-i2s.c b/drivers/sound/samsung-i2s.c
index c07d3cdb4c8..5cd585808ab 100644
--- a/drivers/sound/samsung-i2s.c
+++ b/drivers/sound/samsung-i2s.c
@@ -255,7 +255,7 @@ static int i2s_set_samplesize(struct i2s_reg *i2s_reg, unsigned int blc)
return 0;
}
-int i2s_transfer_tx_data(struct samsung_i2s_priv *pi2s_tx, unsigned int *data,
+int i2s_transfer_tx_data(struct i2s_uc_priv *pi2s_tx, unsigned int *data,
unsigned long data_size)
{
int i;
@@ -293,7 +293,7 @@ int i2s_transfer_tx_data(struct samsung_i2s_priv *pi2s_tx, unsigned int *data,
return 0;
}
-int i2s_tx_init(struct samsung_i2s_priv *pi2s_tx)
+int i2s_tx_init(struct i2s_uc_priv *pi2s_tx)
{
int ret;
struct i2s_reg *i2s_reg =
diff --git a/drivers/sound/sound-i2s.c b/drivers/sound/sound-i2s.c
index 106842a23db..ed130750b2e 100644
--- a/drivers/sound/sound-i2s.c
+++ b/drivers/sound/sound-i2s.c
@@ -20,15 +20,15 @@
#define SOUND_400_HZ 400
#define SOUND_BITS_IN_BYTE 8
-static struct samsung_i2s_priv g_i2stx_pri;
+static struct i2s_uc_priv g_i2stx_pri;
/*
* get_sound_i2s_values gets values for i2s parameters
*
- * @param samsung_i2s_priv i2s transmitter transfer param structure
+ * @param i2s_uc_priv i2s transmitter transfer param structure
* @param blob FDT blob if enabled else NULL
*/
-static int get_sound_i2s_values(struct samsung_i2s_priv *i2s, const void *blob)
+static int get_sound_i2s_values(struct i2s_uc_priv *i2s, const void *blob)
{
int node;
int error = 0;
@@ -97,7 +97,7 @@ static int get_sound_i2s_values(struct samsung_i2s_priv *i2s, const void *blob)
* @param pi2s_tx i2s parameters required by codec
* @return int value, 0 for success
*/
-static int codec_init(const void *blob, struct samsung_i2s_priv *pi2s_tx)
+static int codec_init(const void *blob, struct i2s_uc_priv *pi2s_tx)
{
int ret;
const char *codectype;
@@ -145,7 +145,7 @@ static int codec_init(const void *blob, struct samsung_i2s_priv *pi2s_tx)
int sound_init(const void *blob)
{
int ret;
- struct samsung_i2s_priv *pi2s_tx = &g_i2stx_pri;
+ struct i2s_uc_priv *pi2s_tx = &g_i2stx_pri;
/* Get the I2S Values */
if (get_sound_i2s_values(pi2s_tx, blob) < 0) {
diff --git a/include/i2s.h b/include/i2s.h
index 800473abd9c..f23862ca040 100644
--- a/include/i2s.h
+++ b/include/i2s.h
@@ -76,7 +76,7 @@ struct i2s_reg {
};
/* This structure stores the i2s related information */
-struct samsung_i2s_priv {
+struct i2s_uc_priv {
unsigned int rfs; /* LR clock frame size */
unsigned int bfs; /* Bit slock frame size */
unsigned int audio_pll_clk; /* Audio pll frequency in Hz */
@@ -96,7 +96,7 @@ struct samsung_i2s_priv {
*
* @return int value 0 for success, -1 in case of error
*/
-int i2s_transfer_tx_data(struct samsung_i2s_priv *pi2s_tx, uint *data,
+int i2s_transfer_tx_data(struct i2s_uc_priv *pi2s_tx, unsigned int *data,
unsigned long data_size);
/*
@@ -106,6 +106,6 @@ int i2s_transfer_tx_data(struct samsung_i2s_priv *pi2s_tx, uint *data,
*
* @return int value 0 for success, -1 in case of error
*/
-int i2s_tx_init(struct samsung_i2s_priv *pi2s_tx);
+int i2s_tx_init(struct i2s_uc_priv *pi2s_tx);
#endif /* __I2S_H__ */
--
2.20.0.rc2.403.gdbc3b29805-goog
More information about the U-Boot
mailing list