Commit a8733ca5 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab Committed by Linus Torvalds

V4L/DVB (3537a): Whitespace cleanup

Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 4caba426
/* /*
dpc7146.c - v4l2 driver for the dpc7146 demonstration board dpc7146.c - v4l2 driver for the dpc7146 demonstration board
Copyright (C) 2000-2003 Michael Hunold <michael@mihu.de> Copyright (C) 2000-2003 Michael Hunold <michael@mihu.de>
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
#define SAA711X_DECODED_BYTES_OF_TS_2 0x1C #define SAA711X_DECODED_BYTES_OF_TS_2 0x1C
#define SAA711X_STATUS_BYTE 0x1F #define SAA711X_STATUS_BYTE 0x1F
#define DPC_BOARD_CAN_DO_VBI(dev) (dev->revision != 0) #define DPC_BOARD_CAN_DO_VBI(dev) (dev->revision != 0)
static int debug = 0; static int debug = 0;
module_param(debug, int, 0); module_param(debug, int, 0);
...@@ -81,16 +81,16 @@ struct dpc ...@@ -81,16 +81,16 @@ struct dpc
struct video_device *video_dev; struct video_device *video_dev;
struct video_device *vbi_dev; struct video_device *vbi_dev;
struct i2c_adapter i2c_adapter; struct i2c_adapter i2c_adapter;
struct i2c_client *saa7111a; struct i2c_client *saa7111a;
int cur_input; /* current input */ int cur_input; /* current input */
}; };
/* fixme: add vbi stuff here */ /* fixme: add vbi stuff here */
static int dpc_probe(struct saa7146_dev* dev) static int dpc_probe(struct saa7146_dev* dev)
{ {
struct dpc* dpc = NULL; struct dpc* dpc = NULL;
struct i2c_client *client; struct i2c_client *client;
struct list_head *item; struct list_head *item;
...@@ -118,20 +118,20 @@ static int dpc_probe(struct saa7146_dev* dev) ...@@ -118,20 +118,20 @@ static int dpc_probe(struct saa7146_dev* dev)
/* loop through all i2c-devices on the bus and look who is there */ /* loop through all i2c-devices on the bus and look who is there */
list_for_each(item,&dpc->i2c_adapter.clients) { list_for_each(item,&dpc->i2c_adapter.clients) {
client = list_entry(item, struct i2c_client, list); client = list_entry(item, struct i2c_client, list);
if( I2C_SAA7111A == client->addr ) if( I2C_SAA7111A == client->addr )
dpc->saa7111a = client; dpc->saa7111a = client;
} }
/* check if all devices are present */ /* check if all devices are present */
if( 0 == dpc->saa7111a ) { if( 0 == dpc->saa7111a ) {
DEB_D(("dpc_v4l2.o: dpc_attach failed for this device.\n")); DEB_D(("dpc_v4l2.o: dpc_attach failed for this device.\n"));
i2c_del_adapter(&dpc->i2c_adapter); i2c_del_adapter(&dpc->i2c_adapter);
kfree(dpc); kfree(dpc);
return -ENODEV; return -ENODEV;
} }
/* all devices are present, probe was successful */ /* all devices are present, probe was successful */
DEB_D(("dpc_v4l2.o: dpc_probe succeeded for this device.\n")); DEB_D(("dpc_v4l2.o: dpc_probe succeeded for this device.\n"));
/* we store the pointer in our private data field */ /* we store the pointer in our private data field */
dev->ext_priv = dpc; dev->ext_priv = dpc;
...@@ -182,7 +182,7 @@ static struct saa7146_ext_vv vv_data; ...@@ -182,7 +182,7 @@ static struct saa7146_ext_vv vv_data;
static int dpc_attach(struct saa7146_dev* dev, struct saa7146_pci_extension_data *info) static int dpc_attach(struct saa7146_dev* dev, struct saa7146_pci_extension_data *info)
{ {
struct dpc* dpc = (struct dpc*)dev->ext_priv; struct dpc* dpc = (struct dpc*)dev->ext_priv;
DEB_D(("dpc_v4l2.o: dpc_attach called.\n")); DEB_D(("dpc_v4l2.o: dpc_attach called.\n"));
/* checking for i2c-devices can be omitted here, because we /* 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,7 +193,7 @@ static int dpc_attach(struct saa7146_dev* dev, struct saa7146_pci_extension_data
ERR(("cannot register capture v4l2 device. skipping.\n")); ERR(("cannot register capture v4l2 device. skipping.\n"));
return -1; return -1;
} }
/* initialization stuff (vbi) (only for revision > 0 and for extensions which want it)*/ /* initialization stuff (vbi) (only for revision > 0 and for extensions which want it)*/
if( 0 != DPC_BOARD_CAN_DO_VBI(dev)) { if( 0 != DPC_BOARD_CAN_DO_VBI(dev)) {
if( 0 != saa7146_register_device(&dpc->vbi_dev, dev, "dpc", VFL_TYPE_VBI)) { 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,18 +205,18 @@ static int dpc_attach(struct saa7146_dev* dev, struct saa7146_pci_extension_data
printk("dpc: found 'dpc7146 demonstration board'-%d.\n",dpc_num); printk("dpc: found 'dpc7146 demonstration board'-%d.\n",dpc_num);
dpc_num++; dpc_num++;
/* the rest */ /* the rest */
dpc->cur_input = 0; dpc->cur_input = 0;
dpc_init_done(dev); dpc_init_done(dev);
return 0; return 0;
} }
static int dpc_detach(struct saa7146_dev* dev) static int dpc_detach(struct saa7146_dev* dev)
{ {
struct dpc* dpc = (struct dpc*)dev->ext_priv; struct dpc* dpc = (struct dpc*)dev->ext_priv;
DEB_EE(("dev:%p\n",dev)); DEB_EE(("dev:%p\n",dev));
i2c_release_client(dpc->saa7111a); i2c_release_client(dpc->saa7111a);
...@@ -238,25 +238,25 @@ static int dpc_detach(struct saa7146_dev* dev) ...@@ -238,25 +238,25 @@ static int dpc_detach(struct saa7146_dev* dev)
int dpc_vbi_bypass(struct saa7146_dev* dev) int dpc_vbi_bypass(struct saa7146_dev* dev)
{ {
struct dpc* dpc = (struct dpc*)dev->ext_priv; struct dpc* dpc = (struct dpc*)dev->ext_priv;
int i = 1; int i = 1;
/* switch bypass in saa7111a */ /* switch bypass in saa7111a */
if ( 0 != dpc->saa7111a->driver->command(dpc->saa7111a,SAA711X_VBI_BYPASS, &i)) { if ( 0 != dpc->saa7111a->driver->command(dpc->saa7111a,SAA711X_VBI_BYPASS, &i)) {
printk("dpc_v4l2.o: VBI_BYPASS: could not address saa7111a.\n"); printk("dpc_v4l2.o: VBI_BYPASS: could not address saa7111a.\n");
return -1; return -1;
} }
return 0; return 0;
} }
#endif #endif
static int dpc_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg) static int dpc_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg)
{ {
struct saa7146_dev *dev = fh->dev; struct saa7146_dev *dev = fh->dev;
struct dpc* dpc = (struct dpc*)dev->ext_priv; struct dpc* dpc = (struct dpc*)dev->ext_priv;
/* /*
struct saa7146_vv *vv = dev->vv_data; struct saa7146_vv *vv = dev->vv_data;
*/ */
switch(cmd) switch(cmd)
{ {
...@@ -264,11 +264,11 @@ static int dpc_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg) ...@@ -264,11 +264,11 @@ static int dpc_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg)
{ {
struct v4l2_input *i = arg; struct v4l2_input *i = arg;
DEB_EE(("VIDIOC_ENUMINPUT %d.\n",i->index)); DEB_EE(("VIDIOC_ENUMINPUT %d.\n",i->index));
if( i->index < 0 || i->index >= DPC_INPUTS) { if( i->index < 0 || i->index >= DPC_INPUTS) {
return -EINVAL; return -EINVAL;
} }
memcpy(i, &dpc_inputs[i->index], sizeof(struct v4l2_input)); memcpy(i, &dpc_inputs[i->index], sizeof(struct v4l2_input));
DEB_D(("dpc_v4l2.o: v4l2_ioctl: VIDIOC_ENUMINPUT %d.\n",i->index)); 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,13 +289,13 @@ static int dpc_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg)
if (input < 0 || input >= DPC_INPUTS) { if (input < 0 || input >= DPC_INPUTS) {
return -EINVAL; return -EINVAL;
} }
dpc->cur_input = input; dpc->cur_input = input;
/* fixme: switch input here, switch audio, too! */ /* fixme: switch input here, switch audio, too! */
// saa7146_set_hps_source_and_sync(dev, input_port_selection[input].hps_source, input_port_selection[input].hps_sync); // saa7146_set_hps_source_and_sync(dev, input_port_selection[input].hps_source, input_port_selection[input].hps_sync);
printk("dpc_v4l2.o: VIDIOC_S_INPUT: fixme switch input.\n"); printk("dpc_v4l2.o: VIDIOC_S_INPUT: fixme switch input.\n");
return 0; return 0;
} }
default: default:
...@@ -334,8 +334,8 @@ static struct saa7146_standard standard[] = { ...@@ -334,8 +334,8 @@ static struct saa7146_standard standard[] = {
static struct saa7146_extension extension; static struct saa7146_extension extension;
static struct saa7146_pci_extension_data dpc = { static struct saa7146_pci_extension_data dpc = {
.ext_priv = "Multimedia eXtension Board", .ext_priv = "Multimedia eXtension Board",
.ext = &extension, .ext = &extension,
}; };
static struct pci_device_id pci_tbl[] = { static struct pci_device_id pci_tbl[] = {
...@@ -357,7 +357,7 @@ static struct saa7146_ext_vv vv_data = { ...@@ -357,7 +357,7 @@ static struct saa7146_ext_vv vv_data = {
.capabilities = V4L2_CAP_VBI_CAPTURE, .capabilities = V4L2_CAP_VBI_CAPTURE,
.stds = &standard[0], .stds = &standard[0],
.num_stds = sizeof(standard)/sizeof(struct saa7146_standard), .num_stds = sizeof(standard)/sizeof(struct saa7146_standard),
.std_callback = &std_callback, .std_callback = &std_callback,
.ioctls = &ioctls[0], .ioctls = &ioctls[0],
.ioctl = dpc_ioctl, .ioctl = dpc_ioctl,
}; };
...@@ -365,7 +365,7 @@ static struct saa7146_ext_vv vv_data = { ...@@ -365,7 +365,7 @@ static struct saa7146_ext_vv vv_data = {
static struct saa7146_extension extension = { static struct saa7146_extension extension = {
.name = "dpc7146 demonstration board", .name = "dpc7146 demonstration board",
.flags = SAA7146_USE_I2C_IRQ, .flags = SAA7146_USE_I2C_IRQ,
.pci_tbl = &pci_tbl[0], .pci_tbl = &pci_tbl[0],
.module = THIS_MODULE, .module = THIS_MODULE,
...@@ -375,7 +375,7 @@ static struct saa7146_extension extension = { ...@@ -375,7 +375,7 @@ static struct saa7146_extension extension = {
.irq_mask = 0, .irq_mask = 0,
.irq_func = NULL, .irq_func = NULL,
}; };
static int __init dpc_init_module(void) static int __init dpc_init_module(void)
{ {
...@@ -383,7 +383,7 @@ static int __init dpc_init_module(void) ...@@ -383,7 +383,7 @@ static int __init dpc_init_module(void)
DEB_S(("failed to register extension.\n")); DEB_S(("failed to register extension.\n"));
return -ENODEV; return -ENODEV;
} }
return 0; return 0;
} }
......
/* /*
hexium_gemini.c - v4l2 driver for Hexium Gemini frame grabber cards hexium_gemini.c - v4l2 driver for Hexium Gemini frame grabber cards
Visit http://www.mihu.de/linux/saa7146/ and follow the link Visit http://www.mihu.de/linux/saa7146/ and follow the link
to "hexium" for further details about this card. to "hexium" for further details about this card.
Copyright (C) 2003 Michael Hunold <michael@mihu.de> Copyright (C) 2003 Michael Hunold <michael@mihu.de>
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
...@@ -81,7 +81,7 @@ struct hexium ...@@ -81,7 +81,7 @@ struct hexium
struct video_device *video_dev; struct video_device *video_dev;
struct i2c_adapter i2c_adapter; struct i2c_adapter i2c_adapter;
int cur_input; /* current input */ int cur_input; /* current input */
v4l2_std_id cur_std; /* current standard */ v4l2_std_id cur_std; /* current standard */
int cur_bw; /* current black/white status */ int cur_bw; /* current black/white status */
...@@ -174,7 +174,7 @@ static struct saa7146_standard hexium_standards[] = { ...@@ -174,7 +174,7 @@ static struct saa7146_standard hexium_standards[] = {
.h_offset = 1, .h_pixels = 720, .h_offset = 1, .h_pixels = 720,
.v_max_out = 576, .h_max_out = 768, .v_max_out = 576, .h_max_out = 768,
} }
}; };
/* bring hardware to a sane state. this has to be done, just in case someone /* bring hardware to a sane state. this has to be done, just in case someone
wants to capture from this device before it has been properly initialized. 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,7 +311,7 @@ static int hexium_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg)
struct saa7146_dev *dev = fh->dev; struct saa7146_dev *dev = fh->dev;
struct hexium *hexium = (struct hexium *) dev->ext_priv; struct hexium *hexium = (struct hexium *) dev->ext_priv;
/* /*
struct saa7146_vv *vv = dev->vv_data; struct saa7146_vv *vv = dev->vv_data;
*/ */
switch (cmd) { switch (cmd) {
case VIDIOC_ENUMINPUT: case VIDIOC_ENUMINPUT:
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
Visit http://www.mihu.de/linux/saa7146/ and follow the link Visit http://www.mihu.de/linux/saa7146/ and follow the link
to "hexium" for further details about this card. to "hexium" for further details about this card.
Copyright (C) 2003 Michael Hunold <michael@mihu.de> Copyright (C) 2003 Michael Hunold <michael@mihu.de>
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
...@@ -69,7 +69,7 @@ struct hexium ...@@ -69,7 +69,7 @@ struct hexium
{ {
int type; int type;
struct video_device *video_dev; struct video_device *video_dev;
struct i2c_adapter i2c_adapter; struct i2c_adapter i2c_adapter;
int cur_input; /* current input */ int cur_input; /* current input */
}; };
...@@ -86,7 +86,7 @@ static u8 hexium_saa7110[53]={ ...@@ -86,7 +86,7 @@ static u8 hexium_saa7110[53]={
}; };
static struct { static struct {
struct hexium_data data[8]; struct hexium_data data[8];
} hexium_input_select[] = { } hexium_input_select[] = {
{ {
{ /* cvbs 1 */ { /* cvbs 1 */
...@@ -153,7 +153,7 @@ static struct { ...@@ -153,7 +153,7 @@ static struct {
{ 0x30, 0x60 }, { 0x30, 0x60 },
{ 0x31, 0xB5 }, // ?? { 0x31, 0xB5 }, // ??
{ 0x21, 0x03 }, { 0x21, 0x03 },
} }
}, { }, {
{ /* y/c 1 */ { /* y/c 1 */
{ 0x06, 0x80 }, { 0x06, 0x80 },
...@@ -187,7 +187,7 @@ static struct { ...@@ -187,7 +187,7 @@ static struct {
{ 0x31, 0x75 }, { 0x31, 0x75 },
{ 0x21, 0x21 }, { 0x21, 0x21 },
} }
} }
}; };
static struct saa7146_standard hexium_standards[] = { static struct saa7146_standard hexium_standards[] = {
...@@ -207,7 +207,7 @@ static struct saa7146_standard hexium_standards[] = { ...@@ -207,7 +207,7 @@ static struct saa7146_standard hexium_standards[] = {
.h_offset = 1, .h_pixels = 720, .h_offset = 1, .h_pixels = 720,
.v_max_out = 576, .h_max_out = 768, .v_max_out = 576, .h_max_out = 768,
} }
}; };
/* this is only called for old HV-PCI6/Orion cards /* this is only called for old HV-PCI6/Orion cards
without eeprom */ without eeprom */
...@@ -272,7 +272,7 @@ static int hexium_probe(struct saa7146_dev *dev) ...@@ -272,7 +272,7 @@ static int hexium_probe(struct saa7146_dev *dev)
return 0; return 0;
} }
/* check if this is an old hexium Orion card by looking at /* check if this is an old hexium Orion card by looking at
a saa7110 at address 0x4e */ a saa7110 at address 0x4e */
if (0 == (err = i2c_smbus_xfer(&hexium->i2c_adapter, 0x4e, 0, I2C_SMBUS_READ, 0x00, I2C_SMBUS_BYTE_DATA, &data))) { if (0 == (err = i2c_smbus_xfer(&hexium->i2c_adapter, 0x4e, 0, I2C_SMBUS_READ, 0x00, I2C_SMBUS_BYTE_DATA, &data))) {
printk("hexium_orion: device is a Hexium HV-PCI6/Orion (old).\n"); 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,7 +314,7 @@ static int hexium_set_input(struct hexium *hexium, int input)
{ {
union i2c_smbus_data data; union i2c_smbus_data data;
int i = 0; int i = 0;
DEB_D((".\n")); DEB_D((".\n"));
for (i = 0; i < 8; i++) { for (i = 0; i < 8; i++) {
...@@ -375,7 +375,7 @@ static int hexium_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg) ...@@ -375,7 +375,7 @@ static int hexium_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg)
struct saa7146_dev *dev = fh->dev; struct saa7146_dev *dev = fh->dev;
struct hexium *hexium = (struct hexium *) dev->ext_priv; struct hexium *hexium = (struct hexium *) dev->ext_priv;
/* /*
struct saa7146_vv *vv = dev->vv_data; struct saa7146_vv *vv = dev->vv_data;
*/ */
switch (cmd) { switch (cmd) {
case VIDIOC_ENUMINPUT: case VIDIOC_ENUMINPUT:
......
This diff is collapsed.
...@@ -38,5 +38,5 @@ static struct v4l2_audio mxb_audios[MXB_AUDIOS] = { ...@@ -38,5 +38,5 @@ static struct v4l2_audio mxb_audios[MXB_AUDIOS] = {
.name = "CD-ROM (X10)", .name = "CD-ROM (X10)",
.capability = V4L2_AUDCAP_STEREO, .capability = V4L2_AUDCAP_STEREO,
} }
}; };
#endif #endif
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
#include <linux/module.h> #include <linux/module.h>
#include <linux/ioctl.h> #include <linux/ioctl.h>
#include <linux/i2c.h> #include <linux/i2c.h>
...@@ -222,7 +223,7 @@ static int detach(struct i2c_client *client) ...@@ -222,7 +223,7 @@ static int detach(struct i2c_client *client)
static struct i2c_driver driver = { static struct i2c_driver driver = {
.driver = { .driver = {
.name = "tda9840", .name = "tda9840",
}, },
.id = I2C_DRIVERID_TDA9840, .id = I2C_DRIVERID_TDA9840,
.attach_adapter = attach, .attach_adapter = attach,
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
Foundation, Inc., 675 Mvss Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mvss Ave, Cambridge, MA 02139, USA.
*/ */
#include <linux/module.h> #include <linux/module.h>
#include <linux/ioctl.h> #include <linux/ioctl.h>
#include <linux/i2c.h> #include <linux/i2c.h>
...@@ -107,7 +108,7 @@ static int switch_matrix(struct i2c_client *client, int i, int o) ...@@ -107,7 +108,7 @@ static int switch_matrix(struct i2c_client *client, int i, int o)
{ {
u8 byte = 0; u8 byte = 0;
int ret; int ret;
dprintk("adr:0x%02x, i:%d, o:%d\n", client->addr, i, o); dprintk("adr:0x%02x, i:%d, o:%d\n", client->addr, i, o);
/* check if the pins are valid */ /* check if the pins are valid */
...@@ -191,7 +192,7 @@ static int command(struct i2c_client *client, unsigned int cmd, void *arg) ...@@ -191,7 +192,7 @@ static int command(struct i2c_client *client, unsigned int cmd, void *arg)
static struct i2c_driver driver = { static struct i2c_driver driver = {
.driver = { .driver = {
.name = "tea6415c", .name = "tea6415c",
}, },
.id = I2C_DRIVERID_TEA6415C, .id = I2C_DRIVERID_TEA6415C,
.attach_adapter = attach, .attach_adapter = attach,
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
#include <linux/module.h> #include <linux/module.h>
#include <linux/ioctl.h> #include <linux/ioctl.h>
#include <linux/i2c.h> #include <linux/i2c.h>
...@@ -83,7 +84,7 @@ static int tea6420_switch(struct i2c_client *client, int i, int o, int g) ...@@ -83,7 +84,7 @@ static int tea6420_switch(struct i2c_client *client, int i, int o, int g)
dprintk("i2c_smbus_write_byte() failed, ret:%d\n", ret); dprintk("i2c_smbus_write_byte() failed, ret:%d\n", ret);
return -EIO; return -EIO;
} }
return 0; return 0;
} }
...@@ -167,7 +168,7 @@ static int command(struct i2c_client *client, unsigned int cmd, void *arg) ...@@ -167,7 +168,7 @@ static int command(struct i2c_client *client, unsigned int cmd, void *arg)
static struct i2c_driver driver = { static struct i2c_driver driver = {
.driver = { .driver = {
.name = "tea6420", .name = "tea6420",
}, },
.id = I2C_DRIVERID_TEA6420, .id = I2C_DRIVERID_TEA6420,
.attach_adapter = attach, .attach_adapter = attach,
......
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