提交 815ecf8d 编写于 作者: J Jon Smirl 提交者: Jaroslav Kysela

ALSA: ASoC: convert use of uint to unsigned int

ASOC: convert use of uint to unsigned int
Signed-off-by: NJon Smirl <jonsmirl@gmail.com>
Acked-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
Signed-off-by: NJaroslav Kysela <perex@perex.cz>
上级 0c941615
...@@ -527,7 +527,7 @@ struct snd_soc_pcm_runtime { ...@@ -527,7 +527,7 @@ struct snd_soc_pcm_runtime {
/* mixer control */ /* mixer control */
struct soc_mixer_control { struct soc_mixer_control {
int min, max; int min, max;
uint reg, rreg, shift, rshift, invert; unsigned int reg, rreg, shift, rshift, invert;
}; };
/* enumerated kcontrol */ /* enumerated kcontrol */
......
...@@ -1457,8 +1457,8 @@ int snd_soc_info_volsw(struct snd_kcontrol *kcontrol, ...@@ -1457,8 +1457,8 @@ int snd_soc_info_volsw(struct snd_kcontrol *kcontrol,
struct soc_mixer_control *mc = struct soc_mixer_control *mc =
(struct soc_mixer_control *)kcontrol->private_value; (struct soc_mixer_control *)kcontrol->private_value;
int max = mc->max; int max = mc->max;
uint shift = mc->min; unsigned int shift = mc->min;
uint rshift = mc->rshift; unsigned int rshift = mc->rshift;
if (max == 1) if (max == 1)
uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
...@@ -1487,12 +1487,12 @@ int snd_soc_get_volsw(struct snd_kcontrol *kcontrol, ...@@ -1487,12 +1487,12 @@ int snd_soc_get_volsw(struct snd_kcontrol *kcontrol,
struct soc_mixer_control *mc = struct soc_mixer_control *mc =
(struct soc_mixer_control *)kcontrol->private_value; (struct soc_mixer_control *)kcontrol->private_value;
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
uint reg = mc->reg; unsigned int reg = mc->reg;
uint shift = mc->shift; unsigned int shift = mc->shift;
uint rshift = mc->rshift; unsigned int rshift = mc->rshift;
int max = mc->max; int max = mc->max;
uint mask = (1 << fls(max)) - 1; unsigned int mask = (1 << fls(max)) - 1;
uint invert = mc->invert; unsigned int invert = mc->invert;
ucontrol->value.integer.value[0] = ucontrol->value.integer.value[0] =
(snd_soc_read(codec, reg) >> shift) & mask; (snd_soc_read(codec, reg) >> shift) & mask;
...@@ -1526,12 +1526,12 @@ int snd_soc_put_volsw(struct snd_kcontrol *kcontrol, ...@@ -1526,12 +1526,12 @@ int snd_soc_put_volsw(struct snd_kcontrol *kcontrol,
struct soc_mixer_control *mc = struct soc_mixer_control *mc =
(struct soc_mixer_control *)kcontrol->private_value; (struct soc_mixer_control *)kcontrol->private_value;
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
uint reg = mc->reg; unsigned int reg = mc->reg;
uint shift = mc->shift; unsigned int shift = mc->shift;
uint rshift = mc->rshift; unsigned int rshift = mc->rshift;
int max = mc->max; int max = mc->max;
uint mask = (1 << fls(max)) - 1; unsigned int mask = (1 << fls(max)) - 1;
uint invert = mc->invert; unsigned int invert = mc->invert;
unsigned short val, val2, val_mask; unsigned short val, val2, val_mask;
val = (ucontrol->value.integer.value[0] & mask); val = (ucontrol->value.integer.value[0] & mask);
...@@ -1594,12 +1594,12 @@ int snd_soc_get_volsw_2r(struct snd_kcontrol *kcontrol, ...@@ -1594,12 +1594,12 @@ int snd_soc_get_volsw_2r(struct snd_kcontrol *kcontrol,
struct soc_mixer_control *mc = struct soc_mixer_control *mc =
(struct soc_mixer_control *)kcontrol->private_value; (struct soc_mixer_control *)kcontrol->private_value;
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
uint reg = mc->reg; unsigned int reg = mc->reg;
uint reg2 = mc->rreg; unsigned int reg2 = mc->rreg;
uint shift = mc->shift; unsigned int shift = mc->shift;
int max = mc->max; int max = mc->max;
uint mask = (1<<fls(max))-1; unsigned int mask = (1<<fls(max))-1;
uint invert = mc->invert; unsigned int invert = mc->invert;
ucontrol->value.integer.value[0] = ucontrol->value.integer.value[0] =
(snd_soc_read(codec, reg) >> shift) & mask; (snd_soc_read(codec, reg) >> shift) & mask;
...@@ -1631,12 +1631,12 @@ int snd_soc_put_volsw_2r(struct snd_kcontrol *kcontrol, ...@@ -1631,12 +1631,12 @@ int snd_soc_put_volsw_2r(struct snd_kcontrol *kcontrol,
struct soc_mixer_control *mc = struct soc_mixer_control *mc =
(struct soc_mixer_control *)kcontrol->private_value; (struct soc_mixer_control *)kcontrol->private_value;
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
uint reg = mc->reg; unsigned int reg = mc->reg;
uint reg2 = mc->rreg; unsigned int reg2 = mc->rreg;
uint shift = mc->shift; unsigned int shift = mc->shift;
int max = mc->max; int max = mc->max;
uint mask = (1 << fls(max)) - 1; unsigned int mask = (1 << fls(max)) - 1;
uint invert = mc->invert; unsigned int invert = mc->invert;
int err; int err;
unsigned short val, val2, val_mask; unsigned short val, val2, val_mask;
...@@ -1701,7 +1701,7 @@ int snd_soc_get_volsw_s8(struct snd_kcontrol *kcontrol, ...@@ -1701,7 +1701,7 @@ int snd_soc_get_volsw_s8(struct snd_kcontrol *kcontrol,
struct soc_mixer_control *mc = struct soc_mixer_control *mc =
(struct soc_mixer_control *)kcontrol->private_value; (struct soc_mixer_control *)kcontrol->private_value;
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
uint reg = mc->reg; unsigned int reg = mc->reg;
int min = mc->min; int min = mc->min;
int val = snd_soc_read(codec, reg); int val = snd_soc_read(codec, reg);
...@@ -1728,7 +1728,7 @@ int snd_soc_put_volsw_s8(struct snd_kcontrol *kcontrol, ...@@ -1728,7 +1728,7 @@ int snd_soc_put_volsw_s8(struct snd_kcontrol *kcontrol,
struct soc_mixer_control *mc = struct soc_mixer_control *mc =
(struct soc_mixer_control *)kcontrol->private_value; (struct soc_mixer_control *)kcontrol->private_value;
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
uint reg = mc->reg; unsigned int reg = mc->reg;
int min = mc->min; int min = mc->min;
unsigned short val; unsigned short val;
......
...@@ -106,11 +106,11 @@ static void dapm_set_path_status(struct snd_soc_dapm_widget *w, ...@@ -106,11 +106,11 @@ static void dapm_set_path_status(struct snd_soc_dapm_widget *w,
int val; int val;
struct soc_mixer_control *mc = (struct soc_mixer_control *) struct soc_mixer_control *mc = (struct soc_mixer_control *)
w->kcontrols[i].private_value; w->kcontrols[i].private_value;
uint reg = mc->reg; unsigned int reg = mc->reg;
uint shift = mc->shift; unsigned int shift = mc->shift;
int max = mc->max; int max = mc->max;
uint mask = (1 << fls(max)) - 1; unsigned int mask = (1 << fls(max)) - 1;
uint invert = mc->invert; unsigned int invert = mc->invert;
val = snd_soc_read(w->codec, reg); val = snd_soc_read(w->codec, reg);
val = (val >> shift) & mask; val = (val >> shift) & mask;
...@@ -252,11 +252,11 @@ static int dapm_set_pga(struct snd_soc_dapm_widget *widget, int power) ...@@ -252,11 +252,11 @@ static int dapm_set_pga(struct snd_soc_dapm_widget *widget, int power)
if (widget->num_kcontrols && k) { if (widget->num_kcontrols && k) {
struct soc_mixer_control *mc = struct soc_mixer_control *mc =
(struct soc_mixer_control *)k->private_value; (struct soc_mixer_control *)k->private_value;
uint reg = mc->reg; unsigned int reg = mc->reg;
uint shift = mc->shift; unsigned int shift = mc->shift;
int max = mc->max; int max = mc->max;
uint mask = (1 << fls(max)) - 1; unsigned int mask = (1 << fls(max)) - 1;
uint invert = mc->invert; unsigned int invert = mc->invert;
if (power) { if (power) {
int i; int i;
...@@ -1141,12 +1141,12 @@ int snd_soc_dapm_get_volsw(struct snd_kcontrol *kcontrol, ...@@ -1141,12 +1141,12 @@ int snd_soc_dapm_get_volsw(struct snd_kcontrol *kcontrol,
struct snd_soc_dapm_widget *widget = snd_kcontrol_chip(kcontrol); struct snd_soc_dapm_widget *widget = snd_kcontrol_chip(kcontrol);
struct soc_mixer_control *mc = struct soc_mixer_control *mc =
(struct soc_mixer_control *)kcontrol->private_value; (struct soc_mixer_control *)kcontrol->private_value;
uint reg = mc->reg; unsigned int reg = mc->reg;
uint shift = mc->shift; unsigned int shift = mc->shift;
uint rshift = mc->rshift; unsigned int rshift = mc->rshift;
int max = mc->max; int max = mc->max;
uint invert = mc->invert; unsigned int invert = mc->invert;
uint mask = (1 << fls(max)) - 1; unsigned int mask = (1 << fls(max)) - 1;
/* return the saved value if we are powered down */ /* return the saved value if we are powered down */
if (widget->id == snd_soc_dapm_pga && !widget->power) { if (widget->id == snd_soc_dapm_pga && !widget->power) {
...@@ -1186,12 +1186,12 @@ int snd_soc_dapm_put_volsw(struct snd_kcontrol *kcontrol, ...@@ -1186,12 +1186,12 @@ int snd_soc_dapm_put_volsw(struct snd_kcontrol *kcontrol,
struct snd_soc_dapm_widget *widget = snd_kcontrol_chip(kcontrol); struct snd_soc_dapm_widget *widget = snd_kcontrol_chip(kcontrol);
struct soc_mixer_control *mc = struct soc_mixer_control *mc =
(struct soc_mixer_control *)kcontrol->private_value; (struct soc_mixer_control *)kcontrol->private_value;
uint reg = mc->reg; unsigned int reg = mc->reg;
uint shift = mc->shift; unsigned int shift = mc->shift;
uint rshift = mc->rshift; unsigned int rshift = mc->rshift;
int max = mc->max; int max = mc->max;
uint mask = (1 << fls(max)) - 1; unsigned int mask = (1 << fls(max)) - 1;
uint invert = mc->invert; unsigned int invert = mc->invert;
unsigned short val, val2, val_mask; unsigned short val, val2, val_mask;
int ret; int ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册