Commit db3ca1d5 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

[media] az6027: fix compiler warnings

Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 88af8304
...@@ -782,7 +782,6 @@ static int az6027_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t voltage) ...@@ -782,7 +782,6 @@ static int az6027_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t voltage)
{ {
u8 buf; u8 buf;
int ret;
struct dvb_usb_adapter *adap = fe->dvb->priv; struct dvb_usb_adapter *adap = fe->dvb->priv;
struct i2c_msg i2c_msg = { struct i2c_msg i2c_msg = {
...@@ -800,17 +799,17 @@ static int az6027_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t voltage) ...@@ -800,17 +799,17 @@ static int az6027_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t voltage)
switch (voltage) { switch (voltage) {
case SEC_VOLTAGE_13: case SEC_VOLTAGE_13:
buf = 1; buf = 1;
ret = i2c_transfer(&adap->dev->i2c_adap, &i2c_msg, 1); i2c_transfer(&adap->dev->i2c_adap, &i2c_msg, 1);
break; break;
case SEC_VOLTAGE_18: case SEC_VOLTAGE_18:
buf = 2; buf = 2;
ret = i2c_transfer(&adap->dev->i2c_adap, &i2c_msg, 1); i2c_transfer(&adap->dev->i2c_adap, &i2c_msg, 1);
break; break;
case SEC_VOLTAGE_OFF: case SEC_VOLTAGE_OFF:
buf = 0; buf = 0;
ret = i2c_transfer(&adap->dev->i2c_adap, &i2c_msg, 1); i2c_transfer(&adap->dev->i2c_adap, &i2c_msg, 1);
break; break;
default: default:
...@@ -954,7 +953,6 @@ static int az6027_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], int n ...@@ -954,7 +953,6 @@ static int az6027_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], int n
{ {
struct dvb_usb_device *d = i2c_get_adapdata(adap); struct dvb_usb_device *d = i2c_get_adapdata(adap);
int i = 0, j = 0, len = 0; int i = 0, j = 0, len = 0;
int ret;
u16 index; u16 index;
u16 value; u16 value;
int length; int length;
...@@ -990,7 +988,7 @@ static int az6027_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], int n ...@@ -990,7 +988,7 @@ static int az6027_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], int n
index = (((msg[i].buf[0] << 8) & 0xff00) | (msg[i].buf[1] & 0x00ff)); index = (((msg[i].buf[0] << 8) & 0xff00) | (msg[i].buf[1] & 0x00ff));
value = msg[i].addr + (msg[i].len << 8); value = msg[i].addr + (msg[i].len << 8);
length = msg[i + 1].len + 6; length = msg[i + 1].len + 6;
ret = az6027_usb_in_op(d, req, value, index, data, length); az6027_usb_in_op(d, req, value, index, data, length);
len = msg[i + 1].len; len = msg[i + 1].len;
for (j = 0; j < len; j++) for (j = 0; j < len; j++)
msg[i + 1].buf[j] = data[j + 5]; msg[i + 1].buf[j] = data[j + 5];
...@@ -1017,7 +1015,7 @@ static int az6027_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], int n ...@@ -1017,7 +1015,7 @@ static int az6027_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], int n
index = 0x0; index = 0x0;
value = msg[i].addr; value = msg[i].addr;
length = msg[i].len + 6; length = msg[i].len + 6;
ret = az6027_usb_in_op(d, req, value, index, data, length); az6027_usb_in_op(d, req, value, index, data, length);
len = msg[i].len; len = msg[i].len;
for (j = 0; j < len; j++) for (j = 0; j < len; j++)
msg[i].buf[j] = data[j + 5]; msg[i].buf[j] = data[j + 5];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment