diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-03-17 08:37:02 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-21 11:53:57 -0500 |
commit | a8733ca5141c256322ab5ea9fd3074942a209bba (patch) | |
tree | b1c197500cdeabe8e863d6aecb6c8e3740c25909 /drivers | |
parent | 4caba4261f2649215710ac0298bd7814080000ad (diff) |
V4L/DVB (3537a): Whitespace cleanup
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/video/dpc7146.c | 58 | ||||
-rw-r--r-- | drivers/media/video/hexium_gemini.c | 10 | ||||
-rw-r--r-- | drivers/media/video/hexium_orion.c | 18 | ||||
-rw-r--r-- | drivers/media/video/mxb.c | 146 | ||||
-rw-r--r-- | drivers/media/video/mxb.h | 2 | ||||
-rw-r--r-- | drivers/media/video/tda9840.c | 3 | ||||
-rw-r--r-- | drivers/media/video/tea6415c.c | 5 | ||||
-rw-r--r-- | drivers/media/video/tea6420.c | 5 |
8 files changed, 125 insertions, 122 deletions
diff --git a/drivers/media/video/dpc7146.c b/drivers/media/video/dpc7146.c index 2831bdd12057..0fcc935828f8 100644 --- a/drivers/media/video/dpc7146.c +++ b/drivers/media/video/dpc7146.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | dpc7146.c - v4l2 driver for the dpc7146 demonstration board | 2 | dpc7146.c - v4l2 driver for the dpc7146 demonstration board |
3 | 3 | ||
4 | Copyright (C) 2000-2003 Michael Hunold <michael@mihu.de> | 4 | Copyright (C) 2000-2003 Michael Hunold <michael@mihu.de> |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify | 6 | This program is free software; you can redistribute it and/or modify |
@@ -52,7 +52,7 @@ | |||
52 | #define SAA711X_DECODED_BYTES_OF_TS_2 0x1C | 52 | #define SAA711X_DECODED_BYTES_OF_TS_2 0x1C |
53 | #define SAA711X_STATUS_BYTE 0x1F | 53 | #define SAA711X_STATUS_BYTE 0x1F |
54 | 54 | ||
55 | #define DPC_BOARD_CAN_DO_VBI(dev) (dev->revision != 0) | 55 | #define DPC_BOARD_CAN_DO_VBI(dev) (dev->revision != 0) |
56 | 56 | ||
57 | static int debug = 0; | 57 | static int debug = 0; |
58 | module_param(debug, int, 0); | 58 | module_param(debug, int, 0); |
@@ -81,16 +81,16 @@ struct dpc | |||
81 | struct video_device *video_dev; | 81 | struct video_device *video_dev; |
82 | struct video_device *vbi_dev; | 82 | struct video_device *vbi_dev; |
83 | 83 | ||
84 | struct i2c_adapter i2c_adapter; | 84 | struct i2c_adapter i2c_adapter; |
85 | struct i2c_client *saa7111a; | 85 | struct i2c_client *saa7111a; |
86 | 86 | ||
87 | int cur_input; /* current input */ | 87 | int cur_input; /* current input */ |
88 | }; | 88 | }; |
89 | 89 | ||
90 | /* fixme: add vbi stuff here */ | 90 | /* fixme: add vbi stuff here */ |
91 | static int dpc_probe(struct saa7146_dev* dev) | 91 | static int dpc_probe(struct saa7146_dev* dev) |
92 | { | 92 | { |
93 | struct dpc* dpc = NULL; | 93 | struct dpc* dpc = NULL; |
94 | struct i2c_client *client; | 94 | struct i2c_client *client; |
95 | struct list_head *item; | 95 | struct list_head *item; |
96 | 96 | ||
@@ -118,20 +118,20 @@ static int dpc_probe(struct saa7146_dev* dev) | |||
118 | /* loop through all i2c-devices on the bus and look who is there */ | 118 | /* loop through all i2c-devices on the bus and look who is there */ |
119 | list_for_each(item,&dpc->i2c_adapter.clients) { | 119 | list_for_each(item,&dpc->i2c_adapter.clients) { |
120 | client = list_entry(item, struct i2c_client, list); | 120 | client = list_entry(item, struct i2c_client, list); |
121 | if( I2C_SAA7111A == client->addr ) | 121 | if( I2C_SAA7111A == client->addr ) |
122 | dpc->saa7111a = client; | 122 | dpc->saa7111a = client; |
123 | } | 123 | } |
124 | 124 | ||
125 | /* check if all devices are present */ | 125 | /* check if all devices are present */ |
126 | if( 0 == dpc->saa7111a ) { | 126 | if( 0 == dpc->saa7111a ) { |
127 | DEB_D(("dpc_v4l2.o: dpc_attach failed for this device.\n")); | 127 | DEB_D(("dpc_v4l2.o: dpc_attach failed for this device.\n")); |
128 | i2c_del_adapter(&dpc->i2c_adapter); | 128 | i2c_del_adapter(&dpc->i2c_adapter); |
129 | kfree(dpc); | 129 | kfree(dpc); |
130 | return -ENODEV; | 130 | return -ENODEV; |
131 | } | 131 | } |
132 | 132 | ||
133 | /* all devices are present, probe was successful */ | 133 | /* all devices are present, probe was successful */ |
134 | DEB_D(("dpc_v4l2.o: dpc_probe succeeded for this device.\n")); | 134 | DEB_D(("dpc_v4l2.o: dpc_probe succeeded for this device.\n")); |
135 | 135 | ||
136 | /* we store the pointer in our private data field */ | 136 | /* we store the pointer in our private data field */ |
137 | dev->ext_priv = dpc; | 137 | dev->ext_priv = dpc; |
@@ -182,7 +182,7 @@ static struct saa7146_ext_vv vv_data; | |||
182 | static int dpc_attach(struct saa7146_dev* dev, struct saa7146_pci_extension_data *info) | 182 | static int dpc_attach(struct saa7146_dev* dev, struct saa7146_pci_extension_data *info) |
183 | { | 183 | { |
184 | struct dpc* dpc = (struct dpc*)dev->ext_priv; | 184 | struct dpc* dpc = (struct dpc*)dev->ext_priv; |
185 | 185 | ||
186 | DEB_D(("dpc_v4l2.o: dpc_attach called.\n")); | 186 | DEB_D(("dpc_v4l2.o: dpc_attach called.\n")); |
187 | 187 | ||
188 | /* checking for i2c-devices can be omitted here, because we | 188 | /* checking for i2c-devices can be omitted here, because we |
@@ -193,7 +193,7 @@ static int dpc_attach(struct saa7146_dev* dev, struct saa7146_pci_extension_data | |||
193 | ERR(("cannot register capture v4l2 device. skipping.\n")); | 193 | ERR(("cannot register capture v4l2 device. skipping.\n")); |
194 | return -1; | 194 | return -1; |
195 | } | 195 | } |
196 | 196 | ||
197 | /* initialization stuff (vbi) (only for revision > 0 and for extensions which want it)*/ | 197 | /* initialization stuff (vbi) (only for revision > 0 and for extensions which want it)*/ |
198 | if( 0 != DPC_BOARD_CAN_DO_VBI(dev)) { | 198 | if( 0 != DPC_BOARD_CAN_DO_VBI(dev)) { |
199 | if( 0 != saa7146_register_device(&dpc->vbi_dev, dev, "dpc", VFL_TYPE_VBI)) { | 199 | if( 0 != saa7146_register_device(&dpc->vbi_dev, dev, "dpc", VFL_TYPE_VBI)) { |
@@ -205,18 +205,18 @@ static int dpc_attach(struct saa7146_dev* dev, struct saa7146_pci_extension_data | |||
205 | 205 | ||
206 | printk("dpc: found 'dpc7146 demonstration board'-%d.\n",dpc_num); | 206 | printk("dpc: found 'dpc7146 demonstration board'-%d.\n",dpc_num); |
207 | dpc_num++; | 207 | dpc_num++; |
208 | 208 | ||
209 | /* the rest */ | 209 | /* the rest */ |
210 | dpc->cur_input = 0; | 210 | dpc->cur_input = 0; |
211 | dpc_init_done(dev); | 211 | dpc_init_done(dev); |
212 | 212 | ||
213 | return 0; | 213 | return 0; |
214 | } | 214 | } |
215 | 215 | ||
216 | static int dpc_detach(struct saa7146_dev* dev) | 216 | static int dpc_detach(struct saa7146_dev* dev) |
217 | { | 217 | { |
218 | struct dpc* dpc = (struct dpc*)dev->ext_priv; | 218 | struct dpc* dpc = (struct dpc*)dev->ext_priv; |
219 | 219 | ||
220 | DEB_EE(("dev:%p\n",dev)); | 220 | DEB_EE(("dev:%p\n",dev)); |
221 | 221 | ||
222 | i2c_release_client(dpc->saa7111a); | 222 | i2c_release_client(dpc->saa7111a); |
@@ -238,25 +238,25 @@ static int dpc_detach(struct saa7146_dev* dev) | |||
238 | int dpc_vbi_bypass(struct saa7146_dev* dev) | 238 | int dpc_vbi_bypass(struct saa7146_dev* dev) |
239 | { | 239 | { |
240 | struct dpc* dpc = (struct dpc*)dev->ext_priv; | 240 | struct dpc* dpc = (struct dpc*)dev->ext_priv; |
241 | 241 | ||
242 | int i = 1; | 242 | int i = 1; |
243 | 243 | ||
244 | /* switch bypass in saa7111a */ | 244 | /* switch bypass in saa7111a */ |
245 | if ( 0 != dpc->saa7111a->driver->command(dpc->saa7111a,SAA711X_VBI_BYPASS, &i)) { | 245 | if ( 0 != dpc->saa7111a->driver->command(dpc->saa7111a,SAA711X_VBI_BYPASS, &i)) { |
246 | printk("dpc_v4l2.o: VBI_BYPASS: could not address saa7111a.\n"); | 246 | printk("dpc_v4l2.o: VBI_BYPASS: could not address saa7111a.\n"); |
247 | return -1; | 247 | return -1; |
248 | } | 248 | } |
249 | 249 | ||
250 | return 0; | 250 | return 0; |
251 | } | 251 | } |
252 | #endif | 252 | #endif |
253 | 253 | ||
254 | static int dpc_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg) | 254 | static int dpc_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg) |
255 | { | 255 | { |
256 | struct saa7146_dev *dev = fh->dev; | 256 | struct saa7146_dev *dev = fh->dev; |
257 | struct dpc* dpc = (struct dpc*)dev->ext_priv; | 257 | struct dpc* dpc = (struct dpc*)dev->ext_priv; |
258 | /* | 258 | /* |
259 | struct saa7146_vv *vv = dev->vv_data; | 259 | struct saa7146_vv *vv = dev->vv_data; |
260 | */ | 260 | */ |
261 | switch(cmd) | 261 | switch(cmd) |
262 | { | 262 | { |
@@ -264,11 +264,11 @@ static int dpc_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg) | |||
264 | { | 264 | { |
265 | struct v4l2_input *i = arg; | 265 | struct v4l2_input *i = arg; |
266 | DEB_EE(("VIDIOC_ENUMINPUT %d.\n",i->index)); | 266 | DEB_EE(("VIDIOC_ENUMINPUT %d.\n",i->index)); |
267 | 267 | ||
268 | if( i->index < 0 || i->index >= DPC_INPUTS) { | 268 | if( i->index < 0 || i->index >= DPC_INPUTS) { |
269 | return -EINVAL; | 269 | return -EINVAL; |
270 | } | 270 | } |
271 | 271 | ||
272 | memcpy(i, &dpc_inputs[i->index], sizeof(struct v4l2_input)); | 272 | memcpy(i, &dpc_inputs[i->index], sizeof(struct v4l2_input)); |
273 | 273 | ||
274 | DEB_D(("dpc_v4l2.o: v4l2_ioctl: VIDIOC_ENUMINPUT %d.\n",i->index)); | 274 | DEB_D(("dpc_v4l2.o: v4l2_ioctl: VIDIOC_ENUMINPUT %d.\n",i->index)); |
@@ -289,13 +289,13 @@ static int dpc_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg) | |||
289 | if (input < 0 || input >= DPC_INPUTS) { | 289 | if (input < 0 || input >= DPC_INPUTS) { |
290 | return -EINVAL; | 290 | return -EINVAL; |
291 | } | 291 | } |
292 | 292 | ||
293 | dpc->cur_input = input; | 293 | dpc->cur_input = input; |
294 | 294 | ||
295 | /* fixme: switch input here, switch audio, too! */ | 295 | /* fixme: switch input here, switch audio, too! */ |
296 | // saa7146_set_hps_source_and_sync(dev, input_port_selection[input].hps_source, input_port_selection[input].hps_sync); | 296 | // saa7146_set_hps_source_and_sync(dev, input_port_selection[input].hps_source, input_port_selection[input].hps_sync); |
297 | printk("dpc_v4l2.o: VIDIOC_S_INPUT: fixme switch input.\n"); | 297 | printk("dpc_v4l2.o: VIDIOC_S_INPUT: fixme switch input.\n"); |
298 | 298 | ||
299 | return 0; | 299 | return 0; |
300 | } | 300 | } |
301 | default: | 301 | default: |
@@ -334,8 +334,8 @@ static struct saa7146_standard standard[] = { | |||
334 | static struct saa7146_extension extension; | 334 | static struct saa7146_extension extension; |
335 | 335 | ||
336 | static struct saa7146_pci_extension_data dpc = { | 336 | static struct saa7146_pci_extension_data dpc = { |
337 | .ext_priv = "Multimedia eXtension Board", | 337 | .ext_priv = "Multimedia eXtension Board", |
338 | .ext = &extension, | 338 | .ext = &extension, |
339 | }; | 339 | }; |
340 | 340 | ||
341 | static struct pci_device_id pci_tbl[] = { | 341 | static struct pci_device_id pci_tbl[] = { |
@@ -357,7 +357,7 @@ static struct saa7146_ext_vv vv_data = { | |||
357 | .capabilities = V4L2_CAP_VBI_CAPTURE, | 357 | .capabilities = V4L2_CAP_VBI_CAPTURE, |
358 | .stds = &standard[0], | 358 | .stds = &standard[0], |
359 | .num_stds = sizeof(standard)/sizeof(struct saa7146_standard), | 359 | .num_stds = sizeof(standard)/sizeof(struct saa7146_standard), |
360 | .std_callback = &std_callback, | 360 | .std_callback = &std_callback, |
361 | .ioctls = &ioctls[0], | 361 | .ioctls = &ioctls[0], |
362 | .ioctl = dpc_ioctl, | 362 | .ioctl = dpc_ioctl, |
363 | }; | 363 | }; |
@@ -365,7 +365,7 @@ static struct saa7146_ext_vv vv_data = { | |||
365 | static struct saa7146_extension extension = { | 365 | static struct saa7146_extension extension = { |
366 | .name = "dpc7146 demonstration board", | 366 | .name = "dpc7146 demonstration board", |
367 | .flags = SAA7146_USE_I2C_IRQ, | 367 | .flags = SAA7146_USE_I2C_IRQ, |
368 | 368 | ||
369 | .pci_tbl = &pci_tbl[0], | 369 | .pci_tbl = &pci_tbl[0], |
370 | .module = THIS_MODULE, | 370 | .module = THIS_MODULE, |
371 | 371 | ||
@@ -375,7 +375,7 @@ static struct saa7146_extension extension = { | |||
375 | 375 | ||
376 | .irq_mask = 0, | 376 | .irq_mask = 0, |
377 | .irq_func = NULL, | 377 | .irq_func = NULL, |
378 | }; | 378 | }; |
379 | 379 | ||
380 | static int __init dpc_init_module(void) | 380 | static int __init dpc_init_module(void) |
381 | { | 381 | { |
@@ -383,7 +383,7 @@ static int __init dpc_init_module(void) | |||
383 | DEB_S(("failed to register extension.\n")); | 383 | DEB_S(("failed to register extension.\n")); |
384 | return -ENODEV; | 384 | return -ENODEV; |
385 | } | 385 | } |
386 | 386 | ||
387 | return 0; | 387 | return 0; |
388 | } | 388 | } |
389 | 389 | ||
diff --git a/drivers/media/video/hexium_gemini.c b/drivers/media/video/hexium_gemini.c index e7bbeb11553d..c7fed3405655 100644 --- a/drivers/media/video/hexium_gemini.c +++ b/drivers/media/video/hexium_gemini.c | |||
@@ -1,9 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | hexium_gemini.c - v4l2 driver for Hexium Gemini frame grabber cards | 2 | hexium_gemini.c - v4l2 driver for Hexium Gemini frame grabber cards |
3 | 3 | ||
4 | Visit http://www.mihu.de/linux/saa7146/ and follow the link | 4 | Visit http://www.mihu.de/linux/saa7146/ and follow the link |
5 | to "hexium" for further details about this card. | 5 | to "hexium" for further details about this card. |
6 | 6 | ||
7 | Copyright (C) 2003 Michael Hunold <michael@mihu.de> | 7 | Copyright (C) 2003 Michael Hunold <michael@mihu.de> |
8 | 8 | ||
9 | This program is free software; you can redistribute it and/or modify | 9 | This program is free software; you can redistribute it and/or modify |
@@ -81,7 +81,7 @@ struct hexium | |||
81 | 81 | ||
82 | struct video_device *video_dev; | 82 | struct video_device *video_dev; |
83 | struct i2c_adapter i2c_adapter; | 83 | struct i2c_adapter i2c_adapter; |
84 | 84 | ||
85 | int cur_input; /* current input */ | 85 | int cur_input; /* current input */ |
86 | v4l2_std_id cur_std; /* current standard */ | 86 | v4l2_std_id cur_std; /* current standard */ |
87 | int cur_bw; /* current black/white status */ | 87 | int cur_bw; /* current black/white status */ |
@@ -174,7 +174,7 @@ static struct saa7146_standard hexium_standards[] = { | |||
174 | .h_offset = 1, .h_pixels = 720, | 174 | .h_offset = 1, .h_pixels = 720, |
175 | .v_max_out = 576, .h_max_out = 768, | 175 | .v_max_out = 576, .h_max_out = 768, |
176 | } | 176 | } |
177 | }; | 177 | }; |
178 | 178 | ||
179 | /* bring hardware to a sane state. this has to be done, just in case someone | 179 | /* bring hardware to a sane state. this has to be done, just in case someone |
180 | wants to capture from this device before it has been properly initialized. | 180 | wants to capture from this device before it has been properly initialized. |
@@ -311,7 +311,7 @@ static int hexium_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg) | |||
311 | struct saa7146_dev *dev = fh->dev; | 311 | struct saa7146_dev *dev = fh->dev; |
312 | struct hexium *hexium = (struct hexium *) dev->ext_priv; | 312 | struct hexium *hexium = (struct hexium *) dev->ext_priv; |
313 | /* | 313 | /* |
314 | struct saa7146_vv *vv = dev->vv_data; | 314 | struct saa7146_vv *vv = dev->vv_data; |
315 | */ | 315 | */ |
316 | switch (cmd) { | 316 | switch (cmd) { |
317 | case VIDIOC_ENUMINPUT: | 317 | case VIDIOC_ENUMINPUT: |
diff --git a/drivers/media/video/hexium_orion.c b/drivers/media/video/hexium_orion.c index aad4a18aafd6..137c4736da04 100644 --- a/drivers/media/video/hexium_orion.c +++ b/drivers/media/video/hexium_orion.c | |||
@@ -3,7 +3,7 @@ | |||
3 | 3 | ||
4 | Visit http://www.mihu.de/linux/saa7146/ and follow the link | 4 | Visit http://www.mihu.de/linux/saa7146/ and follow the link |
5 | to "hexium" for further details about this card. | 5 | to "hexium" for further details about this card. |
6 | 6 | ||
7 | Copyright (C) 2003 Michael Hunold <michael@mihu.de> | 7 | Copyright (C) 2003 Michael Hunold <michael@mihu.de> |
8 | 8 | ||
9 | This program is free software; you can redistribute it and/or modify | 9 | This program is free software; you can redistribute it and/or modify |
@@ -69,7 +69,7 @@ struct hexium | |||
69 | { | 69 | { |
70 | int type; | 70 | int type; |
71 | struct video_device *video_dev; | 71 | struct video_device *video_dev; |
72 | struct i2c_adapter i2c_adapter; | 72 | struct i2c_adapter i2c_adapter; |
73 | 73 | ||
74 | int cur_input; /* current input */ | 74 | int cur_input; /* current input */ |
75 | }; | 75 | }; |
@@ -86,7 +86,7 @@ static u8 hexium_saa7110[53]={ | |||
86 | }; | 86 | }; |
87 | 87 | ||
88 | static struct { | 88 | static struct { |
89 | struct hexium_data data[8]; | 89 | struct hexium_data data[8]; |
90 | } hexium_input_select[] = { | 90 | } hexium_input_select[] = { |
91 | { | 91 | { |
92 | { /* cvbs 1 */ | 92 | { /* cvbs 1 */ |
@@ -153,7 +153,7 @@ static struct { | |||
153 | { 0x30, 0x60 }, | 153 | { 0x30, 0x60 }, |
154 | { 0x31, 0xB5 }, // ?? | 154 | { 0x31, 0xB5 }, // ?? |
155 | { 0x21, 0x03 }, | 155 | { 0x21, 0x03 }, |
156 | } | 156 | } |
157 | }, { | 157 | }, { |
158 | { /* y/c 1 */ | 158 | { /* y/c 1 */ |
159 | { 0x06, 0x80 }, | 159 | { 0x06, 0x80 }, |
@@ -187,7 +187,7 @@ static struct { | |||
187 | { 0x31, 0x75 }, | 187 | { 0x31, 0x75 }, |
188 | { 0x21, 0x21 }, | 188 | { 0x21, 0x21 }, |
189 | } | 189 | } |
190 | } | 190 | } |
191 | }; | 191 | }; |
192 | 192 | ||
193 | static struct saa7146_standard hexium_standards[] = { | 193 | static struct saa7146_standard hexium_standards[] = { |
@@ -207,7 +207,7 @@ static struct saa7146_standard hexium_standards[] = { | |||
207 | .h_offset = 1, .h_pixels = 720, | 207 | .h_offset = 1, .h_pixels = 720, |
208 | .v_max_out = 576, .h_max_out = 768, | 208 | .v_max_out = 576, .h_max_out = 768, |
209 | } | 209 | } |
210 | }; | 210 | }; |
211 | 211 | ||
212 | /* this is only called for old HV-PCI6/Orion cards | 212 | /* this is only called for old HV-PCI6/Orion cards |
213 | without eeprom */ | 213 | without eeprom */ |
@@ -272,7 +272,7 @@ static int hexium_probe(struct saa7146_dev *dev) | |||
272 | return 0; | 272 | return 0; |
273 | } | 273 | } |
274 | 274 | ||
275 | /* check if this is an old hexium Orion card by looking at | 275 | /* check if this is an old hexium Orion card by looking at |
276 | a saa7110 at address 0x4e */ | 276 | a saa7110 at address 0x4e */ |
277 | if (0 == (err = i2c_smbus_xfer(&hexium->i2c_adapter, 0x4e, 0, I2C_SMBUS_READ, 0x00, I2C_SMBUS_BYTE_DATA, &data))) { | 277 | if (0 == (err = i2c_smbus_xfer(&hexium->i2c_adapter, 0x4e, 0, I2C_SMBUS_READ, 0x00, I2C_SMBUS_BYTE_DATA, &data))) { |
278 | printk("hexium_orion: device is a Hexium HV-PCI6/Orion (old).\n"); | 278 | printk("hexium_orion: device is a Hexium HV-PCI6/Orion (old).\n"); |
@@ -314,7 +314,7 @@ static int hexium_set_input(struct hexium *hexium, int input) | |||
314 | { | 314 | { |
315 | union i2c_smbus_data data; | 315 | union i2c_smbus_data data; |
316 | int i = 0; | 316 | int i = 0; |
317 | 317 | ||
318 | DEB_D((".\n")); | 318 | DEB_D((".\n")); |
319 | 319 | ||
320 | for (i = 0; i < 8; i++) { | 320 | for (i = 0; i < 8; i++) { |
@@ -375,7 +375,7 @@ static int hexium_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg) | |||
375 | struct saa7146_dev *dev = fh->dev; | 375 | struct saa7146_dev *dev = fh->dev; |
376 | struct hexium *hexium = (struct hexium *) dev->ext_priv; | 376 | struct hexium *hexium = (struct hexium *) dev->ext_priv; |
377 | /* | 377 | /* |
378 | struct saa7146_vv *vv = dev->vv_data; | 378 | struct saa7146_vv *vv = dev->vv_data; |
379 | */ | 379 | */ |
380 | switch (cmd) { | 380 | switch (cmd) { |
381 | case VIDIOC_ENUMINPUT: | 381 | case VIDIOC_ENUMINPUT: |
diff --git a/drivers/media/video/mxb.c b/drivers/media/video/mxb.c index 2f154f415bca..eb3b31867494 100644 --- a/drivers/media/video/mxb.c +++ b/drivers/media/video/mxb.c | |||
@@ -1,11 +1,11 @@ | |||
1 | /* | 1 | /* |
2 | mxb - v4l2 driver for the Multimedia eXtension Board | 2 | mxb - v4l2 driver for the Multimedia eXtension Board |
3 | 3 | ||
4 | Copyright (C) 1998-2006 Michael Hunold <michael@mihu.de> | 4 | Copyright (C) 1998-2006 Michael Hunold <michael@mihu.de> |
5 | 5 | ||
6 | Visit http://www.mihu.de/linux/saa7146/mxb/ | 6 | Visit http://www.mihu.de/linux/saa7146/mxb/ |
7 | for further details about this card. | 7 | for further details about this card. |
8 | 8 | ||
9 | This program is free software; you can redistribute it and/or modify | 9 | This program is free software; you can redistribute it and/or modify |
10 | it under the terms of the GNU General Public License as published by | 10 | it under the terms of the GNU General Public License as published by |
11 | the Free Software Foundation; either version 2 of the License, or | 11 | the Free Software Foundation; either version 2 of the License, or |
@@ -35,12 +35,12 @@ | |||
35 | 35 | ||
36 | #define I2C_SAA7111 0x24 | 36 | #define I2C_SAA7111 0x24 |
37 | 37 | ||
38 | #define MXB_BOARD_CAN_DO_VBI(dev) (dev->revision != 0) | 38 | #define MXB_BOARD_CAN_DO_VBI(dev) (dev->revision != 0) |
39 | 39 | ||
40 | /* global variable */ | 40 | /* global variable */ |
41 | static int mxb_num = 0; | 41 | static int mxb_num = 0; |
42 | 42 | ||
43 | /* initial frequence the tuner will be tuned to. | 43 | /* initial frequence the tuner will be tuned to. |
44 | in verden (lower saxony, germany) 4148 is a | 44 | in verden (lower saxony, germany) 4148 is a |
45 | channel called "phoenix" */ | 45 | channel called "phoenix" */ |
46 | static int freq = 4148; | 46 | static int freq = 4148; |
@@ -55,7 +55,7 @@ MODULE_PARM_DESC(debug, "Turn on/off device debugging (default:off)."); | |||
55 | enum { TUNER, AUX1, AUX3, AUX3_YC }; | 55 | enum { TUNER, AUX1, AUX3, AUX3_YC }; |
56 | 56 | ||
57 | static struct v4l2_input mxb_inputs[MXB_INPUTS] = { | 57 | static struct v4l2_input mxb_inputs[MXB_INPUTS] = { |
58 | { TUNER, "Tuner", V4L2_INPUT_TYPE_TUNER, 1, 0, V4L2_STD_PAL_BG|V4L2_STD_NTSC_M, 0 }, | 58 | { TUNER, "Tuner", V4L2_INPUT_TYPE_TUNER, 1, 0, V4L2_STD_PAL_BG|V4L2_STD_NTSC_M, 0 }, |
59 | { AUX1, "AUX1", V4L2_INPUT_TYPE_CAMERA, 2, 0, V4L2_STD_PAL_BG|V4L2_STD_NTSC_M, 0 }, | 59 | { AUX1, "AUX1", V4L2_INPUT_TYPE_CAMERA, 2, 0, V4L2_STD_PAL_BG|V4L2_STD_NTSC_M, 0 }, |
60 | { AUX3, "AUX3 Composite", V4L2_INPUT_TYPE_CAMERA, 4, 0, V4L2_STD_PAL_BG|V4L2_STD_NTSC_M, 0 }, | 60 | { AUX3, "AUX3 Composite", V4L2_INPUT_TYPE_CAMERA, 4, 0, V4L2_STD_PAL_BG|V4L2_STD_NTSC_M, 0 }, |
61 | { AUX3_YC, "AUX3 S-Video", V4L2_INPUT_TYPE_CAMERA, 4, 0, V4L2_STD_PAL_BG|V4L2_STD_NTSC_M, 0 }, | 61 | { AUX3_YC, "AUX3 S-Video", V4L2_INPUT_TYPE_CAMERA, 4, 0, V4L2_STD_PAL_BG|V4L2_STD_NTSC_M, 0 }, |
@@ -66,7 +66,7 @@ static struct v4l2_input mxb_inputs[MXB_INPUTS] = { | |||
66 | static struct { | 66 | static struct { |
67 | int hps_source; | 67 | int hps_source; |
68 | int hps_sync; | 68 | int hps_sync; |
69 | } input_port_selection[MXB_INPUTS] = { | 69 | } input_port_selection[MXB_INPUTS] = { |
70 | { SAA7146_HPS_SOURCE_PORT_A, SAA7146_HPS_SYNC_PORT_A }, | 70 | { SAA7146_HPS_SOURCE_PORT_A, SAA7146_HPS_SYNC_PORT_A }, |
71 | { SAA7146_HPS_SOURCE_PORT_A, SAA7146_HPS_SYNC_PORT_A }, | 71 | { SAA7146_HPS_SOURCE_PORT_A, SAA7146_HPS_SYNC_PORT_A }, |
72 | { SAA7146_HPS_SOURCE_PORT_A, SAA7146_HPS_SYNC_PORT_A }, | 72 | { SAA7146_HPS_SOURCE_PORT_A, SAA7146_HPS_SYNC_PORT_A }, |
@@ -81,7 +81,7 @@ static int video_audio_connect[MXB_INPUTS] = | |||
81 | /* these are the necessary input-output-pins for bringing one audio source | 81 | /* these are the necessary input-output-pins for bringing one audio source |
82 | (see above) to the CD-output */ | 82 | (see above) to the CD-output */ |
83 | static struct tea6420_multiplex TEA6420_cd[MXB_AUDIOS+1][2] = | 83 | static struct tea6420_multiplex TEA6420_cd[MXB_AUDIOS+1][2] = |
84 | { | 84 | { |
85 | {{1,1,0},{1,1,0}}, /* Tuner */ | 85 | {{1,1,0},{1,1,0}}, /* Tuner */ |
86 | {{5,1,0},{6,1,0}}, /* AUX 1 */ | 86 | {{5,1,0},{6,1,0}}, /* AUX 1 */ |
87 | {{4,1,0},{6,1,0}}, /* AUX 2 */ | 87 | {{4,1,0},{6,1,0}}, /* AUX 2 */ |
@@ -122,8 +122,8 @@ static struct saa7146_extension_ioctls ioctls[] = { | |||
122 | { VIDIOC_S_FREQUENCY, SAA7146_EXCLUSIVE }, | 122 | { VIDIOC_S_FREQUENCY, SAA7146_EXCLUSIVE }, |
123 | { VIDIOC_G_AUDIO, SAA7146_EXCLUSIVE }, | 123 | { VIDIOC_G_AUDIO, SAA7146_EXCLUSIVE }, |
124 | { VIDIOC_S_AUDIO, SAA7146_EXCLUSIVE }, | 124 | { VIDIOC_S_AUDIO, SAA7146_EXCLUSIVE }, |
125 | { MXB_S_AUDIO_CD, SAA7146_EXCLUSIVE }, /* custom control */ | 125 | { MXB_S_AUDIO_CD, SAA7146_EXCLUSIVE }, /* custom control */ |
126 | { MXB_S_AUDIO_LINE, SAA7146_EXCLUSIVE }, /* custom control */ | 126 | { MXB_S_AUDIO_LINE, SAA7146_EXCLUSIVE }, /* custom control */ |
127 | { 0, 0 } | 127 | { 0, 0 } |
128 | }; | 128 | }; |
129 | 129 | ||
@@ -132,7 +132,7 @@ struct mxb | |||
132 | struct video_device *video_dev; | 132 | struct video_device *video_dev; |
133 | struct video_device *vbi_dev; | 133 | struct video_device *vbi_dev; |
134 | 134 | ||
135 | struct i2c_adapter i2c_adapter; | 135 | struct i2c_adapter i2c_adapter; |
136 | 136 | ||
137 | struct i2c_client* saa7111a; | 137 | struct i2c_client* saa7111a; |
138 | struct i2c_client* tda9840; | 138 | struct i2c_client* tda9840; |
@@ -200,15 +200,15 @@ static int mxb_probe(struct saa7146_dev* dev) | |||
200 | client = list_entry(item, struct i2c_client, list); | 200 | client = list_entry(item, struct i2c_client, list); |
201 | if( I2C_TEA6420_1 == client->addr ) | 201 | if( I2C_TEA6420_1 == client->addr ) |
202 | mxb->tea6420_1 = client; | 202 | mxb->tea6420_1 = client; |
203 | if( I2C_TEA6420_2 == client->addr ) | 203 | if( I2C_TEA6420_2 == client->addr ) |
204 | mxb->tea6420_2 = client; | 204 | mxb->tea6420_2 = client; |
205 | if( I2C_TEA6415C_2 == client->addr ) | 205 | if( I2C_TEA6415C_2 == client->addr ) |
206 | mxb->tea6415c = client; | 206 | mxb->tea6415c = client; |
207 | if( I2C_TDA9840 == client->addr ) | 207 | if( I2C_TDA9840 == client->addr ) |
208 | mxb->tda9840 = client; | 208 | mxb->tda9840 = client; |
209 | if( I2C_SAA7111 == client->addr ) | 209 | if( I2C_SAA7111 == client->addr ) |
210 | mxb->saa7111a = client; | 210 | mxb->saa7111a = client; |
211 | if( 0x60 == client->addr ) | 211 | if( 0x60 == client->addr ) |
212 | mxb->tuner = client; | 212 | mxb->tuner = client; |
213 | } | 213 | } |
214 | 214 | ||
@@ -222,7 +222,7 @@ static int mxb_probe(struct saa7146_dev* dev) | |||
222 | return -ENODEV; | 222 | return -ENODEV; |
223 | } | 223 | } |
224 | 224 | ||
225 | /* all devices are present, probe was successful */ | 225 | /* all devices are present, probe was successful */ |
226 | 226 | ||
227 | /* we store the pointer in our private data field */ | 227 | /* we store the pointer in our private data field */ |
228 | dev->ext_priv = mxb; | 228 | dev->ext_priv = mxb; |
@@ -230,7 +230,7 @@ static int mxb_probe(struct saa7146_dev* dev) | |||
230 | return 0; | 230 | return 0; |
231 | } | 231 | } |
232 | 232 | ||
233 | /* some init data for the saa7740, the so-called 'sound arena module'. | 233 | /* some init data for the saa7740, the so-called 'sound arena module'. |
234 | there are no specs available, so we simply use some init values */ | 234 | there are no specs available, so we simply use some init values */ |
235 | static struct { | 235 | static struct { |
236 | int length; | 236 | int length; |
@@ -330,7 +330,7 @@ static int mxb_init_done(struct saa7146_dev* dev) | |||
330 | v4l2_std_id std = V4L2_STD_PAL_BG; | 330 | v4l2_std_id std = V4L2_STD_PAL_BG; |
331 | 331 | ||
332 | int i = 0, err = 0; | 332 | int i = 0, err = 0; |
333 | struct tea6415c_multiplex vm; | 333 | struct tea6415c_multiplex vm; |
334 | 334 | ||
335 | /* select video mode in saa7111a */ | 335 | /* select video mode in saa7111a */ |
336 | i = VIDEO_MODE_PAL; | 336 | i = VIDEO_MODE_PAL; |
@@ -380,16 +380,16 @@ static int mxb_init_done(struct saa7146_dev* dev) | |||
380 | vm.in = 3; | 380 | vm.in = 3; |
381 | vm.out = 13; | 381 | vm.out = 13; |
382 | mxb->tea6415c->driver->command(mxb->tea6415c,TEA6415C_SWITCH, &vm); | 382 | mxb->tea6415c->driver->command(mxb->tea6415c,TEA6415C_SWITCH, &vm); |
383 | 383 | ||
384 | /* the rest for mxb */ | 384 | /* the rest for mxb */ |
385 | mxb->cur_input = 0; | 385 | mxb->cur_input = 0; |
386 | mxb->cur_mute = 1; | 386 | mxb->cur_mute = 1; |
387 | 387 | ||
388 | mxb->cur_mode = V4L2_TUNER_MODE_STEREO; | 388 | mxb->cur_mode = V4L2_TUNER_MODE_STEREO; |
389 | mxb->tda9840->driver->command(mxb->tda9840, TDA9840_SWITCH, &mxb->cur_mode); | 389 | mxb->tda9840->driver->command(mxb->tda9840, TDA9840_SWITCH, &mxb->cur_mode); |
390 | 390 | ||
391 | /* check if the saa7740 (aka 'sound arena module') is present | 391 | /* check if the saa7740 (aka 'sound arena module') is present |
392 | on the mxb. if so, we must initialize it. due to lack of | 392 | on the mxb. if so, we must initialize it. due to lack of |
393 | informations about the saa7740, the values were reverse | 393 | informations about the saa7740, the values were reverse |
394 | engineered. */ | 394 | engineered. */ |
395 | msg.addr = 0x1b; | 395 | msg.addr = 0x1b; |
@@ -409,7 +409,7 @@ static int mxb_init_done(struct saa7146_dev* dev) | |||
409 | break; | 409 | break; |
410 | } | 410 | } |
411 | 411 | ||
412 | msg.len = mxb_saa7740_init[i].length; | 412 | msg.len = mxb_saa7740_init[i].length; |
413 | msg.buf = &mxb_saa7740_init[i].data[0]; | 413 | msg.buf = &mxb_saa7740_init[i].data[0]; |
414 | if( 1 != (err = i2c_transfer(&mxb->i2c_adapter, &msg, 1))) { | 414 | if( 1 != (err = i2c_transfer(&mxb->i2c_adapter, &msg, 1))) { |
415 | DEB_D(("failed to initialize 'sound arena module'.\n")); | 415 | DEB_D(("failed to initialize 'sound arena module'.\n")); |
@@ -418,12 +418,12 @@ static int mxb_init_done(struct saa7146_dev* dev) | |||
418 | } | 418 | } |
419 | INFO(("'sound arena module' detected.\n")); | 419 | INFO(("'sound arena module' detected.\n")); |
420 | } | 420 | } |
421 | err: | 421 | err: |
422 | /* the rest for saa7146: you should definitely set some basic values | 422 | /* the rest for saa7146: you should definitely set some basic values |
423 | for the input-port handling of the saa7146. */ | 423 | for the input-port handling of the saa7146. */ |
424 | 424 | ||
425 | /* ext->saa has been filled by the core driver */ | 425 | /* ext->saa has been filled by the core driver */ |
426 | 426 | ||
427 | /* some stuff is done via variables */ | 427 | /* some stuff is done via variables */ |
428 | saa7146_set_hps_source_and_sync(dev, input_port_selection[mxb->cur_input].hps_source, input_port_selection[mxb->cur_input].hps_sync); | 428 | saa7146_set_hps_source_and_sync(dev, input_port_selection[mxb->cur_input].hps_source, input_port_selection[mxb->cur_input].hps_sync); |
429 | 429 | ||
@@ -431,7 +431,7 @@ err: | |||
431 | 431 | ||
432 | /* this is ugly, but because of the fact that this is completely | 432 | /* this is ugly, but because of the fact that this is completely |
433 | hardware dependend, it should be done directly... */ | 433 | hardware dependend, it should be done directly... */ |
434 | saa7146_write(dev, DD1_STREAM_B, 0x00000000); | 434 | saa7146_write(dev, DD1_STREAM_B, 0x00000000); |
435 | saa7146_write(dev, DD1_INIT, 0x02000200); | 435 | saa7146_write(dev, DD1_INIT, 0x02000200); |
436 | saa7146_write(dev, MC2, (MASK_09 | MASK_25 | MASK_10 | MASK_26)); | 436 | saa7146_write(dev, MC2, (MASK_09 | MASK_25 | MASK_10 | MASK_26)); |
437 | 437 | ||
@@ -453,7 +453,7 @@ static struct saa7146_ext_vv vv_data; | |||
453 | static int mxb_attach(struct saa7146_dev* dev, struct saa7146_pci_extension_data *info) | 453 | static int mxb_attach(struct saa7146_dev* dev, struct saa7146_pci_extension_data *info) |
454 | { | 454 | { |
455 | struct mxb* mxb = (struct mxb*)dev->ext_priv; | 455 | struct mxb* mxb = (struct mxb*)dev->ext_priv; |
456 | 456 | ||
457 | DEB_EE(("dev:%p\n",dev)); | 457 | DEB_EE(("dev:%p\n",dev)); |
458 | 458 | ||
459 | /* checking for i2c-devices can be omitted here, because we | 459 | /* checking for i2c-devices can be omitted here, because we |
@@ -464,7 +464,7 @@ static int mxb_attach(struct saa7146_dev* dev, struct saa7146_pci_extension_data | |||
464 | ERR(("cannot register capture v4l2 device. skipping.\n")); | 464 | ERR(("cannot register capture v4l2 device. skipping.\n")); |
465 | return -1; | 465 | return -1; |
466 | } | 466 | } |
467 | 467 | ||
468 | /* initialization stuff (vbi) (only for revision > 0 and for extensions which want it)*/ | 468 | /* initialization stuff (vbi) (only for revision > 0 and for extensions which want it)*/ |
469 | if( 0 != MXB_BOARD_CAN_DO_VBI(dev)) { | 469 | if( 0 != MXB_BOARD_CAN_DO_VBI(dev)) { |
470 | if( 0 != saa7146_register_device(&mxb->vbi_dev, dev, "mxb", VFL_TYPE_VBI)) { | 470 | if( 0 != saa7146_register_device(&mxb->vbi_dev, dev, "mxb", VFL_TYPE_VBI)) { |
@@ -513,17 +513,17 @@ static int mxb_detach(struct saa7146_dev* dev) | |||
513 | return 0; | 513 | return 0; |
514 | } | 514 | } |
515 | 515 | ||
516 | static int mxb_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg) | 516 | static int mxb_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg) |
517 | { | 517 | { |
518 | struct saa7146_dev *dev = fh->dev; | 518 | struct saa7146_dev *dev = fh->dev; |
519 | struct mxb* mxb = (struct mxb*)dev->ext_priv; | 519 | struct mxb* mxb = (struct mxb*)dev->ext_priv; |
520 | struct saa7146_vv *vv = dev->vv_data; | 520 | struct saa7146_vv *vv = dev->vv_data; |
521 | 521 | ||
522 | switch(cmd) { | 522 | switch(cmd) { |
523 | case VIDIOC_ENUMINPUT: | 523 | case VIDIOC_ENUMINPUT: |
524 | { | 524 | { |
525 | struct v4l2_input *i = arg; | 525 | struct v4l2_input *i = arg; |
526 | 526 | ||
527 | DEB_EE(("VIDIOC_ENUMINPUT %d.\n",i->index)); | 527 | DEB_EE(("VIDIOC_ENUMINPUT %d.\n",i->index)); |
528 | if( i->index < 0 || i->index >= MXB_INPUTS) { | 528 | if( i->index < 0 || i->index >= MXB_INPUTS) { |
529 | return -EINVAL; | 529 | return -EINVAL; |
@@ -559,11 +559,11 @@ static int mxb_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg) | |||
559 | break; | 559 | break; |
560 | } | 560 | } |
561 | } | 561 | } |
562 | 562 | ||
563 | if( i < 0 ) { | 563 | if( i < 0 ) { |
564 | return -EAGAIN; | 564 | return -EAGAIN; |
565 | } | 565 | } |
566 | 566 | ||
567 | switch (vc->id ) { | 567 | switch (vc->id ) { |
568 | case V4L2_CID_AUDIO_MUTE: { | 568 | case V4L2_CID_AUDIO_MUTE: { |
569 | vc->value = mxb->cur_mute; | 569 | vc->value = mxb->cur_mute; |
@@ -571,7 +571,7 @@ static int mxb_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg) | |||
571 | return 0; | 571 | return 0; |
572 | } | 572 | } |
573 | } | 573 | } |
574 | 574 | ||
575 | DEB_EE(("VIDIOC_G_CTRL V4L2_CID_AUDIO_MUTE:%d.\n",vc->value)); | 575 | DEB_EE(("VIDIOC_G_CTRL V4L2_CID_AUDIO_MUTE:%d.\n",vc->value)); |
576 | return 0; | 576 | return 0; |
577 | } | 577 | } |
@@ -580,17 +580,17 @@ static int mxb_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg) | |||
580 | { | 580 | { |
581 | struct v4l2_control *vc = arg; | 581 | struct v4l2_control *vc = arg; |
582 | int i = 0; | 582 | int i = 0; |
583 | 583 | ||
584 | for (i = MAXCONTROLS - 1; i >= 0; i--) { | 584 | for (i = MAXCONTROLS - 1; i >= 0; i--) { |
585 | if (mxb_controls[i].id == vc->id) { | 585 | if (mxb_controls[i].id == vc->id) { |
586 | break; | 586 | break; |
587 | } | 587 | } |
588 | } | 588 | } |
589 | 589 | ||
590 | if( i < 0 ) { | 590 | if( i < 0 ) { |
591 | return -EAGAIN; | 591 | return -EAGAIN; |
592 | } | 592 | } |
593 | 593 | ||
594 | switch (vc->id ) { | 594 | switch (vc->id ) { |
595 | case V4L2_CID_AUDIO_MUTE: { | 595 | case V4L2_CID_AUDIO_MUTE: { |
596 | mxb->cur_mute = vc->value; | 596 | mxb->cur_mute = vc->value; |
@@ -614,12 +614,12 @@ static int mxb_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg) | |||
614 | *input = mxb->cur_input; | 614 | *input = mxb->cur_input; |
615 | 615 | ||
616 | DEB_EE(("VIDIOC_G_INPUT %d.\n",*input)); | 616 | DEB_EE(("VIDIOC_G_INPUT %d.\n",*input)); |
617 | return 0; | 617 | return 0; |
618 | } | 618 | } |
619 | case VIDIOC_S_INPUT: | 619 | case VIDIOC_S_INPUT: |
620 | { | 620 | { |
621 | int input = *(int *)arg; | 621 | int input = *(int *)arg; |
622 | struct tea6415c_multiplex vm; | 622 | struct tea6415c_multiplex vm; |
623 | int i = 0; | 623 | int i = 0; |
624 | 624 | ||
625 | DEB_EE(("VIDIOC_S_INPUT %d.\n",input)); | 625 | DEB_EE(("VIDIOC_S_INPUT %d.\n",input)); |
@@ -627,34 +627,34 @@ static int mxb_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg) | |||
627 | if (input < 0 || input >= MXB_INPUTS) { | 627 | if (input < 0 || input >= MXB_INPUTS) { |
628 | return -EINVAL; | 628 | return -EINVAL; |
629 | } | 629 | } |
630 | 630 | ||
631 | /* fixme: locke das setzen des inputs mit hilfe des mutexes | 631 | /* fixme: locke das setzen des inputs mit hilfe des mutexes |
632 | mutex_lock(&dev->lock); | 632 | mutex_lock(&dev->lock); |
633 | video_mux(dev,*i); | 633 | video_mux(dev,*i); |
634 | mutex_unlock(&dev->lock); | 634 | mutex_unlock(&dev->lock); |
635 | */ | 635 | */ |
636 | 636 | ||
637 | /* fixme: check if streaming capture | 637 | /* fixme: check if streaming capture |
638 | if ( 0 != dev->streaming ) { | 638 | if ( 0 != dev->streaming ) { |
639 | DEB_D(("VIDIOC_S_INPUT illegal while streaming.\n")); | 639 | DEB_D(("VIDIOC_S_INPUT illegal while streaming.\n")); |
640 | return -EPERM; | 640 | return -EPERM; |
641 | } | 641 | } |
642 | */ | 642 | */ |
643 | 643 | ||
644 | mxb->cur_input = input; | 644 | mxb->cur_input = input; |
645 | 645 | ||
646 | saa7146_set_hps_source_and_sync(dev, input_port_selection[input].hps_source, input_port_selection[input].hps_sync); | 646 | saa7146_set_hps_source_and_sync(dev, input_port_selection[input].hps_source, input_port_selection[input].hps_sync); |
647 | 647 | ||
648 | /* prepare switching of tea6415c and saa7111a; | 648 | /* prepare switching of tea6415c and saa7111a; |
649 | have a look at the 'background'-file for further informations */ | 649 | have a look at the 'background'-file for further informations */ |
650 | switch( input ) { | 650 | switch( input ) { |
651 | 651 | ||
652 | case TUNER: | 652 | case TUNER: |
653 | { | 653 | { |
654 | i = 0; | 654 | i = 0; |
655 | vm.in = 3; | 655 | vm.in = 3; |
656 | vm.out = 17; | 656 | vm.out = 17; |
657 | 657 | ||
658 | if ( 0 != mxb->tea6415c->driver->command(mxb->tea6415c,TEA6415C_SWITCH, &vm)) { | 658 | if ( 0 != mxb->tea6415c->driver->command(mxb->tea6415c,TEA6415C_SWITCH, &vm)) { |
659 | printk("VIDIOC_S_INPUT: could not address tea6415c #1\n"); | 659 | printk("VIDIOC_S_INPUT: could not address tea6415c #1\n"); |
660 | return -EFAULT; | 660 | return -EFAULT; |
@@ -662,7 +662,7 @@ static int mxb_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg) | |||
662 | /* connect tuner-output always to multicable */ | 662 | /* connect tuner-output always to multicable */ |
663 | vm.in = 3; | 663 | vm.in = 3; |
664 | vm.out = 13; | 664 | vm.out = 13; |
665 | break; | 665 | break; |
666 | } | 666 | } |
667 | case AUX3_YC: | 667 | case AUX3_YC: |
668 | { | 668 | { |
@@ -703,11 +703,11 @@ static int mxb_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg) | |||
703 | break; | 703 | break; |
704 | } | 704 | } |
705 | } | 705 | } |
706 | 706 | ||
707 | /* switch video in saa7111a */ | 707 | /* switch video in saa7111a */ |
708 | if ( 0 != mxb->saa7111a->driver->command(mxb->saa7111a,DECODER_SET_INPUT, &i)) { | 708 | if ( 0 != mxb->saa7111a->driver->command(mxb->saa7111a,DECODER_SET_INPUT, &i)) { |
709 | printk("VIDIOC_S_INPUT: could not address saa7111a #1.\n"); | 709 | printk("VIDIOC_S_INPUT: could not address saa7111a #1.\n"); |
710 | } | 710 | } |
711 | 711 | ||
712 | /* switch the audio-source only if necessary */ | 712 | /* switch the audio-source only if necessary */ |
713 | if( 0 == mxb->cur_mute ) { | 713 | if( 0 == mxb->cur_mute ) { |
@@ -738,11 +738,11 @@ static int mxb_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg) | |||
738 | t->rangehigh = 13684; /* 855.25 MHz / 62.5 kHz = 13684 */ | 738 | t->rangehigh = 13684; /* 855.25 MHz / 62.5 kHz = 13684 */ |
739 | /* FIXME: add the real signal strength here */ | 739 | /* FIXME: add the real signal strength here */ |
740 | t->signal = 0xffff; | 740 | t->signal = 0xffff; |
741 | t->afc = 0; | 741 | t->afc = 0; |
742 | 742 | ||
743 | mxb->tda9840->driver->command(mxb->tda9840,TDA9840_DETECT, &byte); | 743 | mxb->tda9840->driver->command(mxb->tda9840,TDA9840_DETECT, &byte); |
744 | t->audmode = mxb->cur_mode; | 744 | t->audmode = mxb->cur_mode; |
745 | 745 | ||
746 | if( byte < 0 ) { | 746 | if( byte < 0 ) { |
747 | t->rxsubchans = V4L2_TUNER_SUB_MONO; | 747 | t->rxsubchans = V4L2_TUNER_SUB_MONO; |
748 | } else { | 748 | } else { |
@@ -777,12 +777,12 @@ static int mxb_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg) | |||
777 | struct v4l2_tuner *t = arg; | 777 | struct v4l2_tuner *t = arg; |
778 | int result = 0; | 778 | int result = 0; |
779 | int byte = 0; | 779 | int byte = 0; |
780 | 780 | ||
781 | if( 0 != t->index ) { | 781 | if( 0 != t->index ) { |
782 | DEB_D(("VIDIOC_S_TUNER: channel %d does not have a tuner attached.\n",t->index)); | 782 | DEB_D(("VIDIOC_S_TUNER: channel %d does not have a tuner attached.\n",t->index)); |
783 | return -EINVAL; | 783 | return -EINVAL; |
784 | } | 784 | } |
785 | 785 | ||
786 | switch(t->audmode) { | 786 | switch(t->audmode) { |
787 | case V4L2_TUNER_MODE_STEREO: { | 787 | case V4L2_TUNER_MODE_STEREO: { |
788 | mxb->cur_mode = V4L2_TUNER_MODE_STEREO; | 788 | mxb->cur_mode = V4L2_TUNER_MODE_STEREO; |
@@ -813,7 +813,7 @@ static int mxb_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg) | |||
813 | if( 0 != (result = mxb->tda9840->driver->command(mxb->tda9840, TDA9840_SWITCH, &byte))) { | 813 | if( 0 != (result = mxb->tda9840->driver->command(mxb->tda9840, TDA9840_SWITCH, &byte))) { |
814 | printk("VIDIOC_S_TUNER error. result:%d, byte:%d\n",result,byte); | 814 | printk("VIDIOC_S_TUNER error. result:%d, byte:%d\n",result,byte); |
815 | } | 815 | } |
816 | 816 | ||
817 | return 0; | 817 | return 0; |
818 | } | 818 | } |
819 | case VIDIOC_G_FREQUENCY: | 819 | case VIDIOC_G_FREQUENCY: |
@@ -839,7 +839,7 @@ static int mxb_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg) | |||
839 | 839 | ||
840 | if (V4L2_TUNER_ANALOG_TV != f->type) | 840 | if (V4L2_TUNER_ANALOG_TV != f->type) |
841 | return -EINVAL; | 841 | return -EINVAL; |
842 | 842 | ||
843 | if(0 != mxb->cur_input) { | 843 | if(0 != mxb->cur_input) { |
844 | DEB_D(("VIDIOC_S_FREQ: channel %d does not have a tuner!\n",mxb->cur_input)); | 844 | DEB_D(("VIDIOC_S_FREQ: channel %d does not have a tuner!\n",mxb->cur_input)); |
845 | return -EINVAL; | 845 | return -EINVAL; |
@@ -848,7 +848,7 @@ static int mxb_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg) | |||
848 | mxb->cur_freq = *f; | 848 | mxb->cur_freq = *f; |
849 | DEB_EE(("VIDIOC_S_FREQUENCY: freq:0x%08x.\n", mxb->cur_freq.frequency)); | 849 | DEB_EE(("VIDIOC_S_FREQUENCY: freq:0x%08x.\n", mxb->cur_freq.frequency)); |
850 | 850 | ||
851 | /* tune in desired frequency */ | 851 | /* tune in desired frequency */ |
852 | mxb->tuner->driver->command(mxb->tuner, VIDIOC_S_FREQUENCY, &mxb->cur_freq); | 852 | mxb->tuner->driver->command(mxb->tuner, VIDIOC_S_FREQUENCY, &mxb->cur_freq); |
853 | 853 | ||
854 | /* hack: changing the frequency should invalidate the vbi-counter (=> alevt) */ | 854 | /* hack: changing the frequency should invalidate the vbi-counter (=> alevt) */ |
@@ -861,12 +861,12 @@ static int mxb_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg) | |||
861 | case MXB_S_AUDIO_CD: | 861 | case MXB_S_AUDIO_CD: |
862 | { | 862 | { |
863 | int i = *(int*)arg; | 863 | int i = *(int*)arg; |
864 | 864 | ||
865 | if( i < 0 || i >= MXB_AUDIOS ) { | 865 | if( i < 0 || i >= MXB_AUDIOS ) { |
866 | DEB_D(("illegal argument to MXB_S_AUDIO_CD: i:%d.\n",i)); | 866 | DEB_D(("illegal argument to MXB_S_AUDIO_CD: i:%d.\n",i)); |
867 | return -EINVAL; | 867 | return -EINVAL; |
868 | } | 868 | } |
869 | 869 | ||
870 | DEB_EE(("MXB_S_AUDIO_CD: i:%d.\n",i)); | 870 | DEB_EE(("MXB_S_AUDIO_CD: i:%d.\n",i)); |
871 | 871 | ||
872 | mxb->tea6420_1->driver->command(mxb->tea6420_1,TEA6420_SWITCH, &TEA6420_cd[i][0]); | 872 | mxb->tea6420_1->driver->command(mxb->tea6420_1,TEA6420_SWITCH, &TEA6420_cd[i][0]); |
@@ -877,12 +877,12 @@ static int mxb_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg) | |||
877 | case MXB_S_AUDIO_LINE: | 877 | case MXB_S_AUDIO_LINE: |
878 | { | 878 | { |
879 | int i = *(int*)arg; | 879 | int i = *(int*)arg; |
880 | 880 | ||
881 | if( i < 0 || i >= MXB_AUDIOS ) { | 881 | if( i < 0 || i >= MXB_AUDIOS ) { |
882 | DEB_D(("illegal argument to MXB_S_AUDIO_LINE: i:%d.\n",i)); | 882 | DEB_D(("illegal argument to MXB_S_AUDIO_LINE: i:%d.\n",i)); |
883 | return -EINVAL; | 883 | return -EINVAL; |
884 | } | 884 | } |
885 | 885 | ||
886 | DEB_EE(("MXB_S_AUDIO_LINE: i:%d.\n",i)); | 886 | DEB_EE(("MXB_S_AUDIO_LINE: i:%d.\n",i)); |
887 | mxb->tea6420_1->driver->command(mxb->tea6420_1,TEA6420_SWITCH, &TEA6420_line[i][0]); | 887 | mxb->tea6420_1->driver->command(mxb->tea6420_1,TEA6420_SWITCH, &TEA6420_line[i][0]); |
888 | mxb->tea6420_2->driver->command(mxb->tea6420_2,TEA6420_SWITCH, &TEA6420_line[i][1]); | 888 | mxb->tea6420_2->driver->command(mxb->tea6420_2,TEA6420_SWITCH, &TEA6420_line[i][1]); |
@@ -894,13 +894,13 @@ static int mxb_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg) | |||
894 | struct v4l2_audio *a = arg; | 894 | struct v4l2_audio *a = arg; |
895 | 895 | ||
896 | if( a->index < 0 || a->index > MXB_INPUTS ) { | 896 | if( a->index < 0 || a->index > MXB_INPUTS ) { |
897 | DEB_D(("VIDIOC_G_AUDIO %d out of range.\n",a->index)); | 897 | DEB_D(("VIDIOC_G_AUDIO %d out of range.\n",a->index)); |
898 | return -EINVAL; | 898 | return -EINVAL; |
899 | } | 899 | } |
900 | 900 | ||
901 | DEB_EE(("VIDIOC_G_AUDIO %d.\n",a->index)); | 901 | DEB_EE(("VIDIOC_G_AUDIO %d.\n",a->index)); |
902 | memcpy(a, &mxb_audios[video_audio_connect[mxb->cur_input]], sizeof(struct v4l2_audio)); | 902 | memcpy(a, &mxb_audios[video_audio_connect[mxb->cur_input]], sizeof(struct v4l2_audio)); |
903 | 903 | ||
904 | return 0; | 904 | return 0; |
905 | } | 905 | } |
906 | case VIDIOC_S_AUDIO: | 906 | case VIDIOC_S_AUDIO: |
@@ -908,7 +908,7 @@ static int mxb_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg) | |||
908 | struct v4l2_audio *a = arg; | 908 | struct v4l2_audio *a = arg; |
909 | DEB_D(("VIDIOC_S_AUDIO %d.\n",a->index)); | 909 | DEB_D(("VIDIOC_S_AUDIO %d.\n",a->index)); |
910 | return 0; | 910 | return 0; |
911 | } | 911 | } |
912 | default: | 912 | default: |
913 | /* | 913 | /* |
914 | DEB2(printk("does not handle this ioctl.\n")); | 914 | DEB2(printk("does not handle this ioctl.\n")); |
@@ -928,7 +928,7 @@ static int std_callback(struct saa7146_dev* dev, struct saa7146_standard *std) | |||
928 | v4l2_std_id std = V4L2_STD_PAL_I; | 928 | v4l2_std_id std = V4L2_STD_PAL_I; |
929 | DEB_D(("VIDIOC_S_STD: setting mxb for PAL_I.\n")); | 929 | DEB_D(("VIDIOC_S_STD: setting mxb for PAL_I.\n")); |
930 | /* set the 7146 gpio register -- I don't know what this does exactly */ | 930 | /* set the 7146 gpio register -- I don't know what this does exactly */ |
931 | saa7146_write(dev, GPIO_CTRL, 0x00404050); | 931 | saa7146_write(dev, GPIO_CTRL, 0x00404050); |
932 | /* unset the 7111 gpio register -- I don't know what this does exactly */ | 932 | /* unset the 7111 gpio register -- I don't know what this does exactly */ |
933 | mxb->saa7111a->driver->command(mxb->saa7111a,DECODER_SET_GPIO, &zero); | 933 | mxb->saa7111a->driver->command(mxb->saa7111a,DECODER_SET_GPIO, &zero); |
934 | mxb->tuner->driver->command(mxb->tuner, VIDIOC_S_STD, &std); | 934 | mxb->tuner->driver->command(mxb->tuner, VIDIOC_S_STD, &std); |
@@ -936,7 +936,7 @@ static int std_callback(struct saa7146_dev* dev, struct saa7146_standard *std) | |||
936 | v4l2_std_id std = V4L2_STD_PAL_BG; | 936 | v4l2_std_id std = V4L2_STD_PAL_BG; |
937 | DEB_D(("VIDIOC_S_STD: setting mxb for PAL/NTSC/SECAM.\n")); | 937 | DEB_D(("VIDIOC_S_STD: setting mxb for PAL/NTSC/SECAM.\n")); |
938 | /* set the 7146 gpio register -- I don't know what this does exactly */ | 938 | /* set the 7146 gpio register -- I don't know what this does exactly */ |
939 | saa7146_write(dev, GPIO_CTRL, 0x00404050); | 939 | saa7146_write(dev, GPIO_CTRL, 0x00404050); |
940 | /* set the 7111 gpio register -- I don't know what this does exactly */ | 940 | /* set the 7111 gpio register -- I don't know what this does exactly */ |
941 | mxb->saa7111a->driver->command(mxb->saa7111a,DECODER_SET_GPIO, &one); | 941 | mxb->saa7111a->driver->command(mxb->saa7111a,DECODER_SET_GPIO, &one); |
942 | mxb->tuner->driver->command(mxb->tuner, VIDIOC_S_STD, &std); | 942 | mxb->tuner->driver->command(mxb->tuner, VIDIOC_S_STD, &std); |
@@ -969,8 +969,8 @@ static struct saa7146_standard standard[] = { | |||
969 | }; | 969 | }; |
970 | 970 | ||
971 | static struct saa7146_pci_extension_data mxb = { | 971 | static struct saa7146_pci_extension_data mxb = { |
972 | .ext_priv = "Multimedia eXtension Board", | 972 | .ext_priv = "Multimedia eXtension Board", |
973 | .ext = &extension, | 973 | .ext = &extension, |
974 | }; | 974 | }; |
975 | 975 | ||
976 | static struct pci_device_id pci_tbl[] = { | 976 | static struct pci_device_id pci_tbl[] = { |
@@ -992,7 +992,7 @@ static struct saa7146_ext_vv vv_data = { | |||
992 | .capabilities = V4L2_CAP_TUNER | V4L2_CAP_VBI_CAPTURE, | 992 | .capabilities = V4L2_CAP_TUNER | V4L2_CAP_VBI_CAPTURE, |
993 | .stds = &standard[0], | 993 | .stds = &standard[0], |
994 | .num_stds = sizeof(standard)/sizeof(struct saa7146_standard), | 994 | .num_stds = sizeof(standard)/sizeof(struct saa7146_standard), |
995 | .std_callback = &std_callback, | 995 | .std_callback = &std_callback, |
996 | .ioctls = &ioctls[0], | 996 | .ioctls = &ioctls[0], |
997 | .ioctl = mxb_ioctl, | 997 | .ioctl = mxb_ioctl, |
998 | }; | 998 | }; |
@@ -1000,7 +1000,7 @@ static struct saa7146_ext_vv vv_data = { | |||
1000 | static struct saa7146_extension extension = { | 1000 | static struct saa7146_extension extension = { |
1001 | .name = MXB_IDENTIFIER, | 1001 | .name = MXB_IDENTIFIER, |
1002 | .flags = SAA7146_USE_I2C_IRQ, | 1002 | .flags = SAA7146_USE_I2C_IRQ, |
1003 | 1003 | ||
1004 | .pci_tbl = &pci_tbl[0], | 1004 | .pci_tbl = &pci_tbl[0], |
1005 | .module = THIS_MODULE, | 1005 | .module = THIS_MODULE, |
1006 | 1006 | ||
@@ -1010,7 +1010,7 @@ static struct saa7146_extension extension = { | |||
1010 | 1010 | ||
1011 | .irq_mask = 0, | 1011 | .irq_mask = 0, |
1012 | .irq_func = NULL, | 1012 | .irq_func = NULL, |
1013 | }; | 1013 | }; |
1014 | 1014 | ||
1015 | static int __init mxb_init_module(void) | 1015 | static int __init mxb_init_module(void) |
1016 | { | 1016 | { |
@@ -1018,7 +1018,7 @@ static int __init mxb_init_module(void) | |||
1018 | DEB_S(("failed to register extension.\n")); | 1018 | DEB_S(("failed to register extension.\n")); |
1019 | return -ENODEV; | 1019 | return -ENODEV; |
1020 | } | 1020 | } |
1021 | 1021 | ||
1022 | return 0; | 1022 | return 0; |
1023 | } | 1023 | } |
1024 | 1024 | ||
diff --git a/drivers/media/video/mxb.h b/drivers/media/video/mxb.h index 2332ed5f7c6b..400a57ba62ec 100644 --- a/drivers/media/video/mxb.h +++ b/drivers/media/video/mxb.h | |||
@@ -38,5 +38,5 @@ static struct v4l2_audio mxb_audios[MXB_AUDIOS] = { | |||
38 | .name = "CD-ROM (X10)", | 38 | .name = "CD-ROM (X10)", |
39 | .capability = V4L2_AUDCAP_STEREO, | 39 | .capability = V4L2_AUDCAP_STEREO, |
40 | } | 40 | } |
41 | }; | 41 | }; |
42 | #endif | 42 | #endif |
diff --git a/drivers/media/video/tda9840.c b/drivers/media/video/tda9840.c index ed4c04119ccc..0243700f58ae 100644 --- a/drivers/media/video/tda9840.c +++ b/drivers/media/video/tda9840.c | |||
@@ -24,6 +24,7 @@ | |||
24 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 24 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
25 | */ | 25 | */ |
26 | 26 | ||
27 | |||
27 | #include <linux/module.h> | 28 | #include <linux/module.h> |
28 | #include <linux/ioctl.h> | 29 | #include <linux/ioctl.h> |
29 | #include <linux/i2c.h> | 30 | #include <linux/i2c.h> |
@@ -222,7 +223,7 @@ static int detach(struct i2c_client *client) | |||
222 | 223 | ||
223 | static struct i2c_driver driver = { | 224 | static struct i2c_driver driver = { |
224 | .driver = { | 225 | .driver = { |
225 | .name = "tda9840", | 226 | .name = "tda9840", |
226 | }, | 227 | }, |
227 | .id = I2C_DRIVERID_TDA9840, | 228 | .id = I2C_DRIVERID_TDA9840, |
228 | .attach_adapter = attach, | 229 | .attach_adapter = attach, |
diff --git a/drivers/media/video/tea6415c.c b/drivers/media/video/tea6415c.c index bb35844e3842..774ed0dbc56d 100644 --- a/drivers/media/video/tea6415c.c +++ b/drivers/media/video/tea6415c.c | |||
@@ -26,6 +26,7 @@ | |||
26 | Foundation, Inc., 675 Mvss Ave, Cambridge, MA 02139, USA. | 26 | Foundation, Inc., 675 Mvss Ave, Cambridge, MA 02139, USA. |
27 | */ | 27 | */ |
28 | 28 | ||
29 | |||
29 | #include <linux/module.h> | 30 | #include <linux/module.h> |
30 | #include <linux/ioctl.h> | 31 | #include <linux/ioctl.h> |
31 | #include <linux/i2c.h> | 32 | #include <linux/i2c.h> |
@@ -107,7 +108,7 @@ static int switch_matrix(struct i2c_client *client, int i, int o) | |||
107 | { | 108 | { |
108 | u8 byte = 0; | 109 | u8 byte = 0; |
109 | int ret; | 110 | int ret; |
110 | 111 | ||
111 | dprintk("adr:0x%02x, i:%d, o:%d\n", client->addr, i, o); | 112 | dprintk("adr:0x%02x, i:%d, o:%d\n", client->addr, i, o); |
112 | 113 | ||
113 | /* check if the pins are valid */ | 114 | /* check if the pins are valid */ |
@@ -191,7 +192,7 @@ static int command(struct i2c_client *client, unsigned int cmd, void *arg) | |||
191 | 192 | ||
192 | static struct i2c_driver driver = { | 193 | static struct i2c_driver driver = { |
193 | .driver = { | 194 | .driver = { |
194 | .name = "tea6415c", | 195 | .name = "tea6415c", |
195 | }, | 196 | }, |
196 | .id = I2C_DRIVERID_TEA6415C, | 197 | .id = I2C_DRIVERID_TEA6415C, |
197 | .attach_adapter = attach, | 198 | .attach_adapter = attach, |
diff --git a/drivers/media/video/tea6420.c b/drivers/media/video/tea6420.c index 4dcba5a4fff0..ad7d2872cfbf 100644 --- a/drivers/media/video/tea6420.c +++ b/drivers/media/video/tea6420.c | |||
@@ -26,6 +26,7 @@ | |||
26 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 26 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
27 | */ | 27 | */ |
28 | 28 | ||
29 | |||
29 | #include <linux/module.h> | 30 | #include <linux/module.h> |
30 | #include <linux/ioctl.h> | 31 | #include <linux/ioctl.h> |
31 | #include <linux/i2c.h> | 32 | #include <linux/i2c.h> |
@@ -83,7 +84,7 @@ static int tea6420_switch(struct i2c_client *client, int i, int o, int g) | |||
83 | dprintk("i2c_smbus_write_byte() failed, ret:%d\n", ret); | 84 | dprintk("i2c_smbus_write_byte() failed, ret:%d\n", ret); |
84 | return -EIO; | 85 | return -EIO; |
85 | } | 86 | } |
86 | 87 | ||
87 | return 0; | 88 | return 0; |
88 | } | 89 | } |
89 | 90 | ||
@@ -167,7 +168,7 @@ static int command(struct i2c_client *client, unsigned int cmd, void *arg) | |||
167 | 168 | ||
168 | static struct i2c_driver driver = { | 169 | static struct i2c_driver driver = { |
169 | .driver = { | 170 | .driver = { |
170 | .name = "tea6420", | 171 | .name = "tea6420", |
171 | }, | 172 | }, |
172 | .id = I2C_DRIVERID_TEA6420, | 173 | .id = I2C_DRIVERID_TEA6420, |
173 | .attach_adapter = attach, | 174 | .attach_adapter = attach, |