Commit 4c11a761 authored by Mark Brown's avatar Mark Brown

Merge remote-tracking branch 'asoc/topic/jack' into asoc-next

parents 2620954d f1adf5be
...@@ -607,7 +607,8 @@ struct snd_soc_jack_gpio { ...@@ -607,7 +607,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 {
......
...@@ -250,7 +250,7 @@ static void snd_soc_jack_gpio_detect(struct snd_soc_jack_gpio *gpio) ...@@ -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);
} }
...@@ -342,7 +342,8 @@ int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count, ...@@ -342,7 +342,8 @@ int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count,
gpio_export(gpios[i].gpio, false); gpio_export(gpios[i].gpio, false);
/* Update initial jack status */ /* Update initial jack status */
snd_soc_jack_gpio_detect(&gpios[i]); schedule_delayed_work(&gpios[i].work,
msecs_to_jiffies(gpios[i].debounce_time));
} }
return 0; return 0;
......
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