* [patch] ALSA: snd-aoa: two copy and paste bugs
@ 2013-11-13 7:45 Dan Carpenter
2013-11-13 8:29 ` Takashi Iwai
0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2013-11-13 7:45 UTC (permalink / raw)
To: Johannes Berg
Cc: alsa-devel, Takashi Iwai, kernel-janitors, Jaroslav Kysela,
linuxppc-dev
These functions were cut and paste and the tests for NULL weren't
updated properly.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/sound/aoa/fabrics/layout.c b/sound/aoa/fabrics/layout.c
index 61ab640..9dc5806 100644
--- a/sound/aoa/fabrics/layout.c
+++ b/sound/aoa/fabrics/layout.c
@@ -644,7 +644,7 @@ static int n##_control_put(struct snd_kcontrol *kcontrol, \
struct snd_ctl_elem_value *ucontrol) \
{ \
struct gpio_runtime *gpio = snd_kcontrol_chip(kcontrol); \
- if (gpio->methods && gpio->methods->get_##n) \
+ if (gpio->methods && gpio->methods->set_##n) \
gpio->methods->set_##n(gpio, \
!!ucontrol->value.integer.value[0]); \
return 1; \
@@ -1135,7 +1135,7 @@ static int aoa_fabric_layout_resume(struct soundbus_dev *sdev)
{
struct layout_dev *ldev = dev_get_drvdata(&sdev->ofdev.dev);
- if (ldev->gpio.methods && ldev->gpio.methods->all_amps_off)
+ if (ldev->gpio.methods && ldev->gpio.methods->all_amps_restore)
ldev->gpio.methods->all_amps_restore(&ldev->gpio);
return 0;
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [patch] ALSA: snd-aoa: two copy and paste bugs
2013-11-13 7:45 [patch] ALSA: snd-aoa: two copy and paste bugs Dan Carpenter
@ 2013-11-13 8:29 ` Takashi Iwai
2013-11-13 8:29 ` Johannes Berg
0 siblings, 1 reply; 3+ messages in thread
From: Takashi Iwai @ 2013-11-13 8:29 UTC (permalink / raw)
To: Dan Carpenter
Cc: alsa-devel, kernel-janitors, Jaroslav Kysela, Johannes Berg,
linuxppc-dev
At Wed, 13 Nov 2013 10:45:20 +0300,
Dan Carpenter wrote:
>
> These functions were cut and paste and the tests for NULL weren't
> updated properly.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Thanks, applied.
Takashi
>
> diff --git a/sound/aoa/fabrics/layout.c b/sound/aoa/fabrics/layout.c
> index 61ab640..9dc5806 100644
> --- a/sound/aoa/fabrics/layout.c
> +++ b/sound/aoa/fabrics/layout.c
> @@ -644,7 +644,7 @@ static int n##_control_put(struct snd_kcontrol *kcontrol, \
> struct snd_ctl_elem_value *ucontrol) \
> { \
> struct gpio_runtime *gpio = snd_kcontrol_chip(kcontrol); \
> - if (gpio->methods && gpio->methods->get_##n) \
> + if (gpio->methods && gpio->methods->set_##n) \
> gpio->methods->set_##n(gpio, \
> !!ucontrol->value.integer.value[0]); \
> return 1; \
> @@ -1135,7 +1135,7 @@ static int aoa_fabric_layout_resume(struct soundbus_dev *sdev)
> {
> struct layout_dev *ldev = dev_get_drvdata(&sdev->ofdev.dev);
>
> - if (ldev->gpio.methods && ldev->gpio.methods->all_amps_off)
> + if (ldev->gpio.methods && ldev->gpio.methods->all_amps_restore)
> ldev->gpio.methods->all_amps_restore(&ldev->gpio);
>
> return 0;
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] ALSA: snd-aoa: two copy and paste bugs
2013-11-13 8:29 ` Takashi Iwai
@ 2013-11-13 8:29 ` Johannes Berg
0 siblings, 0 replies; 3+ messages in thread
From: Johannes Berg @ 2013-11-13 8:29 UTC (permalink / raw)
To: Takashi Iwai
Cc: alsa-devel, kernel-janitors, Jaroslav Kysela, linuxppc-dev,
Dan Carpenter
On Wed, 2013-11-13 at 09:29 +0100, Takashi Iwai wrote:
> At Wed, 13 Nov 2013 10:45:20 +0300,
> Dan Carpenter wrote:
> >
> > These functions were cut and paste and the tests for NULL weren't
> > updated properly.
> >
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> Thanks, applied.
FWIW, looks fine to me - I wonder how long this has been broken though,
must be practically forever. I guess we never got it wrong and missed
adding some pointers? :-)
johannes
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-11-13 9:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-13 7:45 [patch] ALSA: snd-aoa: two copy and paste bugs Dan Carpenter
2013-11-13 8:29 ` Takashi Iwai
2013-11-13 8:29 ` Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).