Commit 3a1ed3f3 authored by Rusty Russell's avatar Rusty Russell Committed by Linus Torvalds

[PATCH] Designated initializers for cs46xx drivers

The old form of designated initializers are obsolete: we need to
replace them with the ISO C forms before 2.6.  Gcc has always supported
both forms anyway.
parent 1560d74b
...@@ -1935,12 +1935,12 @@ static int cs_midi_release(struct inode *inode, struct file *file) ...@@ -1935,12 +1935,12 @@ static int cs_midi_release(struct inode *inode, struct file *file)
*/ */
static /*const*/ struct file_operations cs_midi_fops = { static /*const*/ struct file_operations cs_midi_fops = {
CS_OWNER CS_THIS_MODULE CS_OWNER CS_THIS_MODULE
llseek: no_llseek, .llseek = no_llseek,
read: cs_midi_read, .read = cs_midi_read,
write: cs_midi_write, .write = cs_midi_write,
poll: cs_midi_poll, .poll = cs_midi_poll,
open: cs_midi_open, .open = cs_midi_open,
release: cs_midi_release, .release = cs_midi_release,
}; };
/* /*
...@@ -3819,14 +3819,14 @@ static int cs46xx_resume(struct cs_card *card) ...@@ -3819,14 +3819,14 @@ static int cs46xx_resume(struct cs_card *card)
static /*const*/ struct file_operations cs461x_fops = { static /*const*/ struct file_operations cs461x_fops = {
CS_OWNER CS_THIS_MODULE CS_OWNER CS_THIS_MODULE
llseek: no_llseek, .llseek = no_llseek,
read: cs_read, .read = cs_read,
write: cs_write, .write = cs_write,
poll: cs_poll, .poll = cs_poll,
ioctl: cs_ioctl, .ioctl = cs_ioctl,
mmap: cs_mmap, .mmap = cs_mmap,
open: cs_open, .open = cs_open,
release: cs_release, .release = cs_release,
}; };
/* Write AC97 codec registers */ /* Write AC97 codec registers */
...@@ -4226,10 +4226,10 @@ static int cs_ioctl_mixdev(struct inode *inode, struct file *file, unsigned int ...@@ -4226,10 +4226,10 @@ static int cs_ioctl_mixdev(struct inode *inode, struct file *file, unsigned int
static /*const*/ struct file_operations cs_mixer_fops = { static /*const*/ struct file_operations cs_mixer_fops = {
CS_OWNER CS_THIS_MODULE CS_OWNER CS_THIS_MODULE
llseek: no_llseek, .llseek = no_llseek,
ioctl: cs_ioctl_mixdev, .ioctl = cs_ioctl_mixdev,
open: cs_open_mixdev, .open = cs_open_mixdev,
release: cs_release_mixdev, .release = cs_release_mixdev,
}; };
/* AC97 codec initialisation. */ /* AC97 codec initialisation. */
...@@ -5632,12 +5632,12 @@ static struct pci_device_id cs46xx_pci_tbl[] __devinitdata = { ...@@ -5632,12 +5632,12 @@ static struct pci_device_id cs46xx_pci_tbl[] __devinitdata = {
MODULE_DEVICE_TABLE(pci, cs46xx_pci_tbl); MODULE_DEVICE_TABLE(pci, cs46xx_pci_tbl);
struct pci_driver cs46xx_pci_driver = { struct pci_driver cs46xx_pci_driver = {
name:"cs46xx", .name= "cs46xx",
id_table:cs46xx_pci_tbl, .id_table= cs46xx_pci_tbl,
probe:cs46xx_probe, .probe= cs46xx_probe,
remove:cs46xx_remove, .remove= cs46xx_remove,
suspend:CS46XX_SUSPEND_TBL, .suspend= CS46XX_SUSPEND_TBL,
resume:CS46XX_RESUME_TBL, .resume= CS46XX_RESUME_TBL,
}; };
int __init cs46xx_init_module(void) int __init cs46xx_init_module(void)
......
...@@ -182,13 +182,13 @@ static void __devexit snd_card_cs46xx_remove(struct pci_dev *pci) ...@@ -182,13 +182,13 @@ static void __devexit snd_card_cs46xx_remove(struct pci_dev *pci)
} }
static struct pci_driver driver = { static struct pci_driver driver = {
name: "Sound Fusion CS46xx", .name = "Sound Fusion CS46xx",
id_table: snd_cs46xx_ids, .id_table = snd_cs46xx_ids,
probe: snd_card_cs46xx_probe, .probe = snd_card_cs46xx_probe,
remove: __devexit_p(snd_card_cs46xx_remove), .remove = __devexit_p(snd_card_cs46xx_remove),
#ifdef CONFIG_PM #ifdef CONFIG_PM
suspend: snd_card_cs46xx_suspend, .suspend = snd_card_cs46xx_suspend,
resume: snd_card_cs46xx_resume, .resume = snd_card_cs46xx_resume,
#endif #endif
}; };
......
...@@ -1055,17 +1055,17 @@ static snd_pcm_hardware_t snd_cs46xx_playback = ...@@ -1055,17 +1055,17 @@ static snd_pcm_hardware_t snd_cs46xx_playback =
formats: (SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_U8 | formats: (SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_U8 |
SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S16_BE | SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S16_BE |
SNDRV_PCM_FMTBIT_U16_LE | SNDRV_PCM_FMTBIT_U16_BE), SNDRV_PCM_FMTBIT_U16_LE | SNDRV_PCM_FMTBIT_U16_BE),
rates: SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000, .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000,
rate_min: 5500, .rate_min = 5500,
rate_max: 48000, .rate_max = 48000,
channels_min: 1, .channels_min = 1,
channels_max: 2, .channels_max = 2,
buffer_bytes_max: (256 * 1024), .buffer_bytes_max = (256 * 1024),
period_bytes_min: CS46XX_PERIOD_SIZE, .period_bytes_min = CS46XX_PERIOD_SIZE,
period_bytes_max: CS46XX_PERIOD_SIZE, .period_bytes_max = CS46XX_PERIOD_SIZE,
periods_min: CS46XX_FRAGS, .periods_min = CS46XX_FRAGS,
periods_max: 1024, .periods_max = 1024,
fifo_size: 0, .fifo_size = 0,
}; };
static snd_pcm_hardware_t snd_cs46xx_capture = static snd_pcm_hardware_t snd_cs46xx_capture =
...@@ -1074,18 +1074,18 @@ static snd_pcm_hardware_t snd_cs46xx_capture = ...@@ -1074,18 +1074,18 @@ static snd_pcm_hardware_t snd_cs46xx_capture =
SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_BLOCK_TRANSFER | SNDRV_PCM_INFO_BLOCK_TRANSFER |
SNDRV_PCM_INFO_RESUME), SNDRV_PCM_INFO_RESUME),
formats: SNDRV_PCM_FMTBIT_S16_LE, .formats = SNDRV_PCM_FMTBIT_S16_LE,
rates: SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000, .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000,
rate_min: 5500, .rate_min = 5500,
rate_max: 48000, .rate_max = 48000,
channels_min: 2, .channels_min = 2,
channels_max: 2, .channels_max = 2,
buffer_bytes_max: (256 * 1024), .buffer_bytes_max = (256 * 1024),
period_bytes_min: CS46XX_PERIOD_SIZE, .period_bytes_min = CS46XX_PERIOD_SIZE,
period_bytes_max: CS46XX_PERIOD_SIZE, .period_bytes_max = CS46XX_PERIOD_SIZE,
periods_min: CS46XX_FRAGS, .periods_min = CS46XX_FRAGS,
periods_max: 1024, .periods_max = 1024,
fifo_size: 0, .fifo_size = 0,
}; };
static int snd_cs46xx_playback_open(snd_pcm_substream_t * substream) static int snd_cs46xx_playback_open(snd_pcm_substream_t * substream)
...@@ -1141,49 +1141,49 @@ static int snd_cs46xx_capture_close(snd_pcm_substream_t * substream) ...@@ -1141,49 +1141,49 @@ static int snd_cs46xx_capture_close(snd_pcm_substream_t * substream)
} }
snd_pcm_ops_t snd_cs46xx_playback_ops = { snd_pcm_ops_t snd_cs46xx_playback_ops = {
open: snd_cs46xx_playback_open, .open = snd_cs46xx_playback_open,
close: snd_cs46xx_playback_close, .close = snd_cs46xx_playback_close,
ioctl: snd_pcm_lib_ioctl, .ioctl = snd_pcm_lib_ioctl,
hw_params: snd_cs46xx_playback_hw_params, .hw_params = snd_cs46xx_playback_hw_params,
hw_free: snd_cs46xx_playback_hw_free, .hw_free = snd_cs46xx_playback_hw_free,
prepare: snd_cs46xx_playback_prepare, .prepare = snd_cs46xx_playback_prepare,
trigger: snd_cs46xx_playback_trigger, .trigger = snd_cs46xx_playback_trigger,
pointer: snd_cs46xx_playback_direct_pointer, .pointer = snd_cs46xx_playback_direct_pointer,
}; };
snd_pcm_ops_t snd_cs46xx_playback_indirect_ops = { snd_pcm_ops_t snd_cs46xx_playback_indirect_ops = {
open: snd_cs46xx_playback_open, .open = snd_cs46xx_playback_open,
close: snd_cs46xx_playback_close, .close = snd_cs46xx_playback_close,
ioctl: snd_pcm_lib_ioctl, .ioctl = snd_pcm_lib_ioctl,
hw_params: snd_cs46xx_playback_hw_params, .hw_params = snd_cs46xx_playback_hw_params,
hw_free: snd_cs46xx_playback_hw_free, .hw_free = snd_cs46xx_playback_hw_free,
prepare: snd_cs46xx_playback_prepare, .prepare = snd_cs46xx_playback_prepare,
trigger: snd_cs46xx_playback_trigger, .trigger = snd_cs46xx_playback_trigger,
copy: snd_cs46xx_playback_copy, .copy = snd_cs46xx_playback_copy,
pointer: snd_cs46xx_playback_indirect_pointer, .pointer = snd_cs46xx_playback_indirect_pointer,
}; };
snd_pcm_ops_t snd_cs46xx_capture_ops = { snd_pcm_ops_t snd_cs46xx_capture_ops = {
open: snd_cs46xx_capture_open, .open = snd_cs46xx_capture_open,
close: snd_cs46xx_capture_close, .close = snd_cs46xx_capture_close,
ioctl: snd_pcm_lib_ioctl, .ioctl = snd_pcm_lib_ioctl,
hw_params: snd_cs46xx_capture_hw_params, .hw_params = snd_cs46xx_capture_hw_params,
hw_free: snd_cs46xx_capture_hw_free, .hw_free = snd_cs46xx_capture_hw_free,
prepare: snd_cs46xx_capture_prepare, .prepare = snd_cs46xx_capture_prepare,
trigger: snd_cs46xx_capture_trigger, .trigger = snd_cs46xx_capture_trigger,
pointer: snd_cs46xx_capture_direct_pointer, .pointer = snd_cs46xx_capture_direct_pointer,
}; };
snd_pcm_ops_t snd_cs46xx_capture_indirect_ops = { snd_pcm_ops_t snd_cs46xx_capture_indirect_ops = {
open: snd_cs46xx_capture_open, .open = snd_cs46xx_capture_open,
close: snd_cs46xx_capture_close, .close = snd_cs46xx_capture_close,
ioctl: snd_pcm_lib_ioctl, .ioctl = snd_pcm_lib_ioctl,
hw_params: snd_cs46xx_capture_hw_params, .hw_params = snd_cs46xx_capture_hw_params,
hw_free: snd_cs46xx_capture_hw_free, .hw_free = snd_cs46xx_capture_hw_free,
prepare: snd_cs46xx_capture_prepare, .prepare = snd_cs46xx_capture_prepare,
trigger: snd_cs46xx_capture_trigger, .trigger = snd_cs46xx_capture_trigger,
copy: snd_cs46xx_capture_copy, .copy = snd_cs46xx_capture_copy,
pointer: snd_cs46xx_capture_indirect_pointer, .pointer = snd_cs46xx_capture_indirect_pointer,
}; };
static void snd_cs46xx_pcm_free(snd_pcm_t *pcm) static void snd_cs46xx_pcm_free(snd_pcm_t *pcm)
...@@ -1266,20 +1266,20 @@ static int snd_cs46xx_vol_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ...@@ -1266,20 +1266,20 @@ static int snd_cs46xx_vol_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *
static snd_kcontrol_new_t snd_cs46xx_controls[] __devinitdata = { static snd_kcontrol_new_t snd_cs46xx_controls[] __devinitdata = {
{ {
iface: SNDRV_CTL_ELEM_IFACE_MIXER, .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
name: "DAC Volume", .name = "DAC Volume",
info: snd_cs46xx_vol_info, .info = snd_cs46xx_vol_info,
get: snd_cs46xx_vol_get, .get = snd_cs46xx_vol_get,
put: snd_cs46xx_vol_put, .put = snd_cs46xx_vol_put,
private_value: BA1_PVOL, .private_value = BA1_PVOL,
}, },
{ {
iface: SNDRV_CTL_ELEM_IFACE_MIXER, .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
name: "ADC Volume", .name = "ADC Volume",
info: snd_cs46xx_vol_info, .info = snd_cs46xx_vol_info,
get: snd_cs46xx_vol_get, .get = snd_cs46xx_vol_get,
put: snd_cs46xx_vol_put, .put = snd_cs46xx_vol_put,
private_value: BA1_CVOL, .private_value = BA1_CVOL,
}}; }};
int __devinit snd_cs46xx_mixer(cs46xx_t *chip) int __devinit snd_cs46xx_mixer(cs46xx_t *chip)
...@@ -1465,16 +1465,16 @@ static void snd_cs46xx_midi_output_trigger(snd_rawmidi_substream_t * substream, ...@@ -1465,16 +1465,16 @@ static void snd_cs46xx_midi_output_trigger(snd_rawmidi_substream_t * substream,
static snd_rawmidi_ops_t snd_cs46xx_midi_output = static snd_rawmidi_ops_t snd_cs46xx_midi_output =
{ {
open: snd_cs46xx_midi_output_open, .open = snd_cs46xx_midi_output_open,
close: snd_cs46xx_midi_output_close, .close = snd_cs46xx_midi_output_close,
trigger: snd_cs46xx_midi_output_trigger, .trigger = snd_cs46xx_midi_output_trigger,
}; };
static snd_rawmidi_ops_t snd_cs46xx_midi_input = static snd_rawmidi_ops_t snd_cs46xx_midi_input =
{ {
open: snd_cs46xx_midi_input_open, .open = snd_cs46xx_midi_input_open,
close: snd_cs46xx_midi_input_close, .close = snd_cs46xx_midi_input_close,
trigger: snd_cs46xx_midi_input_trigger, .trigger = snd_cs46xx_midi_input_trigger,
}; };
int __devinit snd_cs46xx_midi(cs46xx_t *chip, int device, snd_rawmidi_t **rrawmidi) int __devinit snd_cs46xx_midi(cs46xx_t *chip, int device, snd_rawmidi_t **rrawmidi)
...@@ -1628,7 +1628,7 @@ static long snd_cs46xx_io_read(snd_info_entry_t *entry, void *file_private_data, ...@@ -1628,7 +1628,7 @@ static long snd_cs46xx_io_read(snd_info_entry_t *entry, void *file_private_data,
} }
static struct snd_info_entry_ops snd_cs46xx_proc_io_ops = { static struct snd_info_entry_ops snd_cs46xx_proc_io_ops = {
read: snd_cs46xx_io_read, .read = snd_cs46xx_io_read,
}; };
static int __devinit snd_cs46xx_proc_init(snd_card_t * card, cs46xx_t *chip) static int __devinit snd_cs46xx_proc_init(snd_card_t * card, cs46xx_t *chip)
...@@ -2271,7 +2271,7 @@ int __devinit snd_cs46xx_create(snd_card_t * card, ...@@ -2271,7 +2271,7 @@ int __devinit snd_cs46xx_create(snd_card_t * card,
struct cs_card_type *cp; struct cs_card_type *cp;
u16 ss_card, ss_vendor; u16 ss_card, ss_vendor;
static snd_device_ops_t ops = { static snd_device_ops_t ops = {
dev_free: snd_cs46xx_dev_free, .dev_free = snd_cs46xx_dev_free,
}; };
*rchip = NULL; *rchip = NULL;
......
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