V4L/DVB (8655): cxusb: fix checkpatch warnings & errors
Fix the following checkpatch.pl errors and warnings: ERROR: do not use assignment in if condition 117: FILE: linux/drivers/media/dvb/dvb-usb/cxusb.c:819: + if ((adap->fe = dvb_attach(dib7000p_attach, ERROR: switch and case should be at the same indent 155: FILE: linux/drivers/media/dvb/dvb-usb/cxusb.c:857: + switch (band) { + case BAND_VHF: offset = 950; break; + case BAND_UHF: + default: offset = 550; break; WARNING: line over 80 characters 169: FILE: linux/drivers/media/dvb/dvb-usb/cxusb.c:871: + struct i2c_adapter *tun_i2c = dib7000p_get_i2c_master(adap->fe, DIBX000_I2C_INTERFACE_TUNER, 1); WARNING: line over 80 characters 213: FILE: linux/drivers/media/dvb/dvb-usb/cxusb.c:1342: +static struct dvb_usb_device_properties cxusb_bluebird_dualdig4_rev2_properties = { WARNING: line over 80 characters 226: FILE: linux/drivers/media/dvb/dvb-usb/cxusb.c:1355: + .size_of_priv = sizeof(struct dib0700_adapter_state), total: 2 errors, 3 warnings, 266 lines checked Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Cc: Anton Blanchard <anton@samba.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
8d79898897
commit
a2dc86b69d
@@ -816,9 +816,9 @@ static int cxusb_dualdig4_rev2_frontend_attach(struct dvb_usb_adapter *adap)
|
|||||||
dib7000p_i2c_enumeration(&adap->dev->i2c_adap, 1, 18,
|
dib7000p_i2c_enumeration(&adap->dev->i2c_adap, 1, 18,
|
||||||
&cxusb_dualdig4_rev2_config);
|
&cxusb_dualdig4_rev2_config);
|
||||||
|
|
||||||
if ((adap->fe = dvb_attach(dib7000p_attach,
|
adap->fe = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap, 0x80,
|
||||||
&adap->dev->i2c_adap, 0x80,
|
&cxusb_dualdig4_rev2_config);
|
||||||
&cxusb_dualdig4_rev2_config)) == NULL)
|
if (adap->fe == NULL)
|
||||||
return -EIO;
|
return -EIO;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@@ -855,9 +855,9 @@ static int dib7070_set_param_override(struct dvb_frontend *fe,
|
|||||||
u16 offset;
|
u16 offset;
|
||||||
u8 band = BAND_OF_FREQUENCY(fep->frequency/1000);
|
u8 band = BAND_OF_FREQUENCY(fep->frequency/1000);
|
||||||
switch (band) {
|
switch (band) {
|
||||||
case BAND_VHF: offset = 950; break;
|
case BAND_VHF: offset = 950; break;
|
||||||
case BAND_UHF:
|
default:
|
||||||
default: offset = 550; break;
|
case BAND_UHF: offset = 550; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
dib7000p_set_wbd_ref(fe, offset + dib0070_wbd_offset(fe));
|
dib7000p_set_wbd_ref(fe, offset + dib0070_wbd_offset(fe));
|
||||||
@@ -868,7 +868,9 @@ static int dib7070_set_param_override(struct dvb_frontend *fe,
|
|||||||
static int cxusb_dualdig4_rev2_tuner_attach(struct dvb_usb_adapter *adap)
|
static int cxusb_dualdig4_rev2_tuner_attach(struct dvb_usb_adapter *adap)
|
||||||
{
|
{
|
||||||
struct dib0700_adapter_state *st = adap->priv;
|
struct dib0700_adapter_state *st = adap->priv;
|
||||||
struct i2c_adapter *tun_i2c = dib7000p_get_i2c_master(adap->fe, DIBX000_I2C_INTERFACE_TUNER, 1);
|
struct i2c_adapter *tun_i2c =
|
||||||
|
dib7000p_get_i2c_master(adap->fe,
|
||||||
|
DIBX000_I2C_INTERFACE_TUNER, 1);
|
||||||
|
|
||||||
if (dvb_attach(dib0070_attach, adap->fe, tun_i2c,
|
if (dvb_attach(dib0070_attach, adap->fe, tun_i2c,
|
||||||
&dib7070p_dib0070_config) == NULL)
|
&dib7070p_dib0070_config) == NULL)
|
||||||
@@ -1479,7 +1481,8 @@ static struct dvb_usb_device_properties cxusb_aver_a868r_properties = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct dvb_usb_device_properties cxusb_bluebird_dualdig4_rev2_properties = {
|
static
|
||||||
|
struct dvb_usb_device_properties cxusb_bluebird_dualdig4_rev2_properties = {
|
||||||
.caps = DVB_USB_IS_AN_I2C_ADAPTER,
|
.caps = DVB_USB_IS_AN_I2C_ADAPTER,
|
||||||
|
|
||||||
.usb_ctrl = CYPRESS_FX2,
|
.usb_ctrl = CYPRESS_FX2,
|
||||||
@@ -1489,10 +1492,10 @@ static struct dvb_usb_device_properties cxusb_bluebird_dualdig4_rev2_properties
|
|||||||
.num_adapters = 1,
|
.num_adapters = 1,
|
||||||
.adapter = {
|
.adapter = {
|
||||||
{
|
{
|
||||||
.streaming_ctrl = cxusb_streaming_ctrl,
|
.streaming_ctrl = cxusb_streaming_ctrl,
|
||||||
.frontend_attach = cxusb_dualdig4_rev2_frontend_attach,
|
.frontend_attach = cxusb_dualdig4_rev2_frontend_attach,
|
||||||
.tuner_attach = cxusb_dualdig4_rev2_tuner_attach,
|
.tuner_attach = cxusb_dualdig4_rev2_tuner_attach,
|
||||||
.size_of_priv = sizeof(struct dib0700_adapter_state),
|
.size_of_priv = sizeof(struct dib0700_adapter_state),
|
||||||
/* parameter for the MPEG2-data transfer */
|
/* parameter for the MPEG2-data transfer */
|
||||||
.stream = {
|
.stream = {
|
||||||
.type = USB_BULK,
|
.type = USB_BULK,
|
||||||
|
Reference in New Issue
Block a user