C99 initializers for sound/oss/dmasound
PATCH 1/1 C99 initializers for sound/oss/dmasound
Hi.
Here is a set of patches for files in that directory to convert the files to use C99 initializers. The patches are against the current BK.
Art Haas
===== sound/oss/dmasound/dmasound_atari.c 1.7 vs edited =====
sound/oss/dmasound/dmasound_atari.c +83 -83
@@ -767,39 +767,39 @@static TRANS transTTNormal = { - ct_ulaw: ata_ct_law, - ct_alaw: ata_ct_law, - ct_s8: ata_ct_s8, - ct_u8: ata_ct_u8, + .ct_ulaw = ata_ct_law, + .ct_alaw = ata_ct_law, + .ct_s8 = ata_ct_s8, + .ct_u8 = ata_ct_u8, };static TRANS transTTExpanding = { - ct_ulaw: ata_ctx_law, - ct_alaw: ata_ctx_law, - ct_s8: ata_ctx_s8, - ct_u8: ata_ctx_u8, + .ct_ulaw = ata_ctx_law, + .ct_alaw = ata_ctx_law, + .ct_s8 = ata_ctx_s8, + .ct_u8 = ata_ctx_u8, };static TRANS transFalconNormal = { - ct_ulaw: ata_ct_law, - ct_alaw: ata_ct_law, - ct_s8: ata_ct_s8, - ct_u8: ata_ct_u8, - ct_s16be: ata_ct_s16be, - ct_u16be: ata_ct_u16be, - ct_s16le: ata_ct_s16le, - ct_u16le: ata_ct_u16le + .ct_ulaw = ata_ct_law, + .ct_alaw = ata_ct_law, + .ct_s8 = ata_ct_s8, + .ct_u8 = ata_ct_u8, + .ct_s16be = ata_ct_s16be, + .ct_u16be = ata_ct_u16be, + .ct_s16le = ata_ct_s16le, + .ct_u16le = ata_ct_u16le };static TRANS transFalconExpanding = { - ct_ulaw: ata_ctx_law, - ct_alaw: ata_ctx_law, - ct_s8: ata_ctx_s8, - ct_u8: ata_ctx_u8, - ct_s16be: ata_ctx_s16be, - ct_u16be: ata_ctx_u16be, - ct_s16le: ata_ctx_s16le, - ct_u16le: ata_ctx_u16le, + .ct_ulaw = ata_ctx_law, + .ct_alaw = ata_ctx_law, + .ct_s8 = ata_ctx_s8, + .ct_u8 = ata_ctx_u8, + .ct_s16be = ata_ctx_s16be, + .ct_u16be = ata_ctx_u16be, + .ct_s16le = ata_ctx_s16le, + .ct_u16le = ata_ctx_u16le, };
@@ -1495,81 +1495,81 @@/*** Machine definitions *****************************************************/ static SETTINGS def_hard_falcon = { - format:AFMT_S8 , - stereo:0 , - size:8 , - speed:8195 + .format =AFMT_S8 , + .stereo =0 , + .size =8 , + .speed =8195 } ;static SETTINGS def_hard_tt = { - format:AFMT_S8 , - stereo:0 , - size:8 , - speed:12517 + .format =AFMT_S8 , + .stereo =0 , + .size =8 , + .speed =12517 } ;static SETTINGS def_soft = { - format:AFMT_U8 , - stereo:0 , - size:8 , - speed:8000 + .format =AFMT_U8 , + .stereo =0 , + .size =8 , + .speed =8000 } ;static MACHINE machTT = { - name:"Atari" , - name2:"TT" , - open: AtaOpen, - release: AtaRelease, - dma_alloc: AtaAlloc, - dma_free: AtaFree, - irqinit: AtaIrqInit, + .name ="Atari" , + .name2 ="TT" , + .open = AtaOpen, + .release = AtaRelease, + .dma_alloc = AtaAlloc, + .dma_free = AtaFree, + .irqinit = AtaIrqInit, #ifdef MODULE - irqcleanup: AtaIrqCleanUp, + .irqcleanup = AtaIrqCleanUp, #endif /* MODULE */ - init: TTInit, - silence: TTSilence, - setFormat: TTSetFormat, - setVolume: TTSetVolume, - setBass: AtaSetBass, - setTreble: AtaSetTreble, - setGain: TTSetGain, - play: AtaPlay, - mixer_init: TTMixerInit, - mixer_ioctl: TTMixerIoctl, - write_sq_setup: AtaWriteSqSetup, - sq_open: AtaSqOpen, - state_info: TTStateInfo, - min_dsp_speed:6258 , - version: ((DMASOUND_ATARI_REVISION <<8 ) |DMASOUND_ATARI_EDITION ), - hardware_afmts:AFMT_S8 ,/* h'ware-supported formats *only* here */ - capabilities:DSP_CAP_BATCH /* As per SNDCTL_DSP_GETCAPS */ + .init = TTInit, + .silence = TTSilence, + .setFormat = TTSetFormat, + .setVolume = TTSetVolume, + .setBass = AtaSetBass, + .setTreble = AtaSetTreble, + .setGain = TTSetGain, + .play = AtaPlay, + .mixer_init = TTMixerInit, + .mixer_ioctl = TTMixerIoctl, + .write_sq_setup = AtaWriteSqSetup, + .sq_open = AtaSqOpen, + .state_info = TTStateInfo, + .min_dsp_speed =6258 , + .version = ((DMASOUND_ATARI_REVISION <<8 ) |DMASOUND_ATARI_EDITION ), + .hardware_afmts =AFMT_S8 ,/* h'ware-supported formats *only* here */ + .capabilities =DSP_CAP_BATCH /* As per SNDCTL_DSP_GETCAPS */ };static MACHINE machFalcon = { - name:"Atari" , - name2:"FALCON" , - dma_alloc: AtaAlloc, - dma_free: AtaFree, - irqinit: AtaIrqInit, + .name ="Atari" , + .name2 ="FALCON" , + .dma_alloc = AtaAlloc, + .dma_free = AtaFree, + .irqinit = AtaIrqInit, #ifdef MODULE - irqcleanup: AtaIrqCleanUp, + .irqcleanup = AtaIrqCleanUp, #endif /* MODULE */ - init: FalconInit, - silence: FalconSilence, - setFormat: FalconSetFormat, - setVolume: FalconSetVolume, - setBass: AtaSetBass, - setTreble: AtaSetTreble, - play: AtaPlay, - mixer_init: FalconMixerInit, - mixer_ioctl: FalconMixerIoctl, - write_sq_setup: AtaWriteSqSetup, - sq_open: AtaSqOpen, - state_info: FalconStateInfo, - min_dsp_speed:8195 , - version: ((DMASOUND_ATARI_REVISION <<8 ) |DMASOUND_ATARI_EDITION ), - hardware_afmts: (AFMT_S8 |AFMT_S16_BE ),/* h'ware-supported formats *only* here */ - capabilities:DSP_CAP_BATCH /* As per SNDCTL_DSP_GETCAPS */ + .init = FalconInit, + .silence = FalconSilence, + .setFormat = FalconSetFormat, + .setVolume = FalconSetVolume, + .setBass = AtaSetBass, + .setTreble = AtaSetTreble, + .play = AtaPlay, + .mixer_init = FalconMixerInit, + .mixer_ioctl = FalconMixerIoctl, + .write_sq_setup = AtaWriteSqSetup, + .sq_open = AtaSqOpen, + .state_info = FalconStateInfo, + .min_dsp_speed =8195 , + .version = ((DMASOUND_ATARI_REVISION <<8 ) |DMASOUND_ATARI_EDITION ), + .hardware_afmts = (AFMT_S8 |AFMT_S16_BE ),/* h'ware-supported formats *only* here */ + .capabilities =DSP_CAP_BATCH /* As per SNDCTL_DSP_GETCAPS */ };
===== sound/oss/dmasound/dmasound_awacs.c 1.10 vs edited =====
sound/oss/dmasound/dmasound_awacs.c +31 -31
76 lines not on this page · raw message
===== sound/oss/dmasound/dmasound_core.c 1.8 vs edited =====
sound/oss/dmasound/dmasound_core.c +18 -18
@@ -367,11 +367,11 @@static struct file_operations mixer_fops = { - owner:THIS_MODULE , - llseek: no_llseek, - ioctl: mixer_ioctl, - open: mixer_open, - release: mixer_release, + .owner =THIS_MODULE , + .llseek = no_llseek, + .ioctl = mixer_ioctl, + .open = mixer_open, + .release = mixer_release, };static void __init mixer_init (void )
@@ -1325,15 +1325,15 @@static struct file_operations sq_fops = { - owner:THIS_MODULE , - llseek: no_llseek, - write: sq_write, - poll: sq_poll, - ioctl: sq_ioctl, - open: sq_open, - release: sq_release, + .owner =THIS_MODULE , + .llseek = no_llseek, + .write = sq_write, + .poll = sq_poll, + .ioctl = sq_ioctl, + .open = sq_open, + .release = sq_release, #ifdef HAS_RECORD - read:NULL /* default to no read for compat mode */ + .read =NULL /* default to no read for compat mode */ #endif };
@@ -1548,11 +1548,11 @@ }static struct file_operations state_fops = { - owner:THIS_MODULE , - llseek: no_llseek, - read: state_read, - open: state_open, - release: state_release, + .owner =THIS_MODULE , + .llseek = no_llseek, + .read = state_read, + .open = state_open, + .release = state_release, };static int __init state_init (void )
===== sound/oss/dmasound/dmasound_paula.c 1.6 vs edited =====
sound/oss/dmasound/dmasound_paula.c +38 -38
96 lines not on this page · raw message
===== sound/oss/dmasound/dmasound_q40.c 1.8 vs edited =====
sound/oss/dmasound/dmasound_q40.c +25 -25
64 lines not on this page · raw message
Signature · 4 lines
To announce that there must be no criticism of the President, or that we are to stand by the President, right or wrong, is not only unpatriotic and servile, but is morally treasonable to the American public. -- Theodore Roosevelt, Kansas City Star, 1918
sound/oss/dmasound/dmasound_atari.c
Quoted 8 lines · Art Haas
Here is a set of patches for files in that directory to convert the files to use C99 initializers. The patches are against the current BK.
Art Haas
=====
sound/oss/dmasound/dmasound_atari.c1.7 vs edited =====sound/oss/dmasound/dmasound_atari.c +0
-0
Thanks!
BTW, I just noticed those files never get compiled, although I have all m68k dmasound drivers enabled in my .config. Does the same thing happen on PPC?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Quoted 8 lines
sound/oss/dmasound/dmasound_atari.c
Quoted 3 lines
=====
sound/oss/dmasound/dmasound_atari.c1.7 vs edited =====sound/oss/dmasound/dmasound_atari.c +0
-0Thanks!
BTW, I just noticed those files never get compiled, although I have all m68k dmasound drivers enabled in my .config. Does the same thing happen on PPC?
I do not know, but i know that because i am unaware how to even build these files on my i386 PC, I made some typos in the diff. Here is a corrected version.
Regards,
Maciej
sound/oss/dmasound/dmasound_atari.c +83 -83
@@ -767,39 +767,39 @@static TRANS transTTNormal = { - ct_ulaw: ata_ct_law, - ct_alaw: ata_ct_law, - ct_s8: ata_ct_s8, - ct_u8: ata_ct_u8, + .ct_ulaw = ata_ct_law, + .ct_alaw = ata_ct_law, + .ct_s8 = ata_ct_s8, + .ct_u8 = ata_ct_u8, };static TRANS transTTExpanding = { - ct_ulaw: ata_ctx_law, - ct_alaw: ata_ctx_law, - ct_s8: ata_ctx_s8, - ct_u8: ata_ctx_u8, + .ct_ulaw = ata_ctx_law, + .ct_alaw = ata_ctx_law, + .ct_s8 = ata_ctx_s8, + .ct_u8 = ata_ctx_u8, };static TRANS transFalconNormal = { - ct_ulaw: ata_ct_law, - ct_alaw: ata_ct_law, - ct_s8: ata_ct_s8, - ct_u8: ata_ct_u8, - ct_s16be: ata_ct_s16be, - ct_u16be: ata_ct_u16be, - ct_s16le: ata_ct_s16le, - ct_u16le: ata_ct_u16le + .ct_ulaw = ata_ct_law, + .ct_alaw = ata_ct_law, + .ct_s8 = ata_ct_s8, + .ct_u8 = ata_ct_u8, + .ct_s16be = ata_ct_s16be, + .ct_u16be = ata_ct_u16be, + .ct_s16le = ata_ct_s16le, + .ct_u16le = ata_ct_u16le };static TRANS transFalconExpanding = { - ct_ulaw: ata_ctx_law, - ct_alaw: ata_ctx_law, - ct_s8: ata_ctx_s8, - ct_u8: ata_ctx_u8, - ct_s16be: ata_ctx_s16be, - ct_u16be: ata_ctx_u16be, - ct_s16le: ata_ctx_s16le, - ct_u16le: ata_ctx_u16le, + .ct_ulaw = ata_ctx_law, + .ct_alaw = ata_ctx_law, + .ct_s8 = ata_ctx_s8, + .ct_u8 = ata_ctx_u8, + .ct_s16be = ata_ctx_s16be, + .ct_u16be = ata_ctx_u16be, + .ct_s16le = ata_ctx_s16le, + .ct_u16le = ata_ctx_u16le, };
@@ -1495,81 +1495,81 @@/*** Machine definitions *****************************************************/ static SETTINGS def_hard_falcon = { - format:AFMT_S8 , - stereo:0 , - size:8 , - speed:8195 + .format =AFMT_S8 , + .stereo =0 , + .size =8 , + .speed =8195 } ;static SETTINGS def_hard_tt = { - format:AFMT_S8 , - stereo:0 , - size:8 , - speed:12517 + .format =AFMT_S8 , + .stereo =0 , + .size =8 , + .speed =12517 } ;static SETTINGS def_soft = { - format:AFMT_U8 , - stereo:0 , - size:8 , - speed:8000 + .format =AFMT_U8 , + .stereo =0 , + .size =8 , + .speed =8000 } ;static MACHINE machTT = { - name:"Atari" , - name2:"TT" , - open: AtaOpen, - release: AtaRelease, - dma_alloc: AtaAlloc, - dma_free: AtaFree, - irqinit: AtaIrqInit, + .name ="Atari" , + .name2 ="TT" , + .open = AtaOpen, + .release = AtaRelease, + .dma_alloc = AtaAlloc, + .dma_free = AtaFree, + .irqinit = AtaIrqInit, #ifdef MODULE - irqcleanup: AtaIrqCleanUp, + .irqcleanup = AtaIrqCleanUp, #endif /* MODULE */ - init: TTInit, - silence: TTSilence, - setFormat: TTSetFormat, - setVolume: TTSetVolume, - setBass: AtaSetBass, - setTreble: AtaSetTreble, - setGain: TTSetGain, - play: AtaPlay, - mixer_init: TTMixerInit, - mixer_ioctl: TTMixerIoctl, - write_sq_setup: AtaWriteSqSetup, - sq_open: AtaSqOpen, - state_info: TTStateInfo, - min_dsp_speed:6258 , - version: ((DMASOUND_ATARI_REVISION <<8 ) |DMASOUND_ATARI_EDITION ), - hardware_afmts:AFMT_S8 ,/* h'ware-supported formats *only* here */ - capabilities:DSP_CAP_BATCH /* As per SNDCTL_DSP_GETCAPS */ + .init = TTInit, + .silence = TTSilence, + .setFormat = TTSetFormat, + .setVolume = TTSetVolume, + .setBass = AtaSetBass, + .setTreble = AtaSetTreble, + .setGain = TTSetGain, + .play = AtaPlay, + .mixer_init = TTMixerInit, + .mixer_ioctl = TTMixerIoctl, + .write_sq_setup = AtaWriteSqSetup, + .sq_open = AtaSqOpen, + .state_info = TTStateInfo, + .min_dsp_speed =6258 , + .version = ((DMASOUND_ATARI_REVISION <<8 ) |DMASOUND_ATARI_EDITION ), + .hardware_afmts =AFMT_S8 ,/* h'ware-supported formats *only* here */ + .capabilities =DSP_CAP_BATCH /* As per SNDCTL_DSP_GETCAPS */ };static MACHINE machFalcon = { - name:"Atari" , - name2:"FALCON" , - dma_alloc: AtaAlloc, - dma_free: AtaFree, - irqinit: AtaIrqInit, + .name ="Atari" , + .name2 ="FALCON" , + .dma_alloc = AtaAlloc, + .dma_free = AtaFree, + .irqinit = AtaIrqInit, #ifdef MODULE - irqcleanup: AtaIrqCleanUp, + .irqcleanup = AtaIrqCleanUp, #endif /* MODULE */ - init: FalconInit, - silence: FalconSilence, - setFormat: FalconSetFormat, - setVolume: FalconSetVolume, - setBass: AtaSetBass, - setTreble: AtaSetTreble, - play: AtaPlay, - mixer_init: FalconMixerInit, - mixer_ioctl: FalconMixerIoctl, - write_sq_setup: AtaWriteSqSetup, - sq_open: AtaSqOpen, - state_info: FalconStateInfo, - min_dsp_speed:8195 , - version: ((DMASOUND_ATARI_REVISION <<8 ) |DMASOUND_ATARI_EDITION ), - hardware_afmts: (AFMT_S8 |AFMT_S16_BE ),/* h'ware-supported formats *only* here */ - capabilities:DSP_CAP_BATCH /* As per SNDCTL_DSP_GETCAPS */ + .init = FalconInit, + .silence = FalconSilence, + .setFormat = FalconSetFormat, + .setVolume = FalconSetVolume, + .setBass = AtaSetBass, + .setTreble = AtaSetTreble, + .play = AtaPlay, + .mixer_init = FalconMixerInit, + .mixer_ioctl = FalconMixerIoctl, + .write_sq_setup = AtaWriteSqSetup, + .sq_open = AtaSqOpen, + .state_info = FalconStateInfo, + .min_dsp_speed =8195 , + .version = ((DMASOUND_ATARI_REVISION <<8 ) |DMASOUND_ATARI_EDITION ), + .hardware_afmts = (AFMT_S8 |AFMT_S16_BE ),/* h'ware-supported formats *only* here */ + .capabilities =DSP_CAP_BATCH /* As per SNDCTL_DSP_GETCAPS */ };
sound/oss/dmasound/dmasound_awacs.c +31 -31
76 lines not on this page · raw message
sound/oss/dmasound/dmasound_core.c +18 -18
@@ -367,11 +367,11 @@static struct file_operations mixer_fops = { - owner:THIS_MODULE , - llseek: no_llseek, - ioctl: mixer_ioctl, - open: mixer_open, - release: mixer_release, + .owner =THIS_MODULE , + .llseek = no_llseek, + .ioctl = mixer_ioctl, + .open = mixer_open, + .release = mixer_release, };static void __init mixer_init (void )
@@ -1325,15 +1325,15 @@static struct file_operations sq_fops = { - owner:THIS_MODULE , - llseek: no_llseek, - write: sq_write, - poll: sq_poll, - ioctl: sq_ioctl, - open: sq_open, - release: sq_release, + .owner =THIS_MODULE , + .llseek = no_llseek, + .write = sq_write, + .poll = sq_poll, + .ioctl = sq_ioctl, + .open = sq_open, + .release = sq_release, #ifdef HAS_RECORD - read:NULL /* default to no read for compat mode */ + .read =NULL /* default to no read for compat mode */ #endif };
@@ -1548,11 +1548,11 @@ }static struct file_operations state_fops = { - owner:THIS_MODULE , - llseek: no_llseek, - read: state_read, - open: state_open, - release: state_release, + .owner =THIS_MODULE , + .llseek = no_llseek, + .read = state_read, + .open = state_open, + .release = state_release, };static int __init state_init (void )
sound/oss/dmasound/dmasound_paula.c +38 -38
96 lines not on this page · raw message
sound/oss/dmasound/dmasound_q40.c +25 -25
64 lines not on this page · raw message