28 Jul
2008
28 Jul
'08
7:01 p.m.
At Mon, 28 Jul 2008 17:50:35 +0100, Mark Brown wrote:
+/**
- Jack types which can be reported. These values are used as a
- bitmask.
- */
+enum snd_jack_types {
- SND_JACK_HEADPHONE = 0x0001,
- SND_JACK_MICROPHONE = 0x0002,
- SND_JACK_HEADSET = 0x0003, /* Both microphone and headphone */
They are bitmask, so HEADSET should be better defined as SND_JACK_HEADPHONE | SND_JACK_MICROPHONE ?
+void snd_jack_set_parent(struct snd_jack *jack, struct device *parent) +{
- BUG_ON(jack->registered);
I'm afraid BUG_ON() is brutal for this kind of check.
Takashi