Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cb29d7b9 authored by xiangxiao's avatar xiangxiao Committed by Mark Brown
Browse files

ASoC: add data field into snd_soc_jack_gpio



so callback could get the context data as needed

Signed-off-by: default avatarxiangxiao <xiaoxiang@xiaomi.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 38dbfb59
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -600,7 +600,8 @@ struct snd_soc_jack_gpio {
	struct snd_soc_jack *jack;
	struct snd_soc_jack *jack;
	struct delayed_work work;
	struct delayed_work work;


	int (*jack_status_check)(void);
	void *data;
	int (*jack_status_check)(void *data);
};
};


struct snd_soc_jack {
struct snd_soc_jack {
+1 −1
Original line number Original line Diff line number Diff line
@@ -250,7 +250,7 @@ static void snd_soc_jack_gpio_detect(struct snd_soc_jack_gpio *gpio)
		report = 0;
		report = 0;


	if (gpio->jack_status_check)
	if (gpio->jack_status_check)
		report = gpio->jack_status_check();
		report = gpio->jack_status_check(gpio->data);


	snd_soc_jack_report(jack, report, gpio->report);
	snd_soc_jack_report(jack, report, gpio->report);
}
}