diff options
author | Mikko Rapeli <mikko.rapeli@iki.fi> | 2015-10-15 01:55:55 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-10-15 04:02:26 -0400 |
commit | a82d24f83de2c63199acead488259fcdf947e90e (patch) | |
tree | 1edc00881e781763c99327bd4cab9bfcd751dd13 | |
parent | 5a1f8c42259a424cfd262185da872764dcc673ad (diff) |
ALSA: emu10k1: added EMU10K1 version of DECLARE_BITMAP macro for UAPI
Fixes userspace compilation error:
error: expected specifier-qualifier-list before ‘DECLARE_BITMAP’
DECLARE_BITMAP(gpr_valid, 0x200); /* bitmask of valid initializers */
DECLARE_BITMAP macro is not meant for userspace headers and thus
added here as private copy for emu10k.h.
Fix was suggested by Arnd Bergmann <arnd@arndb.de> in message
<2168807.4Yxh5gl11Q@wuerfel> and Takashi Iwai <tiwai@suse.de>
in message <s5h1thx88tk.wl-tiwai@suse.de> on lkml.
Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | include/uapi/sound/emu10k1.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/include/uapi/sound/emu10k1.h b/include/uapi/sound/emu10k1.h index ec1535bb6aed..5175e166987d 100644 --- a/include/uapi/sound/emu10k1.h +++ b/include/uapi/sound/emu10k1.h | |||
@@ -34,6 +34,14 @@ | |||
34 | 34 | ||
35 | #define EMU10K1_FX8010_PCM_COUNT 8 | 35 | #define EMU10K1_FX8010_PCM_COUNT 8 |
36 | 36 | ||
37 | /* | ||
38 | * Following definition is copied from linux/types.h to support compiling | ||
39 | * this header file in userspace since they are not generally available for | ||
40 | * uapi headers. | ||
41 | */ | ||
42 | #define __EMU10K1_DECLARE_BITMAP(name,bits) \ | ||
43 | unsigned long name[(bits) / (sizeof(unsigned long) * 8)] | ||
44 | |||
37 | /* instruction set */ | 45 | /* instruction set */ |
38 | #define iMAC0 0x00 /* R = A + (X * Y >> 31) ; saturation */ | 46 | #define iMAC0 0x00 /* R = A + (X * Y >> 31) ; saturation */ |
39 | #define iMAC1 0x01 /* R = A + (-X * Y >> 31) ; saturation */ | 47 | #define iMAC1 0x01 /* R = A + (-X * Y >> 31) ; saturation */ |
@@ -300,7 +308,7 @@ struct snd_emu10k1_fx8010_control_old_gpr { | |||
300 | struct snd_emu10k1_fx8010_code { | 308 | struct snd_emu10k1_fx8010_code { |
301 | char name[128]; | 309 | char name[128]; |
302 | 310 | ||
303 | DECLARE_BITMAP(gpr_valid, 0x200); /* bitmask of valid initializers */ | 311 | __EMU10K1_DECLARE_BITMAP(gpr_valid, 0x200); /* bitmask of valid initializers */ |
304 | __u32 __user *gpr_map; /* initializers */ | 312 | __u32 __user *gpr_map; /* initializers */ |
305 | 313 | ||
306 | unsigned int gpr_add_control_count; /* count of GPR controls to add/replace */ | 314 | unsigned int gpr_add_control_count; /* count of GPR controls to add/replace */ |
@@ -313,11 +321,11 @@ struct snd_emu10k1_fx8010_code { | |||
313 | unsigned int gpr_list_control_total; /* total count of GPR controls */ | 321 | unsigned int gpr_list_control_total; /* total count of GPR controls */ |
314 | struct snd_emu10k1_fx8010_control_gpr __user *gpr_list_controls; /* listed GPR controls */ | 322 | struct snd_emu10k1_fx8010_control_gpr __user *gpr_list_controls; /* listed GPR controls */ |
315 | 323 | ||
316 | DECLARE_BITMAP(tram_valid, 0x100); /* bitmask of valid initializers */ | 324 | __EMU10K1_DECLARE_BITMAP(tram_valid, 0x100); /* bitmask of valid initializers */ |
317 | __u32 __user *tram_data_map; /* data initializers */ | 325 | __u32 __user *tram_data_map; /* data initializers */ |
318 | __u32 __user *tram_addr_map; /* map initializers */ | 326 | __u32 __user *tram_addr_map; /* map initializers */ |
319 | 327 | ||
320 | DECLARE_BITMAP(code_valid, 1024); /* bitmask of valid instructions */ | 328 | __EMU10K1_DECLARE_BITMAP(code_valid, 1024); /* bitmask of valid instructions */ |
321 | __u32 __user *code; /* one instruction - 64 bits */ | 329 | __u32 __user *code; /* one instruction - 64 bits */ |
322 | }; | 330 | }; |
323 | 331 | ||