From e28563cceb9f258ebe3c50fc27d8f4ff0ac4bfa4 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 1 Dec 2005 10:42:42 +0100 Subject: [ALSA] Optimize for config without PROC_FS Modules: HWDEP Midlevel,ALSA Core,PCM Midlevel,Timer Midlevel Optimize the code when compiled without CONFIG_PROC_FS. Signed-off-by: Takashi Iwai --- include/sound/info.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'include/sound/info.h') diff --git a/include/sound/info.h b/include/sound/info.h index df03e6017547..8ea5c7497c03 100644 --- a/include/sound/info.h +++ b/include/sound/info.h @@ -87,8 +87,6 @@ struct snd_info_entry { struct semaphore access; }; -int snd_info_check_reserved_words(const char *str); - #if defined(CONFIG_SND_OSSEMUL) && defined(CONFIG_PROC_FS) int snd_info_minor_register(void); int snd_info_minor_unregister(void); @@ -142,6 +140,7 @@ static inline void snd_info_set_text_ops(struct snd_info_entry *entry, entry->c.text.read = read; } +int snd_info_check_reserved_words(const char *str); #else @@ -164,8 +163,14 @@ static inline int snd_info_card_free(struct snd_card * card) { return 0; } static inline int snd_info_register(struct snd_info_entry * entry) { return 0; } static inline int snd_info_unregister(struct snd_info_entry * entry) { return 0; } -#define snd_card_proc_new(card,name,entryp) 0 /* always success */ -#define snd_info_set_text_ops(entry,private_data,read_size,read) /*NOP*/ +static inline int snd_card_proc_new(struct snd_card *card, const char *name, + struct snd_info_entry **entryp) { return -EINVAL; } +static inline void snd_info_set_text_ops(struct snd_info_entry *entry __attribute__((unused)), + void *private_data, + long read_size, + void (*read)(struct snd_info_entry *, struct snd_info_buffer *)) {} + +static inline int snd_info_check_reserved_words(const char *str) { return 1; } #endif -- cgit