mirror of
https://github.com/torvalds/linux.git
synced 2026-11-29 01:43:18 +00:00
ASoC: codecs: ab8500: Fix casting of private data
ab8500_filter_controls[i].private_value is initialized using
.private_value = (unsigned long)&(struct filter_control)
{.count = xcount, .min = xmin, .max = xmax}
thus it's a pointer to a struct filter_control casted to unsigned long.
So to get back that pointer .private_data must be cast back, not its
address.
Fixes: 679d7abdc7 ("ASoC: codecs: Add AB8500 codec-driver")
Signed-off-by: Christian A. Ehrhardt <[email protected]>
Signed-off-by: Uwe Kleine-König (The Capable Hub) <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
This commit is contained in:
@@ -2496,13 +2496,13 @@ static int ab8500_codec_probe(struct snd_soc_component *component)
|
||||
return status;
|
||||
}
|
||||
fc = (struct filter_control *)
|
||||
&ab8500_filter_controls[AB8500_FILTER_ANC_FIR].private_value;
|
||||
ab8500_filter_controls[AB8500_FILTER_ANC_FIR].private_value;
|
||||
drvdata->anc_fir_values = (long *)fc->value;
|
||||
fc = (struct filter_control *)
|
||||
&ab8500_filter_controls[AB8500_FILTER_ANC_IIR].private_value;
|
||||
ab8500_filter_controls[AB8500_FILTER_ANC_IIR].private_value;
|
||||
drvdata->anc_iir_values = (long *)fc->value;
|
||||
fc = (struct filter_control *)
|
||||
&ab8500_filter_controls[AB8500_FILTER_SID_FIR].private_value;
|
||||
ab8500_filter_controls[AB8500_FILTER_SID_FIR].private_value;
|
||||
drvdata->sid_fir_values = (long *)fc->value;
|
||||
|
||||
snd_soc_dapm_disable_pin(dapm, "ANC Configure Input");
|
||||
|
||||
Reference in New Issue
Block a user