linux-um archives
 help / color / mirror / Atom feed
From: Renzo Davoli <renzo@cs.unibo.it>
To: "Toralf Förster" <toralf.foerster@gmx.de>
Cc: user-mode-linux-devel@lists.sourceforge.net
Subject: Re: [uml-devel] v2.6.36-rc3: UML compile error in hostaudio_kern.c
Date: Mon, 11 Oct 2010 21:47:31 +0200	[thread overview]
Message-ID: <20101011194730.GA28783@cs.unibo.it> (raw)
In-Reply-To: <201008291922.05069.toralf.foerster@gmx.de>

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	other threads:[~2010-10-11 19:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101011194730.GA28783@cs.unibo.it \
    --to=renzo@cs.unibo.it \
    --cc=toralf.foerster@gmx.de \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox