Commit 9d0020af authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] au88x0: use proper field of snd_kcontrol_t and don't try to store pointer in int

The au88x0 driver tries to use the wrong private field - there are two,
one of them int and another void *.

While it's not a problem on 32bot boxen, it breaks on 64bit ones. 

Fixed.
parent ef57ecaf
......@@ -765,7 +765,7 @@ snd_vortex_a3d_filter_info(snd_kcontrol_t *
static int
snd_vortex_a3d_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
{
//a3dsrc_t *a = (a3dsrc_t*)(kcontrol->private_value);
//a3dsrc_t *a = kcontrol->private_data;
/* No read yet. Would this be really useable/needed ? */
return 0;
......@@ -775,7 +775,7 @@ static int
snd_vortex_a3d_hrtf_put(snd_kcontrol_t *
kcontrol, snd_ctl_elem_value_t * ucontrol)
{
a3dsrc_t *a = (a3dsrc_t *) (kcontrol->private_value);
a3dsrc_t *a = kcontrol->private_data;
int changed = 1, i;
int coord[6];
for (i = 0; i < 6; i++)
......@@ -792,7 +792,7 @@ static int
snd_vortex_a3d_itd_put(snd_kcontrol_t *
kcontrol, snd_ctl_elem_value_t * ucontrol)
{
a3dsrc_t *a = (a3dsrc_t *) (kcontrol->private_value);
a3dsrc_t *a = kcontrol->private_data;
int coord[6];
int i, changed = 1;
for (i = 0; i < 6; i++)
......@@ -811,7 +811,7 @@ static int
snd_vortex_a3d_ild_put(snd_kcontrol_t *
kcontrol, snd_ctl_elem_value_t * ucontrol)
{
a3dsrc_t *a = (a3dsrc_t *) (kcontrol->private_value);
a3dsrc_t *a = kcontrol->private_data;
int changed = 1;
int l, r;
/* There may be some scale tranlation needed here. */
......@@ -828,7 +828,7 @@ static int
snd_vortex_a3d_filter_put(snd_kcontrol_t
* kcontrol, snd_ctl_elem_value_t * ucontrol)
{
a3dsrc_t *a = (a3dsrc_t *) (kcontrol->private_value);
a3dsrc_t *a = kcontrol->private_data;
int i, changed = 1;
int params[6];
for (i = 0; i < 6; i++)
......@@ -846,12 +846,12 @@ snd_vortex_a3d_filter_put(snd_kcontrol_t
}
static snd_kcontrol_new_t vortex_a3d_kcontrol __devinitdata = {
.iface = SNDRV_CTL_ELEM_IFACE_PCM,.name =
"Playback PCM advanced processing",.index =
0,.access =
SNDRV_CTL_ELEM_ACCESS_READWRITE,.private_value =
0,.info = snd_vortex_a3d_hrtf_info,.get =
snd_vortex_a3d_get,.put = snd_vortex_a3d_hrtf_put
.iface = SNDRV_CTL_ELEM_IFACE_PCM,
.name = "Playback PCM advanced processing",
.access = SNDRV_CTL_ELEM_ACCESS_READWRITE,
.info = snd_vortex_a3d_hrtf_info,
.get = snd_vortex_a3d_get,
.put = snd_vortex_a3d_hrtf_put,
};
/* Control (un)registration. */
......@@ -864,7 +864,7 @@ static int vortex_a3d_register_controls(vortex_t * vortex)
if ((kcontrol =
snd_ctl_new1(&vortex_a3d_kcontrol, vortex)) == NULL)
return -ENOMEM;
kcontrol->private_value = (int)&(vortex->a3d[i]);
kcontrol->private_data = &vortex->a3d[i];
kcontrol->id.numid = CTRLID_HRTF;
kcontrol->info = snd_vortex_a3d_hrtf_info;
kcontrol->put = snd_vortex_a3d_hrtf_put;
......@@ -876,7 +876,7 @@ static int vortex_a3d_register_controls(vortex_t * vortex)
if ((kcontrol =
snd_ctl_new1(&vortex_a3d_kcontrol, vortex)) == NULL)
return -ENOMEM;
kcontrol->private_value = (int)&(vortex->a3d[i]);
kcontrol->private_data = &vortex->a3d[i];
kcontrol->id.numid = CTRLID_ITD;
kcontrol->info = snd_vortex_a3d_itd_info;
kcontrol->put = snd_vortex_a3d_itd_put;
......@@ -888,7 +888,7 @@ static int vortex_a3d_register_controls(vortex_t * vortex)
if ((kcontrol =
snd_ctl_new1(&vortex_a3d_kcontrol, vortex)) == NULL)
return -ENOMEM;
kcontrol->private_value = (int)&(vortex->a3d[i]);
kcontrol->private_data = &vortex->a3d[i];
kcontrol->id.numid = CTRLID_GAINS;
kcontrol->info = snd_vortex_a3d_ild_info;
kcontrol->put = snd_vortex_a3d_ild_put;
......@@ -900,7 +900,7 @@ static int vortex_a3d_register_controls(vortex_t * vortex)
if ((kcontrol =
snd_ctl_new1(&vortex_a3d_kcontrol, vortex)) == NULL)
return -ENOMEM;
kcontrol->private_value = (int)&(vortex->a3d[i]);
kcontrol->private_data = &vortex->a3d[i];
kcontrol->id.numid = CTRLID_FILTER;
kcontrol->info = snd_vortex_a3d_filter_info;
kcontrol->put = snd_vortex_a3d_filter_put;
......
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