diff options
author | Trent Piepho <xyzzy@speakeasy.org> | 2009-01-12 11:09:46 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-01-29 05:35:38 -0500 |
commit | 45bdcefea25cad2d7443f5b45a5319e2bd201048 (patch) | |
tree | 6503fb5ea8a282a3bae5b29ee2f86655c3ac8130 | |
parent | 7ef5e025535ee220d7ba45dcd82f05ddce8c3e4c (diff) |
V4L/DVB (10222): zoran: Better syntax for initializing array module params
When initializing a module parameter that is a per-card array, use
"{ [0 ... (BUZ_MAX-1)] = -1 }" instead of "{ -1, -1, -1, -1 }". This way
all of the entries will be correctly set to -1 if someone changes BUZ_MAX
to a value other than 4.
Adjust some of the parameter help text too.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/video/zoran/zoran_card.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/media/video/zoran/zoran_card.c b/drivers/media/video/zoran/zoran_card.c index e987d53c294..ae96de08759 100644 --- a/drivers/media/video/zoran/zoran_card.c +++ b/drivers/media/video/zoran/zoran_card.c | |||
@@ -61,17 +61,17 @@ | |||
61 | 61 | ||
62 | extern const struct zoran_format zoran_formats[]; | 62 | extern const struct zoran_format zoran_formats[]; |
63 | 63 | ||
64 | static int card[BUZ_MAX] = { -1, -1, -1, -1 }; | 64 | static int card[BUZ_MAX] = { [0 ... (BUZ_MAX-1)] = -1 }; |
65 | module_param_array(card, int, NULL, 0444); | 65 | module_param_array(card, int, NULL, 0444); |
66 | MODULE_PARM_DESC(card, "The type of card"); | 66 | MODULE_PARM_DESC(card, "Card type"); |
67 | 67 | ||
68 | static int encoder[BUZ_MAX] = { -1, -1, -1, -1 }; | 68 | static int encoder[BUZ_MAX] = { [0 ... (BUZ_MAX-1)] = -1 }; |
69 | module_param_array(encoder, int, NULL, 0444); | 69 | module_param_array(encoder, int, NULL, 0444); |
70 | MODULE_PARM_DESC(encoder, "i2c TV encoder"); | 70 | MODULE_PARM_DESC(encoder, "Video encoder chip"); |
71 | 71 | ||
72 | static int decoder[BUZ_MAX] = { -1, -1, -1, -1 }; | 72 | static int decoder[BUZ_MAX] = { [0 ... (BUZ_MAX-1)] = -1 }; |
73 | module_param_array(decoder, int, NULL, 0444); | 73 | module_param_array(decoder, int, NULL, 0444); |
74 | MODULE_PARM_DESC(decoder, "i2c TV decoder"); | 74 | MODULE_PARM_DESC(decoder, "Video decoder chip"); |
75 | 75 | ||
76 | /* | 76 | /* |
77 | The video mem address of the video card. | 77 | The video mem address of the video card. |
@@ -104,9 +104,9 @@ module_param(default_norm, int, 0444); | |||
104 | MODULE_PARM_DESC(default_norm, "Default norm (0=PAL, 1=NTSC, 2=SECAM)"); | 104 | MODULE_PARM_DESC(default_norm, "Default norm (0=PAL, 1=NTSC, 2=SECAM)"); |
105 | 105 | ||
106 | /* /dev/videoN, -1 for autodetect */ | 106 | /* /dev/videoN, -1 for autodetect */ |
107 | static int video_nr[BUZ_MAX] = {-1, -1, -1, -1}; | 107 | static int video_nr[BUZ_MAX] = { [0 ... (BUZ_MAX-1)] = -1 }; |
108 | module_param_array(video_nr, int, NULL, 0444); | 108 | module_param_array(video_nr, int, NULL, 0444); |
109 | MODULE_PARM_DESC(video_nr, "video device number (-1=Auto)"); | 109 | MODULE_PARM_DESC(video_nr, "Video device number (-1=Auto)"); |
110 | 110 | ||
111 | /* | 111 | /* |
112 | Number and size of grab buffers for Video 4 Linux | 112 | Number and size of grab buffers for Video 4 Linux |