Skip to content

Commit

Permalink
V4L/DVB (3537a): Whitespace cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Mauro Carvalho Chehab authored and Linus Torvalds committed Mar 21, 2006
1 parent 4caba42 commit a8733ca
Show file tree
Hide file tree
Showing 8 changed files with 125 additions and 122 deletions.
58 changes: 29 additions & 29 deletions drivers/media/video/dpc7146.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
dpc7146.c - v4l2 driver for the dpc7146 demonstration board
Copyright (C) 2000-2003 Michael Hunold <michael@mihu.de>
This program is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -52,7 +52,7 @@
#define SAA711X_DECODED_BYTES_OF_TS_2 0x1C
#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;
module_param(debug, int, 0);
Expand Down Expand Up @@ -81,16 +81,16 @@ struct dpc
struct video_device *video_dev;
struct video_device *vbi_dev;

struct i2c_adapter i2c_adapter;
struct i2c_adapter i2c_adapter;
struct i2c_client *saa7111a;

int cur_input; /* current input */
};

/* fixme: add vbi stuff here */
static int dpc_probe(struct saa7146_dev* dev)
{
struct dpc* dpc = NULL;
struct dpc* dpc = NULL;
struct i2c_client *client;
struct list_head *item;

Expand Down Expand Up @@ -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 */
list_for_each(item,&dpc->i2c_adapter.clients) {
client = list_entry(item, struct i2c_client, list);
if( I2C_SAA7111A == client->addr )
if( I2C_SAA7111A == client->addr )
dpc->saa7111a = client;
}

/* check if all devices are present */
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);
kfree(dpc);
return -ENODEV;
}
/* all devices are present, probe was successful */
DEB_D(("dpc_v4l2.o: dpc_probe succeeded for this device.\n"));

/* all devices are present, probe was successful */
DEB_D(("dpc_v4l2.o: dpc_probe succeeded for this device.\n"));

/* we store the pointer in our private data field */
dev->ext_priv = dpc;
Expand Down Expand Up @@ -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)
{
struct dpc* dpc = (struct dpc*)dev->ext_priv;

DEB_D(("dpc_v4l2.o: dpc_attach called.\n"));

/* checking for i2c-devices can be omitted here, because we
Expand All @@ -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"));
return -1;
}

/* initialization stuff (vbi) (only for revision > 0 and for extensions which want it)*/
if( 0 != DPC_BOARD_CAN_DO_VBI(dev)) {
if( 0 != saa7146_register_device(&dpc->vbi_dev, dev, "dpc", VFL_TYPE_VBI)) {
Expand All @@ -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);
dpc_num++;

/* the rest */
dpc->cur_input = 0;
dpc_init_done(dev);

return 0;
}

static int dpc_detach(struct saa7146_dev* dev)
{
struct dpc* dpc = (struct dpc*)dev->ext_priv;

DEB_EE(("dev:%p\n",dev));

i2c_release_client(dpc->saa7111a);
Expand All @@ -238,37 +238,37 @@ static int dpc_detach(struct saa7146_dev* dev)
int dpc_vbi_bypass(struct saa7146_dev* dev)
{
struct dpc* dpc = (struct dpc*)dev->ext_priv;

int i = 1;

/* switch bypass in saa7111a */
if ( 0 != dpc->saa7111a->driver->command(dpc->saa7111a,SAA711X_VBI_BYPASS, &i)) {
printk("dpc_v4l2.o: VBI_BYPASS: could not address saa7111a.\n");
return -1;
}
}

return 0;
}
#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 dpc* dpc = (struct dpc*)dev->ext_priv;
/*
struct saa7146_vv *vv = dev->vv_data;
struct saa7146_vv *vv = dev->vv_data;
*/
switch(cmd)
{
case VIDIOC_ENUMINPUT:
{
struct v4l2_input *i = arg;
DEB_EE(("VIDIOC_ENUMINPUT %d.\n",i->index));

if( i->index < 0 || i->index >= DPC_INPUTS) {
return -EINVAL;
}

memcpy(i, &dpc_inputs[i->index], sizeof(struct v4l2_input));

DEB_D(("dpc_v4l2.o: v4l2_ioctl: VIDIOC_ENUMINPUT %d.\n",i->index));
Expand All @@ -289,13 +289,13 @@ static int dpc_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg)
if (input < 0 || input >= DPC_INPUTS) {
return -EINVAL;
}

dpc->cur_input = input;

/* 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);
printk("dpc_v4l2.o: VIDIOC_S_INPUT: fixme switch input.\n");

return 0;
}
default:
Expand Down Expand Up @@ -334,8 +334,8 @@ static struct saa7146_standard standard[] = {
static struct saa7146_extension extension;

static struct saa7146_pci_extension_data dpc = {
.ext_priv = "Multimedia eXtension Board",
.ext = &extension,
.ext_priv = "Multimedia eXtension Board",
.ext = &extension,
};

static struct pci_device_id pci_tbl[] = {
Expand All @@ -357,15 +357,15 @@ static struct saa7146_ext_vv vv_data = {
.capabilities = V4L2_CAP_VBI_CAPTURE,
.stds = &standard[0],
.num_stds = sizeof(standard)/sizeof(struct saa7146_standard),
.std_callback = &std_callback,
.std_callback = &std_callback,
.ioctls = &ioctls[0],
.ioctl = dpc_ioctl,
};

static struct saa7146_extension extension = {
.name = "dpc7146 demonstration board",
.flags = SAA7146_USE_I2C_IRQ,

.pci_tbl = &pci_tbl[0],
.module = THIS_MODULE,

Expand All @@ -375,15 +375,15 @@ static struct saa7146_extension extension = {

.irq_mask = 0,
.irq_func = NULL,
};
};

static int __init dpc_init_module(void)
{
if( 0 != saa7146_register_extension(&extension)) {
DEB_S(("failed to register extension.\n"));
return -ENODEV;
}

return 0;
}

Expand Down
10 changes: 5 additions & 5 deletions drivers/media/video/hexium_gemini.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*
hexium_gemini.c - v4l2 driver for Hexium Gemini frame grabber cards
Visit http://www.mihu.de/linux/saa7146/ and follow the link
to "hexium" for further details about this card.
Copyright (C) 2003 Michael Hunold <michael@mihu.de>
This program is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -81,7 +81,7 @@ struct hexium

struct video_device *video_dev;
struct i2c_adapter i2c_adapter;

int cur_input; /* current input */
v4l2_std_id cur_std; /* current standard */
int cur_bw; /* current black/white status */
Expand Down Expand Up @@ -174,7 +174,7 @@ static struct saa7146_standard hexium_standards[] = {
.h_offset = 1, .h_pixels = 720,
.v_max_out = 576, .h_max_out = 768,
}
};
};

/* 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.
Expand Down Expand Up @@ -311,7 +311,7 @@ static int hexium_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg)
struct saa7146_dev *dev = fh->dev;
struct hexium *hexium = (struct hexium *) dev->ext_priv;
/*
struct saa7146_vv *vv = dev->vv_data;
struct saa7146_vv *vv = dev->vv_data;
*/
switch (cmd) {
case VIDIOC_ENUMINPUT:
Expand Down
18 changes: 9 additions & 9 deletions drivers/media/video/hexium_orion.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Visit http://www.mihu.de/linux/saa7146/ and follow the link
to "hexium" for further details about this card.
Copyright (C) 2003 Michael Hunold <michael@mihu.de>
This program is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -69,7 +69,7 @@ struct hexium
{
int type;
struct video_device *video_dev;
struct i2c_adapter i2c_adapter;
struct i2c_adapter i2c_adapter;

int cur_input; /* current input */
};
Expand All @@ -86,7 +86,7 @@ static u8 hexium_saa7110[53]={
};

static struct {
struct hexium_data data[8];
struct hexium_data data[8];
} hexium_input_select[] = {
{
{ /* cvbs 1 */
Expand Down Expand Up @@ -153,7 +153,7 @@ static struct {
{ 0x30, 0x60 },
{ 0x31, 0xB5 }, // ??
{ 0x21, 0x03 },
}
}
}, {
{ /* y/c 1 */
{ 0x06, 0x80 },
Expand Down Expand Up @@ -187,7 +187,7 @@ static struct {
{ 0x31, 0x75 },
{ 0x21, 0x21 },
}
}
}
};

static struct saa7146_standard hexium_standards[] = {
Expand All @@ -207,7 +207,7 @@ static struct saa7146_standard hexium_standards[] = {
.h_offset = 1, .h_pixels = 720,
.v_max_out = 576, .h_max_out = 768,
}
};
};

/* this is only called for old HV-PCI6/Orion cards
without eeprom */
Expand Down Expand Up @@ -272,7 +272,7 @@ static int hexium_probe(struct saa7146_dev *dev)
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 */
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");
Expand Down Expand Up @@ -314,7 +314,7 @@ static int hexium_set_input(struct hexium *hexium, int input)
{
union i2c_smbus_data data;
int i = 0;

DEB_D((".\n"));

for (i = 0; i < 8; i++) {
Expand Down Expand Up @@ -375,7 +375,7 @@ static int hexium_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg)
struct saa7146_dev *dev = fh->dev;
struct hexium *hexium = (struct hexium *) dev->ext_priv;
/*
struct saa7146_vv *vv = dev->vv_data;
struct saa7146_vv *vv = dev->vv_data;
*/
switch (cmd) {
case VIDIOC_ENUMINPUT:
Expand Down
Loading

0 comments on commit a8733ca

Please sign in to comment.