--- zzzz-none-000/linux-3.10.107/drivers/media/usb/gspca/pac7302.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/media/usb/gspca/pac7302.c 2021-02-04 17:41:59.000000000 +0000 @@ -93,7 +93,6 @@ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #include -#include #include "gspca.h" /* Include pac common sof detection functions */ #include "pac_common.h" @@ -395,9 +394,9 @@ reg_w(gspca_dev, 0xff, 0x00); /* page 0 */ for (i = 0; i < 10; i++) { v = max[i]; - v += (sd->brightness->val - sd->brightness->maximum) - * 150 / sd->brightness->maximum; /* 200 ? */ - v -= delta[i] * sd->contrast->val / sd->contrast->maximum; + v += (sd->brightness->val - (s32)sd->brightness->maximum) + * 150 / (s32)sd->brightness->maximum; /* 200 ? */ + v -= delta[i] * sd->contrast->val / (s32)sd->contrast->maximum; if (v < 0) v = 0; else if (v > 0xff) @@ -420,7 +419,7 @@ reg_w(gspca_dev, 0x11, 0x01); reg_w(gspca_dev, 0xff, 0x00); /* page 0 */ for (i = 0; i < 9; i++) { - v = a[i] * sd->saturation->val / sd->saturation->maximum; + v = a[i] * sd->saturation->val / (s32)sd->saturation->maximum; v += b[i]; reg_w(gspca_dev, 0x0f + 2 * i, (v >> 8) & 0x07); reg_w(gspca_dev, 0x0f + 2 * i + 1, v); @@ -849,8 +848,7 @@ * reg->reg: bit0..15: reserved for register index (wIndex is 16bit * long on the USB bus) */ - if (reg->match.type == V4L2_CHIP_MATCH_HOST && - reg->match.addr == 0 && + if (reg->match.addr == 0 && (reg->reg < 0x000000ff) && (reg->val <= 0x000000ff) ) { @@ -871,26 +869,12 @@ } return gspca_dev->usb_err; } - -static int sd_chip_ident(struct gspca_dev *gspca_dev, - struct v4l2_dbg_chip_ident *chip) -{ - int ret = -EINVAL; - - if (chip->match.type == V4L2_CHIP_MATCH_HOST && - chip->match.addr == 0) { - chip->revision = 0; - chip->ident = V4L2_IDENT_UNKNOWN; - ret = 0; - } - return ret; -} #endif #if IS_ENABLED(CONFIG_INPUT) static int sd_int_pkt_scan(struct gspca_dev *gspca_dev, u8 *data, /* interrupt packet data */ - int len) /* interrput packet length */ + int len) /* interrupt packet length */ { int ret = -EINVAL; u8 data0, data1; @@ -931,7 +915,6 @@ .dq_callback = do_autogain, #ifdef CONFIG_VIDEO_ADV_DEBUG .set_register = sd_dbg_s_register, - .get_chip_ident = sd_chip_ident, #endif #if IS_ENABLED(CONFIG_INPUT) .int_pkt_scan = sd_int_pkt_scan,