rc = usb_bulk_msg(gspca_dev->dev,
usb_sndbulkpipe(gspca_dev->dev, 4),
- gspca_dev->usb_buf, len, 0, 500);
+ gspca_dev->usb_buf, len, NULL, 500);
if (rc < 0)
PDEBUG(D_ERR, "reg write [%02x] error %d",
gspca_dev->usb_buf[0], rc);
{
struct sd *sd = (struct sd *) gspca_dev;
int i, j;
- u16 val;
+ u16 val = 0;
static const u8 probe_tb[][4][8] = {
{ /* mi0360 */
{0xb0, 0x5d, 0x07, 0x00, 0x02, 0x00, 0x00, 0x10},
{0x05, 0x00, 0x11},
{0x05, 0x00, 0x12},
{0x05, 0x6f, 0x00},
- {0x05, (u8) (initial_brightness >> 6), 0x00},
- {0x05, (u8) (initial_brightness << 2), 0x01},
+ {0x05, initial_brightness >> 6, 0x00},
+ {0x05, (initial_brightness << 2) & 0xff, 0x01},
{0x05, 0x00, 0x02},
{0x05, 0x01, 0x03},
{0x05, 0x00, 0x04},
{0x06, 0x5f, 0x1f},
{0x06, 0x32, 0x20},
- {0x05, (u8) (initial_brightness >> 6), 0x00},
- {0x05, (u8) (initial_brightness << 2), 0x01},
+ {0x05, initial_brightness >> 6, 0x00},
+ {0x05, (initial_brightness << 2) & 0xff, 0x01},
{0x05, 0x06, 0xc1},
{0x05, 0x58, 0xc2},
{0x05, 0x00, 0xca},