diff options
author | Jean-François Moine <moinejf@free.fr> | 2010-10-19 11:29:10 +0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-10-21 20:50:06 +0400 |
commit | 780e312175f688ab5ab6124c91d46fa2b9afe2d2 (patch) | |
tree | 3830f521b82765b0cfa71e7bb1a4a617091d685f /drivers/media/video/gspca/m5602 | |
parent | 76ad3b684ae6bf43662f8fc57501e4ad0e3b12e8 (diff) | |
download | linux-780e312175f688ab5ab6124c91d46fa2b9afe2d2.tar.xz |
[media] gspca: Fix coding style issues
The errors were found by checkpatch.pl. Most fixes are:
- remove spaces followed by TAB(s),
- split lines greater than 80 characters,
- move most '{'s from start of line to end of previous line.
(Some '{'s at start of line remain when the '}'s are on the same line)
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca/m5602')
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_mt9m111.c | 48 | ||||
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_mt9m111.h | 14 | ||||
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_ov7660.c | 70 | ||||
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_ov7660.h | 9 | ||||
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_ov9650.c | 102 | ||||
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_ov9650.h | 12 | ||||
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_po1030.c | 136 | ||||
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_po1030.h | 13 | ||||
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_s5k4aa.c | 28 | ||||
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_s5k4aa.h | 14 | ||||
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_s5k83a.h | 12 |
11 files changed, 217 insertions, 241 deletions
diff --git a/drivers/media/video/gspca/m5602/m5602_mt9m111.c b/drivers/media/video/gspca/m5602/m5602_mt9m111.c index c0722fa64606..0d605a52b924 100644 --- a/drivers/media/video/gspca/m5602/m5602_mt9m111.c +++ b/drivers/media/video/gspca/m5602/m5602_mt9m111.c @@ -109,14 +109,14 @@ static const struct ctrl mt9m111_ctrls[] = { #define GREEN_BALANCE_IDX 4 { { - .id = M5602_V4L2_CID_GREEN_BALANCE, - .type = V4L2_CTRL_TYPE_INTEGER, - .name = "green balance", - .minimum = 0x00, - .maximum = 0x7ff, - .step = 0x1, - .default_value = MT9M111_GREEN_GAIN_DEFAULT, - .flags = V4L2_CTRL_FLAG_SLIDER + .id = M5602_V4L2_CID_GREEN_BALANCE, + .type = V4L2_CTRL_TYPE_INTEGER, + .name = "green balance", + .minimum = 0x00, + .maximum = 0x7ff, + .step = 0x1, + .default_value = MT9M111_GREEN_GAIN_DEFAULT, + .flags = V4L2_CTRL_FLAG_SLIDER }, .set = mt9m111_set_green_balance, .get = mt9m111_get_green_balance @@ -124,14 +124,14 @@ static const struct ctrl mt9m111_ctrls[] = { #define BLUE_BALANCE_IDX 5 { { - .id = V4L2_CID_BLUE_BALANCE, - .type = V4L2_CTRL_TYPE_INTEGER, - .name = "blue balance", - .minimum = 0x00, - .maximum = 0x7ff, - .step = 0x1, - .default_value = MT9M111_BLUE_GAIN_DEFAULT, - .flags = V4L2_CTRL_FLAG_SLIDER + .id = V4L2_CID_BLUE_BALANCE, + .type = V4L2_CTRL_TYPE_INTEGER, + .name = "blue balance", + .minimum = 0x00, + .maximum = 0x7ff, + .step = 0x1, + .default_value = MT9M111_BLUE_GAIN_DEFAULT, + .flags = V4L2_CTRL_FLAG_SLIDER }, .set = mt9m111_set_blue_balance, .get = mt9m111_get_blue_balance @@ -139,14 +139,14 @@ static const struct ctrl mt9m111_ctrls[] = { #define RED_BALANCE_IDX 5 { { - .id = V4L2_CID_RED_BALANCE, - .type = V4L2_CTRL_TYPE_INTEGER, - .name = "red balance", - .minimum = 0x00, - .maximum = 0x7ff, - .step = 0x1, - .default_value = MT9M111_RED_GAIN_DEFAULT, - .flags = V4L2_CTRL_FLAG_SLIDER + .id = V4L2_CID_RED_BALANCE, + .type = V4L2_CTRL_TYPE_INTEGER, + .name = "red balance", + .minimum = 0x00, + .maximum = 0x7ff, + .step = 0x1, + .default_value = MT9M111_RED_GAIN_DEFAULT, + .flags = V4L2_CTRL_FLAG_SLIDER }, .set = mt9m111_set_red_balance, .get = mt9m111_get_red_balance diff --git a/drivers/media/video/gspca/m5602/m5602_mt9m111.h b/drivers/media/video/gspca/m5602/m5602_mt9m111.h index b3de77823091..b1f0c492036a 100644 --- a/drivers/media/video/gspca/m5602/m5602_mt9m111.h +++ b/drivers/media/video/gspca/m5602/m5602_mt9m111.h @@ -70,7 +70,7 @@ #define MT9M111_COLORPIPE 0x01 #define MT9M111_CAMERA_CONTROL 0x02 -#define MT9M111_RESET (1 << 0) +#define MT9M111_RESET (1 << 0) #define MT9M111_RESTART (1 << 1) #define MT9M111_ANALOG_STANDBY (1 << 2) #define MT9M111_CHIP_ENABLE (1 << 3) @@ -97,7 +97,7 @@ #define MT9M111_2D_DEFECT_CORRECTION_ENABLE (1 << 0) #define INITIAL_MAX_GAIN 64 -#define MT9M111_DEFAULT_GAIN 283 +#define MT9M111_DEFAULT_GAIN 283 #define MT9M111_GREEN_GAIN_DEFAULT 0x20 #define MT9M111_BLUE_GAIN_DEFAULT 0x20 #define MT9M111_RED_GAIN_DEFAULT 0x20 @@ -125,8 +125,7 @@ static const struct m5602_sensor mt9m111 = { .start = mt9m111_start, }; -static const unsigned char preinit_mt9m111[][4] = -{ +static const unsigned char preinit_mt9m111[][4] = { {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02, 0x00}, {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0, 0x00}, {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00}, @@ -165,8 +164,7 @@ static const unsigned char preinit_mt9m111[][4] = {BRIDGE, M5602_XB_I2C_CLK_DIV, 0x0a, 0x00} }; -static const unsigned char init_mt9m111[][4] = -{ +static const unsigned char init_mt9m111[][4] = { {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02, 0x00}, {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0, 0x00}, {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00}, @@ -257,8 +255,7 @@ static const unsigned char init_mt9m111[][4] = {SENSOR, MT9M111_SC_SHUTTER_WIDTH, 0x01, 0x90}, }; -static const unsigned char start_mt9m111[][4] = -{ +static const unsigned char start_mt9m111[][4] = { {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x06, 0x00}, {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00}, {BRIDGE, M5602_XB_ADC_CTRL, 0xc0, 0x00}, @@ -271,5 +268,4 @@ static const unsigned char start_mt9m111[][4] = {BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00}, {BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00}, }; - #endif diff --git a/drivers/media/video/gspca/m5602/m5602_ov7660.c b/drivers/media/video/gspca/m5602/m5602_ov7660.c index 62c1cbf06666..b12f60464b3b 100644 --- a/drivers/media/video/gspca/m5602/m5602_ov7660.c +++ b/drivers/media/video/gspca/m5602/m5602_ov7660.c @@ -54,13 +54,13 @@ static const struct ctrl ov7660_ctrls[] = { #define AUTO_WHITE_BALANCE_IDX 4 { { - .id = V4L2_CID_AUTO_WHITE_BALANCE, - .type = V4L2_CTRL_TYPE_BOOLEAN, - .name = "auto white balance", - .minimum = 0, - .maximum = 1, - .step = 1, - .default_value = 1 + .id = V4L2_CID_AUTO_WHITE_BALANCE, + .type = V4L2_CTRL_TYPE_BOOLEAN, + .name = "auto white balance", + .minimum = 0, + .maximum = 1, + .step = 1, + .default_value = 1 }, .set = ov7660_set_auto_white_balance, .get = ov7660_get_auto_white_balance @@ -68,13 +68,13 @@ static const struct ctrl ov7660_ctrls[] = { #define AUTO_GAIN_CTRL_IDX 5 { { - .id = V4L2_CID_AUTOGAIN, - .type = V4L2_CTRL_TYPE_BOOLEAN, - .name = "auto gain control", - .minimum = 0, - .maximum = 1, - .step = 1, - .default_value = 1 + .id = V4L2_CID_AUTOGAIN, + .type = V4L2_CTRL_TYPE_BOOLEAN, + .name = "auto gain control", + .minimum = 0, + .maximum = 1, + .step = 1, + .default_value = 1 }, .set = ov7660_set_auto_gain, .get = ov7660_get_auto_gain @@ -82,13 +82,13 @@ static const struct ctrl ov7660_ctrls[] = { #define AUTO_EXPOSURE_IDX 6 { { - .id = V4L2_CID_EXPOSURE_AUTO, - .type = V4L2_CTRL_TYPE_BOOLEAN, - .name = "auto exposure", - .minimum = 0, - .maximum = 1, - .step = 1, - .default_value = 1 + .id = V4L2_CID_EXPOSURE_AUTO, + .type = V4L2_CTRL_TYPE_BOOLEAN, + .name = "auto exposure", + .minimum = 0, + .maximum = 1, + .step = 1, + .default_value = 1 }, .set = ov7660_set_auto_exposure, .get = ov7660_get_auto_exposure @@ -96,13 +96,13 @@ static const struct ctrl ov7660_ctrls[] = { #define HFLIP_IDX 7 { { - .id = V4L2_CID_HFLIP, - .type = V4L2_CTRL_TYPE_BOOLEAN, - .name = "horizontal flip", - .minimum = 0, - .maximum = 1, - .step = 1, - .default_value = 0 + .id = V4L2_CID_HFLIP, + .type = V4L2_CTRL_TYPE_BOOLEAN, + .name = "horizontal flip", + .minimum = 0, + .maximum = 1, + .step = 1, + .default_value = 0 }, .set = ov7660_set_hflip, .get = ov7660_get_hflip @@ -110,13 +110,13 @@ static const struct ctrl ov7660_ctrls[] = { #define VFLIP_IDX 8 { { - .id = V4L2_CID_VFLIP, - .type = V4L2_CTRL_TYPE_BOOLEAN, - .name = "vertical flip", - .minimum = 0, - .maximum = 1, - .step = 1, - .default_value = 0 + .id = V4L2_CID_VFLIP, + .type = V4L2_CTRL_TYPE_BOOLEAN, + .name = "vertical flip", + .minimum = 0, + .maximum = 1, + .step = 1, + .default_value = 0 }, .set = ov7660_set_vflip, .get = ov7660_get_vflip diff --git a/drivers/media/video/gspca/m5602/m5602_ov7660.h b/drivers/media/video/gspca/m5602/m5602_ov7660.h index 4d9dcf29da2e..2efd607987ec 100644 --- a/drivers/media/video/gspca/m5602/m5602_ov7660.h +++ b/drivers/media/video/gspca/m5602/m5602_ov7660.h @@ -80,7 +80,7 @@ #define OV7660_DEFAULT_GAIN 0x0e #define OV7660_DEFAULT_RED_GAIN 0x80 -#define OV7660_DEFAULT_BLUE_GAIN 0x80 +#define OV7660_DEFAULT_BLUE_GAIN 0x80 #define OV7660_DEFAULT_SATURATION 0x00 #define OV7660_DEFAULT_EXPOSURE 0x20 @@ -105,8 +105,7 @@ static const struct m5602_sensor ov7660 = { .disconnect = ov7660_disconnect, }; -static const unsigned char preinit_ov7660[][4] = -{ +static const unsigned char preinit_ov7660[][4] = { {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02}, {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0}, {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00}, @@ -140,8 +139,7 @@ static const unsigned char preinit_ov7660[][4] = {BRIDGE, M5602_XB_GPIO_EN_L, 0x00} }; -static const unsigned char init_ov7660[][4] = -{ +static const unsigned char init_ov7660[][4] = { {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02}, {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0}, {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00}, @@ -259,5 +257,4 @@ static const unsigned char init_ov7660[][4] = {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00}, {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0}, }; - #endif diff --git a/drivers/media/video/gspca/m5602/m5602_ov9650.c b/drivers/media/video/gspca/m5602/m5602_ov9650.c index 069ba0044f8b..8ded8b100576 100644 --- a/drivers/media/video/gspca/m5602/m5602_ov9650.c +++ b/drivers/media/video/gspca/m5602/m5602_ov9650.c @@ -121,8 +121,8 @@ static const struct ctrl ov9650_ctrls[] = { .minimum = 0x00, .maximum = 0x1ff, .step = 0x4, - .default_value = EXPOSURE_DEFAULT, - .flags = V4L2_CTRL_FLAG_SLIDER + .default_value = EXPOSURE_DEFAULT, + .flags = V4L2_CTRL_FLAG_SLIDER }, .set = ov9650_set_exposure, .get = ov9650_get_exposure @@ -146,13 +146,13 @@ static const struct ctrl ov9650_ctrls[] = { { { .id = V4L2_CID_RED_BALANCE, - .type = V4L2_CTRL_TYPE_INTEGER, - .name = "red balance", - .minimum = 0x00, - .maximum = 0xff, - .step = 0x1, - .default_value = RED_GAIN_DEFAULT, - .flags = V4L2_CTRL_FLAG_SLIDER + .type = V4L2_CTRL_TYPE_INTEGER, + .name = "red balance", + .minimum = 0x00, + .maximum = 0xff, + .step = 0x1, + .default_value = RED_GAIN_DEFAULT, + .flags = V4L2_CTRL_FLAG_SLIDER }, .set = ov9650_set_red_balance, .get = ov9650_get_red_balance @@ -161,13 +161,13 @@ static const struct ctrl ov9650_ctrls[] = { { { .id = V4L2_CID_BLUE_BALANCE, - .type = V4L2_CTRL_TYPE_INTEGER, - .name = "blue balance", - .minimum = 0x00, - .maximum = 0xff, - .step = 0x1, - .default_value = BLUE_GAIN_DEFAULT, - .flags = V4L2_CTRL_FLAG_SLIDER + .type = V4L2_CTRL_TYPE_INTEGER, + .name = "blue balance", + .minimum = 0x00, + .maximum = 0xff, + .step = 0x1, + .default_value = BLUE_GAIN_DEFAULT, + .flags = V4L2_CTRL_FLAG_SLIDER }, .set = ov9650_set_blue_balance, .get = ov9650_get_blue_balance @@ -175,13 +175,13 @@ static const struct ctrl ov9650_ctrls[] = { #define HFLIP_IDX 4 { { - .id = V4L2_CID_HFLIP, - .type = V4L2_CTRL_TYPE_BOOLEAN, - .name = "horizontal flip", - .minimum = 0, - .maximum = 1, - .step = 1, - .default_value = 0 + .id = V4L2_CID_HFLIP, + .type = V4L2_CTRL_TYPE_BOOLEAN, + .name = "horizontal flip", + .minimum = 0, + .maximum = 1, + .step = 1, + .default_value = 0 }, .set = ov9650_set_hflip, .get = ov9650_get_hflip @@ -189,13 +189,13 @@ static const struct ctrl ov9650_ctrls[] = { #define VFLIP_IDX 5 { { - .id = V4L2_CID_VFLIP, - .type = V4L2_CTRL_TYPE_BOOLEAN, - .name = "vertical flip", - .minimum = 0, - .maximum = 1, - .step = 1, - .default_value = 0 + .id = V4L2_CID_VFLIP, + .type = V4L2_CTRL_TYPE_BOOLEAN, + .name = "vertical flip", + .minimum = 0, + .maximum = 1, + .step = 1, + .default_value = 0 }, .set = ov9650_set_vflip, .get = ov9650_get_vflip @@ -203,13 +203,13 @@ static const struct ctrl ov9650_ctrls[] = { #define AUTO_WHITE_BALANCE_IDX 6 { { - .id = V4L2_CID_AUTO_WHITE_BALANCE, - .type = V4L2_CTRL_TYPE_BOOLEAN, - .name = "auto white balance", - .minimum = 0, - .maximum = 1, - .step = 1, - .default_value = 1 + .id = V4L2_CID_AUTO_WHITE_BALANCE, + .type = V4L2_CTRL_TYPE_BOOLEAN, + .name = "auto white balance", + .minimum = 0, + .maximum = 1, + .step = 1, + .default_value = 1 }, .set = ov9650_set_auto_white_balance, .get = ov9650_get_auto_white_balance @@ -217,13 +217,13 @@ static const struct ctrl ov9650_ctrls[] = { #define AUTO_GAIN_CTRL_IDX 7 { { - .id = V4L2_CID_AUTOGAIN, - .type = V4L2_CTRL_TYPE_BOOLEAN, - .name = "auto gain control", - .minimum = 0, - .maximum = 1, - .step = 1, - .default_value = 1 + .id = V4L2_CID_AUTOGAIN, + .type = V4L2_CTRL_TYPE_BOOLEAN, + .name = "auto gain control", + .minimum = 0, + .maximum = 1, + .step = 1, + .default_value = 1 }, .set = ov9650_set_auto_gain, .get = ov9650_get_auto_gain @@ -231,13 +231,13 @@ static const struct ctrl ov9650_ctrls[] = { #define AUTO_EXPOSURE_IDX 8 { { - .id = V4L2_CID_EXPOSURE_AUTO, - .type = V4L2_CTRL_TYPE_BOOLEAN, - .name = "auto exposure", - .minimum = 0, - .maximum = 1, - .step = 1, - .default_value = 1 + .id = V4L2_CID_EXPOSURE_AUTO, + .type = V4L2_CTRL_TYPE_BOOLEAN, + .name = "auto exposure", + .minimum = 0, + .maximum = 1, + .step = 1, + .default_value = 1 }, .set = ov9650_set_auto_exposure, .get = ov9650_get_auto_exposure diff --git a/drivers/media/video/gspca/m5602/m5602_ov9650.h b/drivers/media/video/gspca/m5602/m5602_ov9650.h index c98c40d69e05..da9a129b739d 100644 --- a/drivers/media/video/gspca/m5602/m5602_ov9650.h +++ b/drivers/media/video/gspca/m5602/m5602_ov9650.h @@ -110,7 +110,7 @@ #define OV9650_VARIOPIXEL (1 << 2) #define OV9650_SYSTEM_CLK_SEL (1 << 7) -#define OV9650_SLAM_MODE (1 << 4) +#define OV9650_SLAM_MODE (1 << 4) #define OV9650_QVGA_VARIOPIXEL (1 << 7) @@ -154,8 +154,7 @@ static const struct m5602_sensor ov9650 = { .disconnect = ov9650_disconnect, }; -static const unsigned char preinit_ov9650[][3] = -{ +static const unsigned char preinit_ov9650[][3] = { /* [INITCAM] */ {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02}, {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0}, @@ -180,8 +179,7 @@ static const unsigned char preinit_ov9650[][3] = {SENSOR, OV9650_OFON, 0x40} }; -static const unsigned char init_ov9650[][3] = -{ +static const unsigned char init_ov9650[][3] = { /* [INITCAM] */ {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02}, {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0}, @@ -297,8 +295,7 @@ static const unsigned char init_ov9650[][3] = {SENSOR, OV9650_COM2, OV9650_SOFT_SLEEP | OV9650_OUTPUT_DRIVE_2X}, }; -static const unsigned char res_init_ov9650[][3] = -{ +static const unsigned char res_init_ov9650[][3] = { {SENSOR, OV9650_COM2, OV9650_OUTPUT_DRIVE_2X}, {BRIDGE, M5602_XB_LINE_OF_FRAME_H, 0x82}, @@ -307,5 +304,4 @@ static const unsigned char res_init_ov9650[][3] = {BRIDGE, M5602_XB_PIX_OF_LINE_L, 0x00}, {BRIDGE, M5602_XB_SIG_INI, 0x01} }; - #endif diff --git a/drivers/media/video/gspca/m5602/m5602_po1030.c b/drivers/media/video/gspca/m5602/m5602_po1030.c index 925b87d66f40..1febd34c2f05 100644 --- a/drivers/media/video/gspca/m5602/m5602_po1030.c +++ b/drivers/media/video/gspca/m5602/m5602_po1030.c @@ -58,14 +58,14 @@ static const struct ctrl po1030_ctrls[] = { #define GAIN_IDX 0 { { - .id = V4L2_CID_GAIN, - .type = V4L2_CTRL_TYPE_INTEGER, - .name = "gain", - .minimum = 0x00, - .maximum = 0x4f, - .step = 0x1, - .default_value = PO1030_GLOBAL_GAIN_DEFAULT, - .flags = V4L2_CTRL_FLAG_SLIDER + .id = V4L2_CID_GAIN, + .type = V4L2_CTRL_TYPE_INTEGER, + .name = "gain", + .minimum = 0x00, + .maximum = 0x4f, + .step = 0x1, + .default_value = PO1030_GLOBAL_GAIN_DEFAULT, + .flags = V4L2_CTRL_FLAG_SLIDER }, .set = po1030_set_gain, .get = po1030_get_gain @@ -73,14 +73,14 @@ static const struct ctrl po1030_ctrls[] = { #define EXPOSURE_IDX 1 { { - .id = V4L2_CID_EXPOSURE, - .type = V4L2_CTRL_TYPE_INTEGER, - .name = "exposure", - .minimum = 0x00, - .maximum = 0x02ff, - .step = 0x1, - .default_value = PO1030_EXPOSURE_DEFAULT, - .flags = V4L2_CTRL_FLAG_SLIDER + .id = V4L2_CID_EXPOSURE, + .type = V4L2_CTRL_TYPE_INTEGER, + .name = "exposure", + .minimum = 0x00, + .maximum = 0x02ff, + .step = 0x1, + .default_value = PO1030_EXPOSURE_DEFAULT, + .flags = V4L2_CTRL_FLAG_SLIDER }, .set = po1030_set_exposure, .get = po1030_get_exposure @@ -88,14 +88,14 @@ static const struct ctrl po1030_ctrls[] = { #define RED_BALANCE_IDX 2 { { - .id = V4L2_CID_RED_BALANCE, - .type = V4L2_CTRL_TYPE_INTEGER, - .name = "red balance", - .minimum = 0x00, - .maximum = 0xff, - .step = 0x1, - .default_value = PO1030_RED_GAIN_DEFAULT, - .flags = V4L2_CTRL_FLAG_SLIDER + .id = V4L2_CID_RED_BALANCE, + .type = V4L2_CTRL_TYPE_INTEGER, + .name = "red balance", + .minimum = 0x00, + .maximum = 0xff, + .step = 0x1, + .default_value = PO1030_RED_GAIN_DEFAULT, + .flags = V4L2_CTRL_FLAG_SLIDER }, .set = po1030_set_red_balance, .get = po1030_get_red_balance @@ -103,14 +103,14 @@ static const struct ctrl po1030_ctrls[] = { #define BLUE_BALANCE_IDX 3 { { - .id = V4L2_CID_BLUE_BALANCE, - .type = V4L2_CTRL_TYPE_INTEGER, - .name = "blue balance", - .minimum = 0x00, - .maximum = 0xff, - .step = 0x1, - .default_value = PO1030_BLUE_GAIN_DEFAULT, - .flags = V4L2_CTRL_FLAG_SLIDER + .id = V4L2_CID_BLUE_BALANCE, + .type = V4L2_CTRL_TYPE_INTEGER, + .name = "blue balance", + .minimum = 0x00, + .maximum = 0xff, + .step = 0x1, + .default_value = PO1030_BLUE_GAIN_DEFAULT, + .flags = V4L2_CTRL_FLAG_SLIDER }, .set = po1030_set_blue_balance, .get = po1030_get_blue_balance @@ -118,13 +118,13 @@ static const struct ctrl po1030_ctrls[] = { #define HFLIP_IDX 4 { { - .id = V4L2_CID_HFLIP, - .type = V4L2_CTRL_TYPE_BOOLEAN, - .name = "horizontal flip", - .minimum = 0, - .maximum = 1, - .step = 1, - .default_value = 0, + .id = V4L2_CID_HFLIP, + .type = V4L2_CTRL_TYPE_BOOLEAN, + .name = "horizontal flip", + .minimum = 0, + .maximum = 1, + .step = 1, + .default_value = 0, }, .set = po1030_set_hflip, .get = po1030_get_hflip @@ -132,13 +132,13 @@ static const struct ctrl po1030_ctrls[] = { #define VFLIP_IDX 5 { { - .id = V4L2_CID_VFLIP, - .type = V4L2_CTRL_TYPE_BOOLEAN, - .name = "vertical flip", - .minimum = 0, - .maximum = 1, - .step = 1, - .default_value = 0, + .id = V4L2_CID_VFLIP, + .type = V4L2_CTRL_TYPE_BOOLEAN, + .name = "vertical flip", + .minimum = 0, + .maximum = 1, + .step = 1, + .default_value = 0, }, .set = po1030_set_vflip, .get = po1030_get_vflip @@ -146,13 +146,13 @@ static const struct ctrl po1030_ctrls[] = { #define AUTO_WHITE_BALANCE_IDX 6 { { - .id = V4L2_CID_AUTO_WHITE_BALANCE, - .type = V4L2_CTRL_TYPE_BOOLEAN, - .name = "auto white balance", - .minimum = 0, - .maximum = 1, - .step = 1, - .default_value = 0, + .id = V4L2_CID_AUTO_WHITE_BALANCE, + .type = V4L2_CTRL_TYPE_BOOLEAN, + .name = "auto white balance", + .minimum = 0, + .maximum = 1, + .step = 1, + .default_value = 0, }, .set = po1030_set_auto_white_balance, .get = po1030_get_auto_white_balance @@ -160,13 +160,13 @@ static const struct ctrl po1030_ctrls[] = { #define AUTO_EXPOSURE_IDX 7 { { - .id = V4L2_CID_EXPOSURE_AUTO, - .type = V4L2_CTRL_TYPE_BOOLEAN, - .name = "auto exposure", - .minimum = 0, - .maximum = 1, - .step = 1, - .default_value = 0, + .id = V4L2_CID_EXPOSURE_AUTO, + .type = V4L2_CTRL_TYPE_BOOLEAN, + .name = "auto exposure", + .minimum = 0, + .maximum = 1, + .step = 1, + .default_value = 0, }, .set = po1030_set_auto_exposure, .get = po1030_get_auto_exposure @@ -174,14 +174,14 @@ static const struct ctrl po1030_ctrls[] = { #define GREEN_BALANCE_IDX 8 { { - .id = M5602_V4L2_CID_GREEN_BALANCE, - .type = V4L2_CTRL_TYPE_INTEGER, - .name = "green balance", - .minimum = 0x00, - .maximum = 0xff, - .step = 0x1, - .default_value = PO1030_GREEN_GAIN_DEFAULT, - .flags = V4L2_CTRL_FLAG_SLIDER + .id = M5602_V4L2_CID_GREEN_BALANCE, + .type = V4L2_CTRL_TYPE_INTEGER, + .name = "green balance", + .minimum = 0x00, + .maximum = 0xff, + .step = 0x1, + .default_value = PO1030_GREEN_GAIN_DEFAULT, + .flags = V4L2_CTRL_FLAG_SLIDER }, .set = po1030_set_green_balance, .get = po1030_get_green_balance diff --git a/drivers/media/video/gspca/m5602/m5602_po1030.h b/drivers/media/video/gspca/m5602/m5602_po1030.h index 1ea380b2bbe7..338359596398 100644 --- a/drivers/media/video/gspca/m5602/m5602_po1030.h +++ b/drivers/media/video/gspca/m5602/m5602_po1030.h @@ -139,9 +139,9 @@ #define PO1030_GLOBAL_GAIN_DEFAULT 0x12 #define PO1030_EXPOSURE_DEFAULT 0x0085 -#define PO1030_BLUE_GAIN_DEFAULT 0x36 -#define PO1030_RED_GAIN_DEFAULT 0x36 -#define PO1030_GREEN_GAIN_DEFAULT 0x40 +#define PO1030_BLUE_GAIN_DEFAULT 0x36 +#define PO1030_RED_GAIN_DEFAULT 0x36 +#define PO1030_GREEN_GAIN_DEFAULT 0x40 /*****************************************************************************/ @@ -166,8 +166,7 @@ static const struct m5602_sensor po1030 = { .disconnect = po1030_disconnect, }; -static const unsigned char preinit_po1030[][3] = -{ +static const unsigned char preinit_po1030[][3] = { {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02}, {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0}, {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00}, @@ -193,8 +192,7 @@ static const unsigned char preinit_po1030[][3] = {BRIDGE, M5602_XB_GPIO_DAT, 0x00} }; -static const unsigned char init_po1030[][3] = -{ +static const unsigned char init_po1030[][3] = { {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02}, {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0}, {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00}, @@ -271,5 +269,4 @@ static const unsigned char init_po1030[][3] = {BRIDGE, M5602_XB_GPIO_EN_H, 0x06}, {BRIDGE, M5602_XB_GPIO_EN_L, 0x00}, }; - #endif diff --git a/drivers/media/video/gspca/m5602/m5602_s5k4aa.c b/drivers/media/video/gspca/m5602/m5602_s5k4aa.c index da0a38c78708..d27280be9852 100644 --- a/drivers/media/video/gspca/m5602/m5602_s5k4aa.c +++ b/drivers/media/video/gspca/m5602/m5602_s5k4aa.c @@ -143,13 +143,13 @@ static const struct ctrl s5k4aa_ctrls[] = { #define VFLIP_IDX 0 { { - .id = V4L2_CID_VFLIP, - .type = V4L2_CTRL_TYPE_BOOLEAN, - .name = "vertical flip", - .minimum = 0, - .maximum = 1, - .step = 1, - .default_value = 0 + .id = V4L2_CID_VFLIP, + .type = V4L2_CTRL_TYPE_BOOLEAN, + .name = "vertical flip", + .minimum = 0, + .maximum = 1, + .step = 1, + .default_value = 0 }, .set = s5k4aa_set_vflip, .get = s5k4aa_get_vflip @@ -157,13 +157,13 @@ static const struct ctrl s5k4aa_ctrls[] = { #define HFLIP_IDX 1 { { - .id = V4L2_CID_HFLIP, - .type = V4L2_CTRL_TYPE_BOOLEAN, - .name = "horizontal flip", - .minimum = 0, - .maximum = 1, - .step = 1, - .default_value = 0 + .id = V4L2_CID_HFLIP, + .type = V4L2_CTRL_TYPE_BOOLEAN, + .name = "horizontal flip", + .minimum = 0, + .maximum = 1, + .step = 1, + .default_value = 0 }, .set = s5k4aa_set_hflip, .get = s5k4aa_get_hflip diff --git a/drivers/media/video/gspca/m5602/m5602_s5k4aa.h b/drivers/media/video/gspca/m5602/m5602_s5k4aa.h index 4440da4e7f0f..8cc7a3f6da72 100644 --- a/drivers/media/video/gspca/m5602/m5602_s5k4aa.h +++ b/drivers/media/video/gspca/m5602/m5602_s5k4aa.h @@ -83,8 +83,7 @@ static const struct m5602_sensor s5k4aa = { .disconnect = s5k4aa_disconnect, }; -static const unsigned char preinit_s5k4aa[][4] = -{ +static const unsigned char preinit_s5k4aa[][4] = { {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02, 0x00}, {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0, 0x00}, {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00}, @@ -127,8 +126,7 @@ static const unsigned char preinit_s5k4aa[][4] = {SENSOR, S5K4AA_PAGE_MAP, 0x00, 0x00} }; -static const unsigned char init_s5k4aa[][4] = -{ +static const unsigned char init_s5k4aa[][4] = { {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02, 0x00}, {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0, 0x00}, {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00}, @@ -179,8 +177,7 @@ static const unsigned char init_s5k4aa[][4] = {SENSOR, 0x37, 0x00, 0x00}, }; -static const unsigned char VGA_s5k4aa[][4] = -{ +static const unsigned char VGA_s5k4aa[][4] = { {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x06, 0x00}, {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00}, {BRIDGE, M5602_XB_ADC_CTRL, 0xc0, 0x00}, @@ -235,8 +232,7 @@ static const unsigned char VGA_s5k4aa[][4] = {SENSOR, 0x02, 0x0e, 0x00}, }; -static const unsigned char SXGA_s5k4aa[][4] = -{ +static const unsigned char SXGA_s5k4aa[][4] = { {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x06, 0x00}, {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00}, {BRIDGE, M5602_XB_ADC_CTRL, 0xc0, 0x00}, @@ -284,6 +280,4 @@ static const unsigned char SXGA_s5k4aa[][4] = {SENSOR, S5K4AA_PAGE_MAP, 0x02, 0x00}, {SENSOR, 0x02, 0x0e, 0x00}, }; - - #endif diff --git a/drivers/media/video/gspca/m5602/m5602_s5k83a.h b/drivers/media/video/gspca/m5602/m5602_s5k83a.h index 7814b078acde..80a63a236e24 100644 --- a/drivers/media/video/gspca/m5602/m5602_s5k83a.h +++ b/drivers/media/video/gspca/m5602/m5602_s5k83a.h @@ -35,7 +35,7 @@ #define S5K83A_MAXIMUM_EXPOSURE 0x3c #define S5K83A_FLIP_MASK 0x10 #define S5K83A_GPIO_LED_MASK 0x10 -#define S5K83A_GPIO_ROTATION_MASK 0x40 +#define S5K83A_GPIO_ROTATION_MASK 0x40 /*****************************************************************************/ @@ -67,8 +67,7 @@ struct s5k83a_priv { s32 *settings; }; -static const unsigned char preinit_s5k83a[][4] = -{ +static const unsigned char preinit_s5k83a[][4] = { {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02, 0x00}, {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0, 0x00}, {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00}, @@ -108,8 +107,7 @@ static const unsigned char preinit_s5k83a[][4] = /* This could probably be considerably shortened. I don't have the hardware to experiment with it, patches welcome */ -static const unsigned char init_s5k83a[][4] = -{ +static const unsigned char init_s5k83a[][4] = { /* The following sequence is useless after a clean boot but is necessary after resume from suspend */ {BRIDGE, M5602_XB_GPIO_DIR, 0x1d, 0x00}, @@ -166,8 +164,7 @@ static const unsigned char init_s5k83a[][4] = {SENSOR, 0x00, 0x06, 0x00}, }; -static const unsigned char start_s5k83a[][4] = -{ +static const unsigned char start_s5k83a[][4] = { {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x06, 0x00}, {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00}, {BRIDGE, M5602_XB_ADC_CTRL, 0xc0, 0x00}, @@ -193,5 +190,4 @@ static const unsigned char start_s5k83a[][4] = {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00}, {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00}, }; - #endif |