Skip to content

Commit a67ff6a

Browse files
rustyrusselltiwai
authored andcommitted
ALSA: module_param: make bool parameters really bool
module_param(bool) used to counter-intuitively take an int. In fddd520 (mid-2009) we allowed bool or int/unsigned int using a messy trick. It's time to remove the int/unsigned int option. For this version it'll simply give a warning, but it'll break next kernel version. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent 1bba160 commit a67ff6a

109 files changed

Lines changed: 172 additions & 172 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Documentation/DocBook/writing-an-alsa-driver.tmpl‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@
404404
/* SNDRV_CARDS: maximum number of cards supported by this module */
405405
static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;
406406
static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;
407-
static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;
407+
static bool enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;
408408

409409
/* definition of the chip-specific record */
410410
struct mychip {

‎sound/core/oss/pcm_oss.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747

4848
static int dsp_map[SNDRV_CARDS];
4949
static int adsp_map[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 1};
50-
static int nonblock_open = 1;
50+
static bool nonblock_open = 1;
5151

5252
MODULE_AUTHOR("Jaroslav Kysela <perex@perex.cz>, Abramo Bagnara <abramo@alsa-project.org>");
5353
MODULE_DESCRIPTION("PCM OSS emulation for ALSA.");

‎sound/core/seq/seq_dummy.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ MODULE_LICENSE("GPL");
6565
MODULE_ALIAS("snd-seq-client-" __stringify(SNDRV_SEQ_CLIENT_DUMMY));
6666

6767
static int ports = 1;
68-
static int duplex;
68+
static bool duplex;
6969

7070
module_param(ports, int, 0444);
7171
MODULE_PARM_DESC(ports, "number of ports to be created");

‎sound/drivers/aloop.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ MODULE_SUPPORTED_DEVICE("{{ALSA,Loopback soundcard}}");
5151

5252
static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */
5353
static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */
54-
static int enable[SNDRV_CARDS] = {1, [1 ... (SNDRV_CARDS - 1)] = 0};
54+
static bool enable[SNDRV_CARDS] = {1, [1 ... (SNDRV_CARDS - 1)] = 0};
5555
static int pcm_substreams[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 8};
5656
static int pcm_notify[SNDRV_CARDS];
5757

‎sound/drivers/dummy.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,15 @@ MODULE_SUPPORTED_DEVICE("{{ALSA,Dummy soundcard}}");
6060

6161
static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */
6262
static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */
63-
static int enable[SNDRV_CARDS] = {1, [1 ... (SNDRV_CARDS - 1)] = 0};
63+
static bool enable[SNDRV_CARDS] = {1, [1 ... (SNDRV_CARDS - 1)] = 0};
6464
static char *model[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = NULL};
6565
static int pcm_devs[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};
6666
static int pcm_substreams[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 8};
6767
//static int midi_devs[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 2};
6868
#ifdef CONFIG_HIGH_RES_TIMERS
69-
static int hrtimer = 1;
69+
static bool hrtimer = 1;
7070
#endif
71-
static int fake_buffer = 1;
71+
static bool fake_buffer = 1;
7272

7373
module_param_array(index, int, NULL, 0444);
7474
MODULE_PARM_DESC(index, "Index value for dummy soundcard.");

‎sound/drivers/ml403-ac97cr.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ MODULE_SUPPORTED_DEVICE("{{Xilinx,ML403 AC97 Controller Reference}}");
7373

7474
static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;
7575
static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;
76-
static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE;
76+
static bool enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE;
7777

7878
module_param_array(index, int, NULL, 0444);
7979
MODULE_PARM_DESC(index, "Index value for ML403 AC97 Controller Reference.");

‎sound/drivers/mpu401/mpu401.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ MODULE_LICENSE("GPL");
3535

3636
static int index[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = -2}; /* exclude the first card */
3737
static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */
38-
static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE; /* Enable this card */
38+
static bool enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE; /* Enable this card */
3939
#ifdef CONFIG_PNP
40-
static int pnp[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};
40+
static bool pnp[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};
4141
#endif
4242
static long port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT; /* MPU-401 port number */
4343
static int irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ; /* MPU-401 IRQ */
44-
static int uart_enter[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};
44+
static bool uart_enter[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};
4545

4646
module_param_array(index, int, NULL, 0444);
4747
MODULE_PARM_DESC(index, "Index value for MPU-401 device.");

‎sound/drivers/mts64.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;
3838
static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;
39-
static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;
39+
static bool enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;
4040

4141
static struct platform_device *platform_devices[SNDRV_CARDS];
4242
static int device_count;

‎sound/drivers/opl3/opl3_midi.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
extern char snd_opl3_regmap[MAX_OPL2_VOICES][4];
2929

30-
extern int use_internal_drums;
30+
extern bool use_internal_drums;
3131

3232
static void snd_opl3_note_off_unsafe(void *p, int note, int vel,
3333
struct snd_midi_channel *chan);

‎sound/drivers/opl3/opl3_seq.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ MODULE_AUTHOR("Uros Bizjak <uros@kss-loka.si>");
3232
MODULE_LICENSE("GPL");
3333
MODULE_DESCRIPTION("ALSA driver for OPL3 FM synth");
3434

35-
int use_internal_drums = 0;
35+
bool use_internal_drums = 0;
3636
module_param(use_internal_drums, bool, 0444);
3737
MODULE_PARM_DESC(use_internal_drums, "Enable internal OPL2/3 drums.");
3838

0 commit comments

Comments
 (0)