File: soundmodule.h

package info (click to toggle)
kernel-source-sparc-2.2.1 2.2.1
  • links: PTS
  • area: main
  • in suites: slink
  • size: 62,800 kB
  • ctags: 188,320
  • sloc: ansic: 1,114,164; asm: 49,922; makefile: 8,272; sh: 1,831; perl: 1,584; tcl: 409; lisp: 218; cpp: 186; awk: 133; sed: 72
file content (31 lines) | stat: -rw-r--r-- 622 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef _SOUNDMODULE_H
#define _SOUNDMODULE_H

#include <linux/notifier.h>

extern struct notifier_block *sound_locker;
extern void sound_notifier_chain_register(struct notifier_block *);

#ifdef MODULE

#define SOUND_LOCK		sound_notifier_chain_register(&sound_notifier); 
#define SOUND_LOCK_END		notifier_chain_unregister(&sound_locker, &sound_notifier)

static int my_notifier_call(struct notifier_block *b, unsigned long foo, void *bar)
{
	if(foo)
		MOD_INC_USE_COUNT;
	else
		MOD_DEC_USE_COUNT;
	return NOTIFY_DONE;
}

static struct notifier_block sound_notifier=
{
	my_notifier_call,
	(void *)0,
	0
};

#endif
#endif