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

Reply via email to