Skip to content

Commit

Permalink
Merge remote-tracking branch 'asoc/topic/jack' into asoc-next
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Brown committed Mar 13, 2014
2 parents 2620954 + f1adf5b commit 4c11a76
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion include/sound/soc.h
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,8 @@ struct snd_soc_jack_gpio {
struct snd_soc_jack *jack;
struct delayed_work work;

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

struct snd_soc_jack {
Expand Down
5 changes: 3 additions & 2 deletions sound/soc/soc-jack.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ static void snd_soc_jack_gpio_detect(struct snd_soc_jack_gpio *gpio)
report = 0;

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);
}
Expand Down Expand Up @@ -342,7 +342,8 @@ int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count,
gpio_export(gpios[i].gpio, false);

/* 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;
Expand Down

0 comments on commit 4c11a76

Please sign in to comment.