Re: Bug#244207: kernel-source-2.6.5: mwave gives warning on suspend

From: Herbert Xu
Date: Sat Apr 17 2004 - 06:41:03 EST


tags 244207 pending
quit

On Sat, Apr 17, 2004 at 12:43:11PM +0200, Rolf Kutz wrote:
> Package: kernel-source-2.6.5
> Version: 2.6.5-1
> Severity: normal
>
> The mwave module gives the following warning on suspend:
>
> Apr 16 09:55:13 localhost kernel: Device 'mwave' does not have a release() funct
> ion, it is broken and must be fixed.
> Apr 16 09:55:13 localhost kernel: Badness in device_release at drivers/base/core
> .c:85

Thanks for the report.

This patch should shut the warning up.

Cheers,
--
Debian GNU/Linux 3.0 is out! ( http://www.debian.org/ )
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Index: drivers/char/mwave/mwavedd.c
===================================================================
RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/drivers/char/mwave/mwavedd.c,v
retrieving revision 1.1.1.7
diff -u -r1.1.1.7 mwavedd.c
--- a/drivers/char/mwave/mwavedd.c 28 Sep 2003 04:44:12 -0000 1.1.1.7
+++ b/drivers/char/mwave/mwavedd.c 17 Apr 2004 11:37:52 -0000
@@ -470,7 +470,13 @@
* sysfs support <paulsch@xxxxxxxxxx>
*/

-struct device mwave_device;
+static void mwave_device_release(struct device *dev)
+{
+}
+
+static struct device mwave_device = {
+ .release = mwave_device_release,
+};

/* Prevent code redundancy, create a macro for mwave_show_* functions. */
#define mwave_show_function(attr_name, format_string, field) \