Skip to contentSkip to conversation

thinkpad_acpi: fix a build error

PATCH In review Amerigo Wang 7 participants 18 messages Dec 18, 2009 – Dec 25, 2009 x86 platform drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 thinkpad_acpi: fix a build error

This patch fixes the following build error:

Building modules, stage 2.
MODPOST 1834 modules
ERROR: "snd_card_create" [drivers/platform/x86/thinkpad_acpi.ko] undefined!
ERROR: "snd_ctl_notify" [drivers/platform/x86/thinkpad_acpi.ko] undefined!
ERROR: "snd_ctl_boolean_mono_info" [drivers/platform/x86/thinkpad_acpi.ko] undefined!
ERROR: "snd_ctl_new1" [drivers/platform/x86/thinkpad_acpi.ko] undefined!
ERROR: "snd_card_free" [drivers/platform/x86/thinkpad_acpi.ko] undefined!
ERROR: "snd_card_register" [drivers/platform/x86/thinkpad_acpi.ko] undefined!
ERROR: "snd_ctl_add" [drivers/platform/x86/thinkpad_acpi.ko] undefined!

Cc Len Brown <[email protected]>
Cc Corentin Chary <[email protected]>
Cc Henrique de Moraes Holschuh <[email protected]>
Cc Alan Jenkins <[email protected]>

---

drivers/platform/x86/Kconfig +1 -0
index fc5bf9d..596966c 100644
@@ -215,6 +215,7 @@ config THINKPAD_ACPI
 	depends on ACPI
 	depends on INPUT
 	depends on RFKILL || RFKILL = n
+	depends on SOUND
 	select BACKLIGHT_LCD_SUPPORT
 	select BACKLIGHT_CLASS_DEVICE
 	select HWMON
#1 lore raw

Ingo already sent this patch yesterday.
http://lkml.org/lkml/2009/12/17/25

Quoted 40 lines · Amerigo Wang

This patch fixes the following build error:

 Building modules, stage 2.
 MODPOST 1834 modules
ERROR: "snd_card_create" [drivers/platform/x86/thinkpad_acpi.ko] undefined!
ERROR: "snd_ctl_notify" [drivers/platform/x86/thinkpad_acpi.ko] undefined!
ERROR: "snd_ctl_boolean_mono_info" [drivers/platform/x86/thinkpad_acpi.ko] undefined!
ERROR: "snd_ctl_new1" [drivers/platform/x86/thinkpad_acpi.ko] undefined!
ERROR: "snd_card_free" [drivers/platform/x86/thinkpad_acpi.ko] undefined!
ERROR: "snd_card_register" [drivers/platform/x86/thinkpad_acpi.ko] undefined!
ERROR: "snd_ctl_add" [drivers/platform/x86/thinkpad_acpi.ko] undefined!

Cc Len Brown <[email protected]>
Cc Corentin Chary <[email protected]>
Cc Henrique de Moraes Holschuh <[email protected]>
Cc Alan Jenkins <[email protected]>

---

drivers/platform/x86/Kconfig +0 -0
index fc5bf9d..596966c 100644
@@ -215,6 +215,7 @@ config THINKPAD_ACPI

       depends on ACPI
       depends on INPUT
       depends on RFKILL || RFKILL = n
+       depends on SOUND
       select BACKLIGHT_LCD_SUPPORT
       select BACKLIGHT_CLASS_DEVICE
       select HWMON
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

#2 lore raw

At Fri, 18 Dec 2009 17:42:34 +0800,

Quoted 27 lines · Xiaotian Feng

Ingo already sent this patch yesterday.
http://lkml.org/lkml/2009/12/17/25

Quoted 21 lines · Amerigo Wang

This patch fixes the following build error:

 Building modules, stage 2.
 MODPOST 1834 modules
ERROR: "snd_card_create" [drivers/platform/x86/thinkpad_acpi.ko] undefined!
ERROR: "snd_ctl_notify" [drivers/platform/x86/thinkpad_acpi.ko] undefined!
ERROR: "snd_ctl_boolean_mono_info" [drivers/platform/x86/thinkpad_acpi.ko] undefined!
ERROR: "snd_ctl_new1" [drivers/platform/x86/thinkpad_acpi.ko] undefined!
ERROR: "snd_card_free" [drivers/platform/x86/thinkpad_acpi.ko] undefined!
ERROR: "snd_card_register" [drivers/platform/x86/thinkpad_acpi.ko] undefined!
ERROR: "snd_ctl_add" [drivers/platform/x86/thinkpad_acpi.ko] undefined!

Cc Len Brown <[email protected]>
Cc Corentin Chary <[email protected]>
Cc Henrique de Moraes Holschuh <[email protected]>
Cc Alan Jenkins <[email protected]>
Quoted 10 lines
Quoted 10 lines

---

drivers/platform/x86/Kconfig +0 -0
index fc5bf9d..596966c 100644
@@ -215,6 +215,7 @@ config THINKPAD_ACPI

       depends on ACPI
       depends on INPUT
       depends on RFKILL || RFKILL = n
+       depends on SOUND

The patch isn't correct (I guess the upstream fix is same?).

CONFIG_SOUND is a global config for sound subsystem. The relevant functions are ALSA core part, which is CONFIG_SND.
So, the fix should be:

depends on SND

instead.

Takashi

#3 lore raw
Quoted 43 lines · Takashi Iwai

At Fri, 18 Dec 2009 17:42:34 +0800,

Quoted 26 lines · Xiaotian Feng

Ingo already sent this patch yesterday.
http://lkml.org/lkml/2009/12/17/25

Quoted 20 lines · Amerigo Wang

This patch fixes the following build error:

Building modules, stage 2.
MODPOST 1834 modules
ERROR: "snd_card_create" [drivers/platform/x86/thinkpad_acpi.ko] undefined!
ERROR: "snd_ctl_notify" [drivers/platform/x86/thinkpad_acpi.ko] undefined!
ERROR: "snd_ctl_boolean_mono_info" [drivers/platform/x86/thinkpad_acpi.ko] undefined!
ERROR: "snd_ctl_new1" [drivers/platform/x86/thinkpad_acpi.ko] undefined!
ERROR: "snd_card_free" [drivers/platform/x86/thinkpad_acpi.ko] undefined!
ERROR: "snd_card_register" [drivers/platform/x86/thinkpad_acpi.ko] undefined!
ERROR: "snd_ctl_add" [drivers/platform/x86/thinkpad_acpi.ko] undefined!

Cc Len Brown <[email protected]>
Cc Corentin Chary <[email protected]>
Cc Henrique de Moraes Holschuh <[email protected]>
Cc Alan Jenkins <[email protected]>
Quoted 11 lines

drivers/platform/x86/Kconfig config THINKPAD_ACPI · line 219

Quoted 11 lines

---

drivers/platform/x86/Kconfig +1 -0
index fc5bf9d..596966c 100644
@@ -215,6 +215,7 @@ config THINKPAD_ACPI
       depends on ACPI
       depends on INPUT
       depends on RFKILL || RFKILL = n
+       depends on SOUND
 

The patch isn't correct (I guess the upstream fix is same?).

Quoted 6 lines

CONFIG_SOUND is a global config for sound subsystem. The relevant functions are ALSA core part, which is CONFIG_SND.
So, the fix should be:

depends on SND

yes, I think so ! It should be "depends on SND", and I am testing now!

Quoted 6 lines

instead.

Takashi

Signature · 2 lines
Zhenwen Xu - Seven Helight
Home Page: http://zhwen.org
#4 lore raw
In reply to Takashi Iwai
Quoted 9 lines · Takashi Iwai

The patch isn't correct (I guess the upstream fix is same?).

CONFIG_SOUND is a global config for sound subsystem. The relevant functions are ALSA core part, which is CONFIG_SND.
So, the fix should be:

depends on SND

instead.

Indeed. Ingo already fixed that too.

Although I personally would prefer:
select SOUND
select SND

But anything that stops the build errors will do for now.

Signature · 4 lines
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh
#5 lore raw

At Fri, 18 Dec 2009 12:28:15 -0200,

Quoted 10 lines · Henrique de Moraes Holschuh
Quoted 8 lines · Takashi Iwai

The patch isn't correct (I guess the upstream fix is same?).

CONFIG_SOUND is a global config for sound subsystem. The relevant functions are ALSA core part, which is CONFIG_SND.
So, the fix should be:

depends on SND

Quoted 7 lines
Quoted 1 line

instead.

Indeed. Ingo already fixed that too.

Although I personally would prefer:
select SOUND
select SND

SND already depends on SOUND, so it's just superfluous.

Takashi

#6 lore raw
Quoted 13 lines · Takashi Iwai

At Fri, 18 Dec 2009 12:28:15 -0200,

Quoted 11 lines · Henrique de Moraes Holschuh
Quoted 9 lines · Takashi Iwai

The patch isn't correct (I guess the upstream fix is same?).

CONFIG_SOUND is a global config for sound subsystem. The relevant functions are ALSA core part, which is CONFIG_SND.
So, the fix should be:

depends on SND

instead.

Quoted 7 lines
Quoted 5 lines

Indeed. Ingo already fixed that too.

Although I personally would prefer:
select SOUND
select SND

SND already depends on SOUND, so it's just superfluous.

No, it is not (test it). Which is the main reason why select can be a pain.

Signature · 4 lines
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh
#7 lore raw

At Fri, 18 Dec 2009 13:03:24 -0200,

Quoted 17 lines · Henrique de Moraes Holschuh
Quoted 15 lines · Takashi Iwai

At Fri, 18 Dec 2009 12:28:15 -0200,

Quoted 13 lines · Henrique de Moraes Holschuh
Quoted 9 lines · Takashi Iwai

The patch isn't correct (I guess the upstream fix is same?).

CONFIG_SOUND is a global config for sound subsystem. The relevant functions are ALSA core part, which is CONFIG_SND.
So, the fix should be:

depends on SND

instead.

Indeed. Ingo already fixed that too.

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

Although I personally would prefer:
select SOUND
select SND

SND already depends on SOUND, so it's just superfluous.

No, it is not (test it). Which is the main reason why select can be a pain.

Ah, OK, it's "select". Yeah it's a real pain, and should be avoided in such a case...

Takashi

#8 lore raw
In reply to Henrique de Moraes Holschuh

Hi Henrique,

Quoted 10 lines
Quoted 9 lines

The patch isn't correct (I guess the upstream fix is same?).

CONFIG_SOUND is a global config for sound subsystem. The relevant functions are ALSA core part, which is CONFIG_SND.
So, the fix should be:

depends on SND

instead.

Quoted 7 lines

Indeed. Ingo already fixed that too.

Although I personally would prefer:
select SOUND
select SND

But anything that stops the build errors will do for now.

I still haven't seen this patch in Linus' tree. And you do need select SOUND and SND. Otherwise you still get build errors. I have tested this on my machine. So can someone please submit a proper patch to get this fixed.

Regards

Marcel

#9 lore raw
Quoted 18 lines · On Mon, 21 Dec 2009 14:38:56 -0800 Marcel Holtmann wrote:

Hi Henrique,

Quoted 16 lines
Quoted 9 lines

The patch isn't correct (I guess the upstream fix is same?).

CONFIG_SOUND is a global config for sound subsystem. The relevant functions are ALSA core part, which is CONFIG_SND.
So, the fix should be:

depends on SND

instead.

Indeed. Ingo already fixed that too.

Although I personally would prefer:
select SOUND
select SND

Quoted 6 lines
Quoted 1 line

But anything that stops the build errors will do for now.

I still haven't seen this patch in Linus' tree. And you do need select SOUND and SND. Otherwise you still get build errors. I have tested this on my machine. So can someone please submit a proper patch to get this fixed.

Ugh. Please don't 'select' to build an entire subsystem.

---
~Randy

#16 lore raw
In reply to Marcel Holtmann
Quoted 19 lines · Marcel Holtmann

Hi Henrique,

Quoted 16 lines
Quoted 10 lines

The patch isn't correct (I guess the upstream fix is same?).

CONFIG_SOUND is a global config for sound subsystem. The relevant functions are ALSA core part, which is CONFIG_SND.
So, the fix should be:

depends on SND

instead.

Indeed. Ingo already fixed that too.

Although I personally would prefer:
select SOUND
select SND

Quoted 8 lines
Quoted 2 lines

But anything that stops the build errors will do for now.

I still haven't seen this patch in Linus' tree. And you do need select SOUND and SND. Otherwise you still get build errors. I have tested this on my machine. So can someone please submit a proper patch to get this fixed.

I think my first patch about this can fix it!

http://lkml.org/lkml/2009/12/18/141

I have tested it!

Quoted 7 lines

Regards

Marcel

Signature · 2 lines
Zhenwen Xu - Seven Helight
Home Page: http://zhwen.org
#17 lore raw

Hi Helight,

Quoted 24 lines
Quoted 16 lines
Quoted 16 lines
Quoted 10 lines

The patch isn't correct (I guess the upstream fix is same?).

CONFIG_SOUND is a global config for sound subsystem. The relevant functions are ALSA core part, which is CONFIG_SND.
So, the fix should be:

depends on SND

instead.

Indeed. Ingo already fixed that too.

Although I personally would prefer:
select SOUND
select SND

Quoted 8 lines
Quoted 2 lines

But anything that stops the build errors will do for now.

I still haven't seen this patch in Linus' tree. And you do need select SOUND and SND. Otherwise you still get build errors. I have tested this on my machine. So can someone please submit a proper patch to get this fixed.

Quoted 5 lines

I think my first patch about this can fix it!

http://lkml.org/lkml/2009/12/18/141

I have tested it!

either depends on SND or select SND + SOUND, but one of them has to be pushed into Linus' tree. Personally I don't care which one.

Regards

Marcel

#10 lore raw
In reply to Randy Dunlap
Quoted 17 lines · Randy Dunlap
Quoted 16 lines · On Mon, 21 Dec 2009 14:38:56 -0800 Marcel Holtmann wrote:
Quoted 16 lines
Quoted 9 lines

The patch isn't correct (I guess the upstream fix is same?).

CONFIG_SOUND is a global config for sound subsystem. The relevant functions are ALSA core part, which is CONFIG_SND.
So, the fix should be:

depends on SND

instead.

Indeed. Ingo already fixed that too.

Although I personally would prefer:
select SOUND
select SND

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

But anything that stops the build errors will do for now.

I still haven't seen this patch in Linus' tree. And you do need select SOUND and SND. Otherwise you still get build errors. I have tested this on my machine. So can someone please submit a proper patch to get this fixed.

Ugh. Please don't 'select' to build an entire subsystem.

I won't in this case. I think I will cook up a patch to disable the entire mixer subsystem in thinkpad-acpi if CONFIG_SND is not available. I don't like the depends on SND though.

As for select an entire subsystem, sorry, but I already do that for stuff like input and backlight. Depends is a real CRAP for the user interface in the case of platform drivers like thinkpad-acpi.

If we could get a depends-no-hide thing, that would not cause drivers to simply disappear from the config interface without a trace, then maybe I would have no reason for selects.

Signature · 4 lines
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh
#11 lore raw

At Tue, 22 Dec 2009 17:38:58 -0200,

Quoted 26 lines · Henrique de Moraes Holschuh
Quoted 24 lines · Randy Dunlap
Quoted 22 lines · On Mon, 21 Dec 2009 14:38:56 -0800 Marcel Holtmann wrote:
Quoted 10 lines
Quoted 9 lines

The patch isn't correct (I guess the upstream fix is same?).

CONFIG_SOUND is a global config for sound subsystem. The relevant functions are ALSA core part, which is CONFIG_SND.
So, the fix should be:

depends on SND

instead.

Quoted 7 lines

Indeed. Ingo already fixed that too.

Although I personally would prefer:
select SOUND
select SND

But anything that stops the build errors will do for now.

I still haven't seen this patch in Linus' tree. And you do need select SOUND and SND. Otherwise you still get build errors. I have tested this on my machine. So can someone please submit a proper patch to get this fixed.

Quoted 5 lines
Quoted 1 line

Ugh. Please don't 'select' to build an entire subsystem.

I won't in this case. I think I will cook up a patch to disable the entire mixer subsystem in thinkpad-acpi if CONFIG_SND is not available. I don't like the depends on SND though.

That's also not so trivial unless you give any dependency in Kconfig. Without a restriction, THINKPAD_ACPI=y and SND=m can be chosen.

It'd be also not nice if suddenly a certain functionality disappears without warning (even if the subsystem is enabled but as a module).

thanks,

Takashi

#12 lore raw
Quoted 8 lines · Takashi Iwai

At Tue, 22 Dec 2009 17:38:58 -0200,

Quoted 3 lines · Henrique de Moraes Holschuh

I won't in this case. I think I will cook up a patch to disable the entire mixer subsystem in thinkpad-acpi if CONFIG_SND is not available. I don't like the depends on SND though.

That's also not so trivial unless you give any dependency in Kconfig. Without a restriction, THINKPAD_ACPI=y and SND=m can be chosen.

"depends on SND || SND = n" takes care of the technical restrictions.

I am testing the patch now. No ALSA, no volume subdriver, module still works (and prints some crap to syslog so that the user knows the driver could do more with ALSA support).

Quoted 2 lines

It'd be also not nice if suddenly a certain functionality disappears without warning (even if the subsystem is enabled but as a module).

The warning will be there. Although I don't warn of missing rfkill functionality if the kernel is missing the rfkill subsystem...

Signature · 4 lines
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh
#13 lore raw

At Thu, 24 Dec 2009 16:59:12 -0200,

Quoted 4 lines · Henrique de Moraes Holschuh
Quoted 2 lines · Takashi Iwai

At Tue, 22 Dec 2009 17:38:58 -0200,
Henrique de Moraes Holschuh wrote:

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

I won't in this case. I think I will cook up a patch to disable the entire mixer subsystem in thinkpad-acpi if CONFIG_SND is not available. I don't like the depends on SND though.

That's also not so trivial unless you give any dependency in Kconfig. Without a restriction, THINKPAD_ACPI=y and SND=m can be chosen.

"depends on SND || SND = n" takes care of the technical restrictions.

Yep, that's what I mentioned as Kconfig dependency :)

Quoted 9 lines

I am testing the patch now. No ALSA, no volume subdriver, module still works (and prints some crap to syslog so that the user knows the driver could do more with ALSA support).

Quoted 2 lines

It'd be also not nice if suddenly a certain functionality disappears without warning (even if the subsystem is enabled but as a module).

The warning will be there. Although I don't warn of missing rfkill functionality if the kernel is missing the rfkill subsystem...

The messages could be KERN_INFO instead of KERN_WARNING, I think.

thanks,

Takashi

#14 lore raw
Quoted 3 lines · Takashi Iwai
Quoted 1 line

"depends on SND || SND = n" takes care of the technical restrictions.

Yep, that's what I mentioned as Kconfig dependency :)

I think I will do it a bit different, so that you can opt-out ALSA support and still have thinkpad-acpi built in, with modular ALSA in that case.

Which means that, due to the lack of "depends-but-not-hide", the "thinkpad-acpi alsa support" kconfig entry will still just disappear due to a "depends on SND && SND = THINKPAD_ACPI".

I really want a depends that leaves the entry still visible, but greyed out :-(

Quoted 4 lines
Quoted 2 lines

The warning will be there. Although I don't warn of missing rfkill functionality if the kernel is missing the rfkill subsystem...

The messages could be KERN_INFO instead of KERN_WARNING, I think.

It is at KERN_NOTICE right now.

Signature · 4 lines
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh
#15 lore raw
Quoted 8 lines · On Fri, 25 Dec 2009 11:41:57 -0200 Henrique de Moraes Holschuh wrote:
Quoted 3 lines · Takashi Iwai
Quoted 1 line

"depends on SND || SND = n" takes care of the technical restrictions.

Yep, that's what I mentioned as Kconfig dependency :)

I think I will do it a bit different, so that you can opt-out ALSA support and still have thinkpad-acpi built in, with modular ALSA in that case.

Quoted 6 lines

Which means that, due to the lack of "depends-but-not-hide", the "thinkpad-acpi alsa support" kconfig entry will still just disappear due to a "depends on SND && SND = THINKPAD_ACPI".

I really want a depends that leaves the entry still visible, but greyed out :-(

That makes sense. And you can do that with xconfig, by setting the Show All Options flag in the Option menu, but having that feature for menuconfig and having those disabled options more visible does sound good, I agree.

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

The warning will be there. Although I don't warn of missing rfkill functionality if the kernel is missing the rfkill subsystem...

The messages could be KERN_INFO instead of KERN_WARNING, I think.

It is at KERN_NOTICE right now.

---
~Randy