Commit a709e779 authored by Rusty Russell's avatar Rusty Russell Committed by Linus Torvalds

[PATCH] c99 struct initialization for the saa7134 driver

From:  Gerd Knorr <kraxel@bytesex.org>
parent 461671fd
This diff is collapsed.
......@@ -896,10 +896,10 @@ static void __devexit saa7134_finidev(struct pci_dev *pci_dev)
}
static struct pci_driver saa7134_pci_driver = {
name: "saa7134",
id_table: saa7134_pci_tbl,
probe: saa7134_initdev,
remove: saa7134_finidev,
.name = "saa7134",
.id_table = saa7134_pci_tbl,
.probe = saa7134_initdev,
.remove = saa7134_finidev,
};
static int saa7134_init(void)
......
......@@ -338,25 +338,25 @@ static int attach_inform(struct i2c_client *client)
}
static struct i2c_algorithm saa7134_algo = {
name: "saa7134",
id: I2C_ALGO_SAA7134,
master_xfer: saa7134_i2c_xfer,
algo_control: algo_control,
functionality: functionality,
.name = "saa7134",
.id = I2C_ALGO_SAA7134,
.master_xfer = saa7134_i2c_xfer,
.algo_control = algo_control,
.functionality = functionality,
};
static struct i2c_adapter saa7134_adap_template = {
name: "saa7134",
id: I2C_ALGO_SAA7134,
algo: &saa7134_algo,
inc_use: inc_use,
dec_use: dec_use,
client_register: attach_inform,
.name = "saa7134",
.id = I2C_ALGO_SAA7134,
.algo = &saa7134_algo,
.inc_use = inc_use,
.dec_use = dec_use,
.client_register = attach_inform,
};
static struct i2c_client saa7134_client_template = {
name: "saa7134 internal",
id: -1,
.name = "saa7134 internal",
.id = -1,
};
/* ----------------------------------------------------------- */
......
......@@ -486,14 +486,14 @@ static unsigned int dsp_poll(struct file *file, struct poll_table_struct *wait)
}
struct file_operations saa7134_dsp_fops = {
owner: THIS_MODULE,
open: dsp_open,
release: dsp_release,
read: dsp_read,
write: dsp_write,
ioctl: dsp_ioctl,
poll: dsp_poll,
llseek: no_llseek,
.owner = THIS_MODULE,
.open = dsp_open,
.release = dsp_release,
.read = dsp_read,
.write = dsp_write,
.ioctl = dsp_ioctl,
.poll = dsp_poll,
.llseek = no_llseek,
};
/* ------------------------------------------------------------------ */
......@@ -670,11 +670,11 @@ static int mixer_ioctl(struct inode *inode, struct file *file,
}
struct file_operations saa7134_mixer_fops = {
owner: THIS_MODULE,
open: mixer_open,
release: mixer_release,
ioctl: mixer_ioctl,
llseek: no_llseek,
.owner = THIS_MODULE,
.open = mixer_open,
.release = mixer_release,
.ioctl = mixer_ioctl,
.llseek = no_llseek,
};
/* ------------------------------------------------------------------ */
......
......@@ -151,10 +151,10 @@ static void buffer_release(struct file *file, struct videobuf_buffer *vb)
}
static struct videobuf_queue_ops ts_qops = {
buf_setup: buffer_setup,
buf_prepare: buffer_prepare,
buf_queue: buffer_queue,
buf_release: buffer_release,
.buf_setup = buffer_setup,
.buf_prepare = buffer_prepare,
.buf_queue = buffer_queue,
.buf_release = buffer_release,
};
/* ------------------------------------------------------------------ */
......@@ -375,14 +375,14 @@ static int ts_ioctl(struct inode *inode, struct file *file,
static struct file_operations ts_fops =
{
owner: THIS_MODULE,
open: ts_open,
release: ts_release,
read: ts_read,
poll: ts_poll,
mmap: ts_mmap,
ioctl: ts_ioctl,
llseek: no_llseek,
.owner = THIS_MODULE,
.open = ts_open,
.release = ts_release,
.read = ts_read,
.poll = ts_poll,
.mmap = ts_mmap,
.ioctl = ts_ioctl,
.llseek = no_llseek,
};
......@@ -391,12 +391,12 @@ static struct file_operations ts_fops =
struct video_device saa7134_ts_template =
{
name: "saa7134-ts",
type: 0 /* FIXME */,
type2: 0 /* FIXME */,
hardware: 0,
fops: &ts_fops,
minor: -1,
.name = "saa7134-ts",
.type = 0 /* FIXME */,
.type2 = 0 /* FIXME */,
.hardware = 0,
.fops = &ts_fops,
.minor = -1,
};
int saa7134_ts_init(struct saa7134_dev *dev)
......
......@@ -48,65 +48,65 @@ MODULE_PARM_DESC(audio_debug,"enable debug messages [tv audio]");
static struct saa7134_tvaudio tvaudio[] = {
{
name: "PAL-B/G FM-stereo",
std: V4L2_STD_PAL,
mode: TVAUDIO_FM_BG_STEREO,
carr1: 5500,
carr2: 5742,
.name = "PAL-B/G FM-stereo",
.std = V4L2_STD_PAL,
.mode = TVAUDIO_FM_BG_STEREO,
.carr1 = 5500,
.carr2 = 5742,
},{
name: "PAL-D/K1 FM-stereo",
std: V4L2_STD_PAL,
carr1: 6500,
carr2: 6258,
mode: TVAUDIO_FM_BG_STEREO,
.name = "PAL-D/K1 FM-stereo",
.std = V4L2_STD_PAL,
.carr1 = 6500,
.carr2 = 6258,
.mode = TVAUDIO_FM_BG_STEREO,
},{
name: "PAL-D/K2 FM-stereo",
std: V4L2_STD_PAL,
carr1: 6500,
carr2: 6742,
mode: TVAUDIO_FM_BG_STEREO,
.name = "PAL-D/K2 FM-stereo",
.std = V4L2_STD_PAL,
.carr1 = 6500,
.carr2 = 6742,
.mode = TVAUDIO_FM_BG_STEREO,
},{
name: "PAL-D/K3 FM-stereo",
std: V4L2_STD_PAL,
carr1: 6500,
carr2: 5742,
mode: TVAUDIO_FM_BG_STEREO,
.name = "PAL-D/K3 FM-stereo",
.std = V4L2_STD_PAL,
.carr1 = 6500,
.carr2 = 5742,
.mode = TVAUDIO_FM_BG_STEREO,
},{
name: "PAL-B/G NICAM",
std: V4L2_STD_PAL,
carr1: 5500,
carr2: 5850,
mode: TVAUDIO_NICAM_FM,
.name = "PAL-B/G NICAM",
.std = V4L2_STD_PAL,
.carr1 = 5500,
.carr2 = 5850,
.mode = TVAUDIO_NICAM_FM,
},{
name: "PAL-I NICAM",
std: V4L2_STD_PAL,
carr1: 6000,
carr2: 6552,
mode: TVAUDIO_NICAM_FM,
.name = "PAL-I NICAM",
.std = V4L2_STD_PAL,
.carr1 = 6000,
.carr2 = 6552,
.mode = TVAUDIO_NICAM_FM,
},{
name: "PAL-D/K NICAM",
std: V4L2_STD_PAL,
carr1: 6500,
carr2: 5850,
mode: TVAUDIO_NICAM_FM,
.name = "PAL-D/K NICAM",
.std = V4L2_STD_PAL,
.carr1 = 6500,
.carr2 = 5850,
.mode = TVAUDIO_NICAM_FM,
},{
name: "SECAM-L NICAM",
std: V4L2_STD_SECAM,
carr1: 6500,
carr2: 5850,
mode: TVAUDIO_NICAM_AM,
.name = "SECAM-L NICAM",
.std = V4L2_STD_SECAM,
.carr1 = 6500,
.carr2 = 5850,
.mode = TVAUDIO_NICAM_AM,
},{
name: "NTSC-M",
std: V4L2_STD_NTSC,
carr1: 4500,
carr2: -1,
mode: TVAUDIO_FM_MONO,
.name = "NTSC-M",
.std = V4L2_STD_NTSC,
.carr1 = 4500,
.carr2 = -1,
.mode = TVAUDIO_FM_MONO,
},{
name: "NTSC-A2 FM-stereo",
std: V4L2_STD_NTSC,
carr1: 4500,
carr2: 4724,
mode: TVAUDIO_FM_K_STEREO,
.name = "NTSC-A2 FM-stereo",
.std = V4L2_STD_NTSC,
.carr1 = 4500,
.carr2 = 4724,
.mode = TVAUDIO_FM_K_STEREO,
}
};
#define TVAUDIO (sizeof(tvaudio)/sizeof(struct saa7134_tvaudio))
......
......@@ -207,10 +207,10 @@ static void buffer_release(struct file *file, struct videobuf_buffer *vb)
}
struct videobuf_queue_ops saa7134_vbi_qops = {
buf_setup: buffer_setup,
buf_prepare: buffer_prepare,
buf_queue: buffer_queue,
buf_release: buffer_release,
.buf_setup = buffer_setup,
.buf_prepare = buffer_prepare,
.buf_queue = buffer_queue,
.buf_release = buffer_release,
};
/* ------------------------------------------------------------------ */
......
This diff is collapsed.
......@@ -24,7 +24,7 @@
#include <linux/kdev_t.h>
#include "video-buf.h"
#define SAA7134_VERSION_CODE KERNEL_VERSION(0,2,1)
#define SAA7134_VERSION_CODE KERNEL_VERSION(0,2,2)
#ifndef TRUE
# define TRUE (1==1)
......
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