diff options
Diffstat (limited to 'drivers/media/usb/gspca/w996Xcf.c')
-rw-r--r-- | drivers/media/usb/gspca/w996Xcf.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/usb/gspca/w996Xcf.c b/drivers/media/usb/gspca/w996Xcf.c index 9e3a909e0a00..2165da0c7ce1 100644 --- a/drivers/media/usb/gspca/w996Xcf.c +++ b/drivers/media/usb/gspca/w996Xcf.c | |||
@@ -232,6 +232,7 @@ static void w9968cf_smbus_write_nack(struct sd *sd) | |||
232 | 232 | ||
233 | static void w9968cf_smbus_read_ack(struct sd *sd) | 233 | static void w9968cf_smbus_read_ack(struct sd *sd) |
234 | { | 234 | { |
235 | struct gspca_dev *gspca_dev = (struct gspca_dev *)sd; | ||
235 | int sda; | 236 | int sda; |
236 | 237 | ||
237 | /* Ensure SDA is high before raising clock to avoid a spurious stop */ | 238 | /* Ensure SDA is high before raising clock to avoid a spurious stop */ |
@@ -248,6 +249,7 @@ static void w9968cf_smbus_read_ack(struct sd *sd) | |||
248 | /* SMBus protocol: S Addr Wr [A] Subaddr [A] Value [A] P */ | 249 | /* SMBus protocol: S Addr Wr [A] Subaddr [A] Value [A] P */ |
249 | static void w9968cf_i2c_w(struct sd *sd, u8 reg, u8 value) | 250 | static void w9968cf_i2c_w(struct sd *sd, u8 reg, u8 value) |
250 | { | 251 | { |
252 | struct gspca_dev *gspca_dev = (struct gspca_dev *)sd; | ||
251 | u16* data = (u16 *)sd->gspca_dev.usb_buf; | 253 | u16* data = (u16 *)sd->gspca_dev.usb_buf; |
252 | 254 | ||
253 | data[0] = 0x082f | ((sd->sensor_addr & 0x80) ? 0x1500 : 0x0); | 255 | data[0] = 0x082f | ((sd->sensor_addr & 0x80) ? 0x1500 : 0x0); |
@@ -297,6 +299,7 @@ static void w9968cf_i2c_w(struct sd *sd, u8 reg, u8 value) | |||
297 | /* SMBus protocol: S Addr Wr [A] Subaddr [A] P S Addr+1 Rd [A] [Value] NA P */ | 299 | /* SMBus protocol: S Addr Wr [A] Subaddr [A] P S Addr+1 Rd [A] [Value] NA P */ |
298 | static int w9968cf_i2c_r(struct sd *sd, u8 reg) | 300 | static int w9968cf_i2c_r(struct sd *sd, u8 reg) |
299 | { | 301 | { |
302 | struct gspca_dev *gspca_dev = (struct gspca_dev *)sd; | ||
300 | int ret = 0; | 303 | int ret = 0; |
301 | u8 value; | 304 | u8 value; |
302 | 305 | ||
@@ -326,7 +329,7 @@ static int w9968cf_i2c_r(struct sd *sd, u8 reg) | |||
326 | ret = value; | 329 | ret = value; |
327 | PDEBUG(D_USBI, "i2c [0x%02X] -> 0x%02X", reg, value); | 330 | PDEBUG(D_USBI, "i2c [0x%02X] -> 0x%02X", reg, value); |
328 | } else | 331 | } else |
329 | PDEBUG(D_ERR, "i2c read [0x%02x] failed", reg); | 332 | PERR("i2c read [0x%02x] failed", reg); |
330 | 333 | ||
331 | return ret; | 334 | return ret; |
332 | } | 335 | } |