login
Header Space

 
 

sound/core.h: evil #ifdefs

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <perex@...>, kernel list <linux-kernel@...>, Trivial patch monkey <trivial@...>, <tiwai@...>
Date: Saturday, March 29, 2008 - 4:57 pm

snd_minor_info_oss_* is an function returning int _or_ comment,
depending on config parameters. That is truly evil, fix it.

Signed-off-by: Pavel Machek <pavel@suse.cz>

diff --git a/include/sound/core.h b/include/sound/core.h
index 4fc0235..452000d 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -277,8 +277,8 @@ #ifdef CONFIG_SND_OSSEMUL
 int snd_minor_info_oss_init(void);
 int snd_minor_info_oss_done(void);
 #else
-#define snd_minor_info_oss_init() /*NOP*/
-#define snd_minor_info_oss_done() /*NOP*/
+static inline snd_minor_info_oss_init(void) { return 0; }
+static inline snd_minor_info_oss_done(void) { return 0; }
 #endif
 
 /* memory.c */

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
sound/core.h: evil #ifdefs, Pavel Machek, (Sat Mar 29, 4:57 pm)
Re: sound/core.h: evil #ifdefs, Harvey Harrison, (Sat Mar 29, 5:00 pm)
Re: sound/core.h: evil #ifdefs, Pavel Machek, (Sat Mar 29, 5:39 pm)
speck-geostationary