Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 176833
b: refs/heads/master
c: 8395555
h: refs/heads/master
i:
  176831: 24b7220
v: v3
  • Loading branch information
Jean-Francois Moine authored and Mauro Carvalho Chehab committed Dec 16, 2009
1 parent fd482d1 commit 98e5fca
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 27 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 37b372e5ebe187037e01885151a0afb546a38520
refs/heads/master: 83955556669f69fccfd332b52e9b1796d60c77bd
2 changes: 1 addition & 1 deletion trunk/drivers/media/video/gspca/gl860/gl860-mi1320.c
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ static int mi1320_configure_alt(struct gspca_dev *gspca_dev)
return 0;
}

int mi1320_camera_settings(struct gspca_dev *gspca_dev)
static int mi1320_camera_settings(struct gspca_dev *gspca_dev)
{
struct sd *sd = (struct sd *) gspca_dev;

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/video/gspca/gl860/gl860-mi2020.c
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ static int mi2020_configure_alt(struct gspca_dev *gspca_dev)
return 0;
}

int mi2020_camera_settings(struct gspca_dev *gspca_dev)
static int mi2020_camera_settings(struct gspca_dev *gspca_dev)
{
struct sd *sd = (struct sd *) gspca_dev;

Expand Down
10 changes: 5 additions & 5 deletions trunk/drivers/media/video/gspca/gl860/gl860.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev,
static void sd_callback(struct gspca_dev *gspca_dev);

static int gl860_guess_sensor(struct gspca_dev *gspca_dev,
s32 vendor_id, s32 product_id);
u16 vendor_id, u16 product_id);

/*============================ driver options ==============================*/

Expand Down Expand Up @@ -326,11 +326,11 @@ static int sd_config(struct gspca_dev *gspca_dev,
{
struct sd *sd = (struct sd *) gspca_dev;
struct cam *cam;
s32 vendor_id, product_id;
u16 vendor_id, product_id;

/* Get USB VendorID and ProductID */
vendor_id = le16_to_cpu(id->idVendor);
product_id = le16_to_cpu(id->idProduct);
vendor_id = id->idVendor;
product_id = id->idProduct;

sd->nbRightUp = 1;
sd->nbIm = -1;
Expand Down Expand Up @@ -673,7 +673,7 @@ void fetch_idxdata(struct gspca_dev *gspca_dev, struct idxdata *tbl, int len)
}

static int gl860_guess_sensor(struct gspca_dev *gspca_dev,
s32 vendor_id, s32 product_id)
u16 vendor_id, u16 product_id)
{
struct sd *sd = (struct sd *) gspca_dev;
u8 probe, nb26, nb96, nOV, ntry;
Expand Down
6 changes: 4 additions & 2 deletions trunk/drivers/media/video/gspca/gspca.c
Original file line number Diff line number Diff line change
Expand Up @@ -1175,12 +1175,14 @@ static int vidioc_queryctrl(struct file *file, void *priv,
continue;
ctrls = &gspca_dev->sd_desc->ctrls[i];
}
if (ctrls == NULL)
return -EINVAL;
} else {
ctrls = get_ctrl(gspca_dev, id);
if (ctrls == NULL)
return -EINVAL;
i = ctrls - gspca_dev->sd_desc->ctrls;
}
if (ctrls == NULL)
return -EINVAL;
memcpy(q_ctrl, ctrls, sizeof *q_ctrl);
if (gspca_dev->ctrl_inac & (1 << i))
q_ctrl->flags |= V4L2_CTRL_FLAG_INACTIVE;
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/media/video/gspca/m5602/m5602_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ int m5602_write_bridge(struct sd *sd, const u8 address, const u8 i2c_data)
return (err < 0) ? err : 0;
}

int m5602_wait_for_i2c(struct sd *sd)
static int m5602_wait_for_i2c(struct sd *sd)
{
int err;
u8 data;
Expand Down Expand Up @@ -388,7 +388,7 @@ static int m5602_probe(struct usb_interface *intf,
THIS_MODULE);
}

void m5602_disconnect(struct usb_interface *intf)
static void m5602_disconnect(struct usb_interface *intf)
{
struct gspca_dev *gspca_dev = usb_get_intfdata(intf);
struct sd *sd = (struct sd *) gspca_dev;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/video/gspca/m5602/m5602_ov9650.c
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ int ov9650_start(struct sd *sd)
err = m5602_write_bridge(sd, res_init_ov9650[i][1],
res_init_ov9650[i][2]);
else if (res_init_ov9650[i][0] == SENSOR) {
u8 data = res_init_ov9650[i][2];
data = res_init_ov9650[i][2];
err = m5602_write_sensor(sd,
res_init_ov9650[i][1], &data, 1);
}
Expand Down
10 changes: 8 additions & 2 deletions trunk/drivers/media/video/gspca/m5602/m5602_s5k4aa.c
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,10 @@ static int s5k4aa_set_vflip(struct gspca_dev *gspca_dev, __s32 val)
err = m5602_read_sensor(sd, S5K4AA_ROWSTART_LO, &data, 1);
if (err < 0)
return err;
data = (data & 0xfe) | !val;
if (val)
data &= 0xfe;
else
data |= 0x01;
err = m5602_write_sensor(sd, S5K4AA_ROWSTART_LO, &data, 1);
return err;
}
Expand Down Expand Up @@ -570,7 +573,10 @@ static int s5k4aa_set_hflip(struct gspca_dev *gspca_dev, __s32 val)
err = m5602_read_sensor(sd, S5K4AA_COLSTART_LO, &data, 1);
if (err < 0)
return err;
data = (data & 0xfe) | !val;
if (val)
data &= 0xfe;
else
data |= 0x01;
err = m5602_write_sensor(sd, S5K4AA_COLSTART_LO, &data, 1);
return err;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/video/gspca/mr97310a.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ MODULE_DESCRIPTION("GSPCA/Mars-Semi MR97310A USB Camera Driver");
MODULE_LICENSE("GPL");

/* global parameters */
int force_sensor_type = -1;
static int force_sensor_type = -1;
module_param(force_sensor_type, int, 0644);
MODULE_PARM_DESC(force_sensor_type, "Force sensor type (-1 (auto), 0 or 1)");

Expand Down
14 changes: 7 additions & 7 deletions trunk/drivers/media/video/gspca/ov519.c
Original file line number Diff line number Diff line change
Expand Up @@ -1982,7 +1982,7 @@ static int ov518_reg_w32(struct sd *sd, __u16 index, u32 value, int n)
{
int ret;

*((u32 *)sd->gspca_dev.usb_buf) = __cpu_to_le32(value);
*((__le32 *) sd->gspca_dev.usb_buf) = __cpu_to_le32(value);

ret = usb_control_msg(sd->gspca_dev.dev,
usb_sndctrlpipe(sd->gspca_dev.dev, 0),
Expand Down Expand Up @@ -2021,9 +2021,9 @@ static int ov511_i2c_w(struct sd *sd, __u8 reg, __u8 value)
if (rc < 0)
return rc;

do
do {
rc = reg_r(sd, R511_I2C_CTL);
while (rc > 0 && ((rc & 1) == 0)); /* Retry until idle */
} while (rc > 0 && ((rc & 1) == 0)); /* Retry until idle */

if (rc < 0)
return rc;
Expand Down Expand Up @@ -2055,9 +2055,9 @@ static int ov511_i2c_r(struct sd *sd, __u8 reg)
if (rc < 0)
return rc;

do
do {
rc = reg_r(sd, R511_I2C_CTL);
while (rc > 0 && ((rc & 1) == 0)); /* Retry until idle */
} while (rc > 0 && ((rc & 1) == 0)); /* Retry until idle */

if (rc < 0)
return rc;
Expand All @@ -2081,9 +2081,9 @@ static int ov511_i2c_r(struct sd *sd, __u8 reg)
if (rc < 0)
return rc;

do
do {
rc = reg_r(sd, R511_I2C_CTL);
while (rc > 0 && ((rc & 1) == 0)); /* Retry until idle */
} while (rc > 0 && ((rc & 1) == 0)); /* Retry until idle */

if (rc < 0)
return rc;
Expand Down
7 changes: 3 additions & 4 deletions trunk/drivers/media/video/gspca/sn9c20x.c
Original file line number Diff line number Diff line change
Expand Up @@ -1158,7 +1158,7 @@ static int i2c_w2(struct gspca_dev *gspca_dev, u8 reg, u16 val)
return i2c_w(gspca_dev, row);
}

int i2c_r1(struct gspca_dev *gspca_dev, u8 reg, u8 *val)
static int i2c_r1(struct gspca_dev *gspca_dev, u8 reg, u8 *val)
{
struct sd *sd = (struct sd *) gspca_dev;
u8 row[8];
Expand All @@ -1183,7 +1183,7 @@ int i2c_r1(struct gspca_dev *gspca_dev, u8 reg, u8 *val)
return 0;
}

int i2c_r2(struct gspca_dev *gspca_dev, u8 reg, u16 *val)
static int i2c_r2(struct gspca_dev *gspca_dev, u8 reg, u16 *val)
{
struct sd *sd = (struct sd *) gspca_dev;
u8 row[8];
Expand Down Expand Up @@ -2175,8 +2175,7 @@ static void configure_sensor_output(struct gspca_dev *gspca_dev, int mode)
}

#define HW_WIN(mode, hstart, vstart) \
((const u8 []){hstart & 0xff, hstart >> 8, \
vstart & 0xff, vstart >> 8, \
((const u8 []){hstart, 0, vstart, 0, \
(mode & MODE_SXGA ? 1280 >> 4 : 640 >> 4), \
(mode & MODE_SXGA ? 1024 >> 3 : 480 >> 3)})

Expand Down

0 comments on commit 98e5fca

Please sign in to comment.