ALSA: atmel/ac97c: correct the unexpected behavior when using uninitial value for...
authorBo Shen <voice.shen@atmel.com>
Fri, 11 May 2012 09:39:28 +0000 (17:39 +0800)
committerTakashi Iwai <tiwai@suse.de>
Fri, 11 May 2012 10:10:04 +0000 (12:10 +0200)
commitb2522f9262539fc328b4b9344f8a2f7ef2cb18d5
treeb3a3ab5a135c32591033ec9842d4103b36d20eb2
parent2abb80176cd80ad8e939ead9c785ac17dc9890a4
ALSA: atmel/ac97c: correct the unexpected behavior when using uninitial value for reset pin

When pdata->reset_pin is passed with a negative value (means gpio
is invalid), then chip->reset_pin will not be assigned to a vaule,
it will use default value 0. This will cause unexpected behavior.

So, add this patch to correct.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/atmel/ac97c.c