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