Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 780e3121 authored by Jean-François Moine's avatar Jean-François Moine Committed by Mauro Carvalho Chehab
Browse files

[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: default avatarJean-François Moine <moinejf@free.fr>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 76ad3b68
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -152,7 +152,8 @@ static void sd_stopN(struct gspca_dev *gspca_dev)
	reg_w(gspca_dev, 0x003c, 0x0005);
	reg_w(gspca_dev, 0x003c, 0x0006);
	reg_w(gspca_dev, 0x003c, 0x0007);
	usb_set_interface(gspca_dev->dev, gspca_dev->iface, gspca_dev->nbalt - 1);
	usb_set_interface(gspca_dev->dev, gspca_dev->iface,
					gspca_dev->nbalt - 1);
}

static void sd_pkt_scan(struct gspca_dev *gspca_dev,
+3 −3
Original line number Diff line number Diff line
@@ -687,7 +687,7 @@ static void cx11646_jpeg(struct gspca_dev*gspca_dev)
	reg_w_val(gspca_dev, 0x00c0, 0x00);
	reg_r(gspca_dev, 0x0001, 1);
	length = 8;
	switch (gspca_dev->cam.cam_mode[(int) gspca_dev->curr_mode].priv) {
	switch (gspca_dev->cam.cam_mode[gspca_dev->curr_mode].priv) {
	case 0:
		for (i = 0; i < 27; i++) {
			if (i == 26)
+2 −2
Original line number Diff line number Diff line
@@ -710,9 +710,9 @@ static void Et_setgainG(struct gspca_dev *gspca_dev, __u8 gain)
}

#define BLIMIT(bright) \
	(__u8)((bright > 0x1f)?0x1f:((bright < 4)?3:bright))
	(u8)((bright > 0x1f) ? 0x1f : ((bright < 4) ? 3 : bright))
#define LIMIT(color) \
	(unsigned char)((color > 0xff)?0xff:((color < 0)?0:color))
	(u8)((color > 0xff) ? 0xff : ((color < 0) ? 0 : color))

static void do_autogain(struct gspca_dev *gspca_dev)
{
+2 −2
Original line number Diff line number Diff line
@@ -89,7 +89,7 @@ static const struct ctrl sd_ctrls[] = {
	    {
		.id = V4L2_CID_CONTRAST,
		.type = V4L2_CTRL_TYPE_INTEGER,
		.name = "contrast",
		.name = "Contrast",
		.minimum = 0,
		.maximum = 9,
		.step = 4,
@@ -121,7 +121,7 @@ static const struct ctrl sd_ctrls[] = {
	    {
		.id = V4L2_CID_WHITE_BALANCE_TEMPERATURE,
		.type = V4L2_CTRL_TYPE_INTEGER,
		.name = "Whitebalance ",
		.name = "White Balance",
		.minimum = 0,
		.maximum = 33,
		.step = 1,
+5 −9
Original line number Diff line number Diff line
@@ -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
Loading