diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2007-01-21 13:57:48 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-02-21 10:35:30 -0500 |
commit | 38d0629fd80464247290450d8641890d6f94b6fa (patch) | |
tree | 40e8d92b55800803565501db5ed6bc0fbc2682d1 /drivers/media | |
parent | d4130b18f7ae5adfe2fd5761e31803554d090aa9 (diff) |
V4L/DVB (5239): Whitespace / 80-column cleanups
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/dvb/dvb-usb/au6610.c | 29 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-usb/gl861.c | 11 |
2 files changed, 23 insertions, 17 deletions
diff --git a/drivers/media/dvb/dvb-usb/au6610.c b/drivers/media/dvb/dvb-usb/au6610.c index 1c0160dfc2af..456b89f4f761 100644 --- a/drivers/media/dvb/dvb-usb/au6610.c +++ b/drivers/media/dvb/dvb-usb/au6610.c | |||
@@ -24,8 +24,8 @@ static int au6610_usb_msg(struct dvb_usb_device *d, u8 operation, u8 addr, | |||
24 | { | 24 | { |
25 | int ret; | 25 | int ret; |
26 | u16 index; | 26 | u16 index; |
27 | u8 usb_buf[6]; /* enough for all known requests, read returns 5 and write 6 bytes */ | 27 | u8 usb_buf[6]; /* enough for all known requests, |
28 | 28 | read returns 5 and write 6 bytes */ | |
29 | switch (wlen) { | 29 | switch (wlen) { |
30 | case 1: | 30 | case 1: |
31 | index = wbuf[0] << 8; | 31 | index = wbuf[0] << 8; |
@@ -40,7 +40,7 @@ static int au6610_usb_msg(struct dvb_usb_device *d, u8 operation, u8 addr, | |||
40 | } | 40 | } |
41 | 41 | ||
42 | ret = usb_control_msg(d->udev, usb_rcvctrlpipe(d->udev, 0), operation, | 42 | ret = usb_control_msg(d->udev, usb_rcvctrlpipe(d->udev, 0), operation, |
43 | USB_TYPE_VENDOR | USB_DIR_IN, addr, index, usb_buf, | 43 | USB_TYPE_VENDOR|USB_DIR_IN, addr, index, usb_buf, |
44 | sizeof(usb_buf), AU6610_USB_TIMEOUT); | 44 | sizeof(usb_buf), AU6610_USB_TIMEOUT); |
45 | 45 | ||
46 | if (ret < 0) | 46 | if (ret < 0) |
@@ -56,7 +56,8 @@ static int au6610_usb_msg(struct dvb_usb_device *d, u8 operation, u8 addr, | |||
56 | return ret; | 56 | return ret; |
57 | } | 57 | } |
58 | 58 | ||
59 | static int au6610_i2c_msg(struct dvb_usb_device *d, u8 addr, u8 *wbuf, u16 wlen, u8 *rbuf, u16 rlen) | 59 | static int au6610_i2c_msg(struct dvb_usb_device *d, u8 addr, |
60 | u8 *wbuf, u16 wlen, u8 *rbuf, u16 rlen) | ||
60 | { | 61 | { |
61 | u8 request; | 62 | u8 request; |
62 | u8 wo = (rbuf == NULL || rlen == 0); /* write-only */ | 63 | u8 wo = (rbuf == NULL || rlen == 0); /* write-only */ |
@@ -72,7 +73,8 @@ static int au6610_i2c_msg(struct dvb_usb_device *d, u8 addr, u8 *wbuf, u16 wlen, | |||
72 | 73 | ||
73 | 74 | ||
74 | /* I2C */ | 75 | /* I2C */ |
75 | static int au6610_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], int num) | 76 | static int au6610_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], |
77 | int num) | ||
76 | { | 78 | { |
77 | struct dvb_usb_device *d = i2c_get_adapdata(adap); | 79 | struct dvb_usb_device *d = i2c_get_adapdata(adap); |
78 | int i; | 80 | int i; |
@@ -87,7 +89,8 @@ static int au6610_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], int n | |||
87 | /* write/read request */ | 89 | /* write/read request */ |
88 | if (i+1 < num && (msg[i+1].flags & I2C_M_RD)) { | 90 | if (i+1 < num && (msg[i+1].flags & I2C_M_RD)) { |
89 | if (au6610_i2c_msg(d, msg[i].addr, msg[i].buf, | 91 | if (au6610_i2c_msg(d, msg[i].addr, msg[i].buf, |
90 | msg[i].len, msg[i+1].buf, msg[i+1].len) < 0) | 92 | msg[i].len, msg[i+1].buf, |
93 | msg[i+1].len) < 0) | ||
91 | break; | 94 | break; |
92 | i++; | 95 | i++; |
93 | } else if (au6610_i2c_msg(d, msg[i].addr, msg[i].buf, | 96 | } else if (au6610_i2c_msg(d, msg[i].addr, msg[i].buf, |
@@ -143,13 +146,14 @@ static struct qt1010_config au6610_qt1010_config = { | |||
143 | static int au6610_qt1010_tuner_attach(struct dvb_usb_adapter *adap) | 146 | static int au6610_qt1010_tuner_attach(struct dvb_usb_adapter *adap) |
144 | { | 147 | { |
145 | /* TODO FIXME; probably I2C gate. | 148 | /* TODO FIXME; probably I2C gate. |
146 | QT1010 tuner does not respond before we write 0x1a to ZL10353 demodulator | 149 | QT1010 tuner does not respond before we write 0x1a to ZL10353 demod |
147 | register 0x62. This ought to be done somewhere in demodulator initialization. | 150 | register 0x62. This ought to be done somewhere in demod initialization. |
148 | This solution is temporary hack. */ | 151 | This solution is temporary hack. */ |
152 | |||
149 | u8 buf[2] = { 0x62, 0x1a }; | 153 | u8 buf[2] = { 0x62, 0x1a }; |
150 | struct i2c_msg msg = { | 154 | struct i2c_msg msg = { .addr = au6610_zl10353_config.demod_address, |
151 | .addr = au6610_zl10353_config.demod_address, .flags = 0, .buf = buf, .len = 2 | 155 | .flags = 0, .buf = buf, .len = 2 }; |
152 | }; | 156 | |
153 | if (i2c_transfer(&adap->dev->i2c_adap, &msg, 1) != 1) { | 157 | if (i2c_transfer(&adap->dev->i2c_adap, &msg, 1) != 1) { |
154 | printk(KERN_WARNING "au6610 tuner attach failed\n"); | 158 | printk(KERN_WARNING "au6610 tuner attach failed\n"); |
155 | return -EREMOTEIO; | 159 | return -EREMOTEIO; |
@@ -162,7 +166,8 @@ static int au6610_qt1010_tuner_attach(struct dvb_usb_adapter *adap) | |||
162 | /* DVB USB Driver stuff */ | 166 | /* DVB USB Driver stuff */ |
163 | static struct dvb_usb_device_properties au6610_properties; | 167 | static struct dvb_usb_device_properties au6610_properties; |
164 | 168 | ||
165 | static int au6610_probe(struct usb_interface *intf, const struct usb_device_id *id) | 169 | static int au6610_probe(struct usb_interface *intf, |
170 | const struct usb_device_id *id) | ||
166 | { | 171 | { |
167 | struct dvb_usb_device *d; | 172 | struct dvb_usb_device *d; |
168 | struct usb_host_interface *alt; | 173 | struct usb_host_interface *alt; |
diff --git a/drivers/media/dvb/dvb-usb/gl861.c b/drivers/media/dvb/dvb-usb/gl861.c index 200ba13d1d19..d62edb533d00 100644 --- a/drivers/media/dvb/dvb-usb/gl861.c +++ b/drivers/media/dvb/dvb-usb/gl861.c | |||
@@ -123,13 +123,14 @@ static struct qt1010_config gl861_qt1010_config = { | |||
123 | static int gl861_tuner_attach(struct dvb_usb_adapter *adap) | 123 | static int gl861_tuner_attach(struct dvb_usb_adapter *adap) |
124 | { | 124 | { |
125 | /* TODO FIXME; probably I2C gate. | 125 | /* TODO FIXME; probably I2C gate. |
126 | QT1010 tuner does not respond before we write 0x1a to ZL10353 demodulator | 126 | QT1010 tuner does not respond before we write 0x1a to ZL10353 demod |
127 | register 0x62. This ought to be done somewhere in demodulator initialization. | 127 | register 0x62. This ought to be done somewhere in demod initialization. |
128 | This solution is temporary hack. */ | 128 | This solution is temporary hack. */ |
129 | |||
129 | u8 buf[2] = { 0x62, 0x1a }; | 130 | u8 buf[2] = { 0x62, 0x1a }; |
130 | struct i2c_msg msg = { | 131 | struct i2c_msg msg = { .addr = gl861_zl10353_config.demod_address, |
131 | .addr = gl861_zl10353_config.demod_address, .flags = 0, .buf = buf, .len = 2 | 132 | .flags = 0, .buf = buf, .len = 2 }; |
132 | }; | 133 | |
133 | if (i2c_transfer(&adap->dev->i2c_adap, &msg, 1) != 1) { | 134 | if (i2c_transfer(&adap->dev->i2c_adap, &msg, 1) != 1) { |
134 | printk(KERN_WARNING "gl861 tuner attach failed\n"); | 135 | printk(KERN_WARNING "gl861 tuner attach failed\n"); |
135 | return -EREMOTEIO; | 136 | return -EREMOTEIO; |