* [uml-devel] v2.6.36-rc3: UML compile error in hostaudio_kern.c
@ 2010-08-29 17:22 Toralf Förster
2010-10-11 19:47 ` Renzo Davoli
0 siblings, 1 reply; 2+ messages in thread
From: Toralf Förster @ 2010-08-29 17:22 UTC (permalink / raw)
To: user-mode-linux-devel
[-- Attachment #1: Type: Text/Plain, Size: 1061 bytes --]
Hello,
I get with the attached config :
...
CC arch/um/drivers/hostaudio_kern.o
CC arch/um/kernel/tlb.o
CC arch/um/os-Linux/start_up.o
arch/um/drivers/hostaudio_kern.c: In function ‘hostaudio_open’:
arch/um/drivers/hostaudio_kern.c:204: error: ‘__param_dsp’ undeclared (first
use in this function)
arch/um/drivers/hostaudio_kern.c:204: error: (Each undeclared identifier is
reported only once
arch/um/drivers/hostaudio_kern.c:204: error: for each function it appears in.)
arch/um/drivers/hostaudio_kern.c: In function ‘hostmixer_open_mixdev’:
arch/um/drivers/hostaudio_kern.c:265: error: ‘__param_mixer’ undeclared (first
use in this function)
arch/um/drivers/hostaudio_kern.c:272: error: ‘__param_dsp’ undeclared (first
use in this function)
make[1]: *** [arch/um/drivers/hostaudio_kern.o] Error 1
make: *** [arch/um/drivers] Error 2
make: *** Waiting for unfinished jobs....
--
MfG/Kind regards
Toralf Förster
pgp finger print: 7B1A 07F4 EC82 0F90 D4C2 8936 872A E508 7DB6 9DA3
[-- Attachment #2: .config --]
[-- Type: application/x-zerosize, Size: 0 bytes --]
[-- Attachment #3: Type: text/plain, Size: 392 bytes --]
------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users
worldwide. Take advantage of special opportunities to increase revenue and
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
[-- Attachment #4: Type: text/plain, Size: 194 bytes --]
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [uml-devel] v2.6.36-rc3: UML compile error in hostaudio_kern.c
2010-08-29 17:22 [uml-devel] v2.6.36-rc3: UML compile error in hostaudio_kern.c Toralf Förster
@ 2010-10-11 19:47 ` Renzo Davoli
0 siblings, 0 replies; 2+ messages in thread
From: Renzo Davoli @ 2010-10-11 19:47 UTC (permalink / raw)
To: Toralf Förster; +Cc: user-mode-linux-devel
On Sun, Aug 29, 2010 at 07:22:04PM +0200, Toralf Förster wrote:
> I get with the attached config :
the attached config is empty... but I have stepped onto the same bug.
The problem happens when hostaudio is linked to the kernel (it is not
a module).
>
> arch/um/drivers/hostaudio_kern.c:204: error: ‘__param_dsp’ undeclared (first
The problem is that dsp and mixer are defined as module_param only when
hostaudio is a module, so __param_dsp is undefined for kparam_block_sysfs_write
when hostaudio is not a module.
The following patch seems to solve the problem.
renzo
----
--- arch/um/drivers/hostaudio_kern.c.orig 2010-10-11 21:36:38.000000000 +0200
+++ arch/um/drivers/hostaudio_kern.c 2010-10-11 21:38:16.000000000 +0200
@@ -187,10 +187,14 @@
int ret;
#ifdef DEBUG
+#ifdef MODULE
kparam_block_sysfs_write(dsp);
+#endif
printk(KERN_DEBUG "hostaudio: open called (host: %s)\n", dsp);
+#ifdef MODULE
kparam_unblock_sysfs_write(dsp);
#endif
+#endif
state = kmalloc(sizeof(struct hostaudio_state), GFP_KERNEL);
if (state == NULL)
@@ -201,11 +205,15 @@
if (file->f_mode & FMODE_WRITE)
w = 1;
+#ifdef MODULE
kparam_block_sysfs_write(dsp);
+#endif
lock_kernel();
ret = os_open_file(dsp, of_set_rw(OPENFLAGS(), r, w), 0);
unlock_kernel();
+#ifdef MODULE
kparam_unblock_sysfs_write(dsp);
+#endif
if (ret < 0) {
kfree(state);
@@ -262,17 +270,25 @@
if (file->f_mode & FMODE_WRITE)
w = 1;
+#ifdef MODULE
kparam_block_sysfs_write(mixer);
+#endif
lock_kernel();
ret = os_open_file(mixer, of_set_rw(OPENFLAGS(), r, w), 0);
unlock_kernel();
+#ifdef MODULE
kparam_unblock_sysfs_write(mixer);
+#endif
if (ret < 0) {
+#ifdef MODULE
kparam_block_sysfs_write(dsp);
+#endif
printk(KERN_ERR "hostaudio_open_mixdev failed to open '%s', "
"err = %d\n", dsp, -ret);
+#ifdef MODULE
kparam_unblock_sysfs_write(dsp);
+#endif
kfree(state);
return ret;
}
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-10-11 19:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-29 17:22 [uml-devel] v2.6.36-rc3: UML compile error in hostaudio_kern.c Toralf Förster
2010-10-11 19:47 ` Renzo Davoli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox