All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] C99 initializers for sound/oss/dmasound
@ 2003-04-02 15:12 Art Haas
  2003-04-02 20:12 ` Geert Uytterhoeven
  0 siblings, 1 reply; 3+ messages in thread
From: Art Haas @ 2003-04-02 15:12 UTC (permalink / raw)
  To: linux-kernel

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 =====
--- 1.7/sound/oss/dmasound/dmasound_atari.c	Sat Sep 28 20:38:50 2002
+++ edited/sound/oss/dmasound/dmasound_atari.c	Wed Feb 26 18:33:00 2003
@@ -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 =====
--- 1.10/sound/oss/dmasound/dmasound_awacs.c	Tue Feb 25 04:51:20 2003
+++ edited/sound/oss/dmasound/dmasound_awacs.c	Wed Feb 26 18:32:59 2003
@@ -2405,45 +2405,45 @@
 /*** Machine definitions *****************************************************/
 
 static SETTINGS def_hard = {
-	format: AFMT_S16_BE,
-	stereo: 1,
-	size: 16,
-	speed: 44100
+	.format = AFMT_S16_BE,
+	.stereo = 1,
+	.size = 16,
+	.speed = 44100
 } ;
 
 static SETTINGS def_soft = {
-	format: AFMT_S16_BE,
-	stereo: 1,
-	size: 16,
-	speed: 44100
+	.format = AFMT_S16_BE,
+	.stereo = 1,
+	.size = 16,
+	.speed = 44100
 } ;
 
 static MACHINE machPMac = {
-	name:		awacs_name,
-	name2:		"PowerMac Built-in Sound",
-	open:		PMacOpen,
-	release:	PMacRelease,
-	dma_alloc:	PMacAlloc,
-	dma_free:	PMacFree,
-	irqinit:	PMacIrqInit,
+	.name		= awacs_name,
+	.name2		= "PowerMac Built-in Sound",
+	.open		= PMacOpen,
+	.release	= PMacRelease,
+	.dma_alloc	= PMacAlloc,
+	.dma_free	= PMacFree,
+	.irqinit	= PMacIrqInit,
 #ifdef MODULE
-	irqcleanup:	PMacIrqCleanup,
+	.irqcleanup	= PMacIrqCleanup,
 #endif /* MODULE */
-	init:		PMacInit,
-	silence:	PMacSilence,
-	setFormat:	PMacSetFormat,
-	setVolume:	PMacSetVolume,
-	play:		PMacPlay,
-	record:		NULL,		/* default to no record */
-	mixer_init:	PMacMixerInit,
-	mixer_ioctl:	PMacMixerIoctl,
-	write_sq_setup:	PMacWriteSqSetup,
-	read_sq_setup:	PMacReadSqSetup,
-	state_info:	PMacStateInfo,
-	abort_read:	PMacAbortRead,
-	min_dsp_speed:	7350,
-	max_dsp_speed:	44100,
-	version:	((DMASOUND_AWACS_REVISION<<8) + DMASOUND_AWACS_EDITION)
+	.init		= PMacInit,
+	.silence	= PMacSilence,
+	.setFormat	= PMacSetFormat,
+	.setVolume	= PMacSetVolume,
+	.play		= PMacPlay,
+	.record		= NULL,		/* default to no record */
+	.mixer_init	= PMacMixerInit,
+	.mixer_ioctl	= PMacMixerIoctl,
+	.write_sq_setup	= PMacWriteSqSetup,
+	.read_sq_setup	= PMacReadSqSetup,
+	.state_info	= PMacStateInfo,
+	.abort_read	= PMacAbortRead,
+	.min_dsp_speed	= 7350,
+	.max_dsp_speed	= 44100,
+	.version	= ((DMASOUND_AWACS_REVISION<<8) + DMASOUND_AWACS_EDITION)
 };
 
 
===== sound/oss/dmasound/dmasound_core.c 1.8 vs edited =====
--- 1.8/sound/oss/dmasound/dmasound_core.c	Tue Feb 25 12:44:37 2003
+++ edited/sound/oss/dmasound/dmasound_core.c	Wed Feb 26 18:33:00 2003
@@ -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 =====
--- 1.6/sound/oss/dmasound/dmasound_paula.c	Wed Mar 27 07:07:17 2002
+++ edited/sound/oss/dmasound/dmasound_paula.c	Wed Feb 26 18:33:02 2003
@@ -298,14 +298,14 @@
 
 
 static TRANS transAmiga = {
-	ct_ulaw:	ami_ct_ulaw,
-	ct_alaw:	ami_ct_alaw,
-	ct_s8:		ami_ct_s8,
-	ct_u8:		ami_ct_u8,
-	ct_s16be:	ami_ct_s16be,
-	ct_u16be:	ami_ct_u16be,
-	ct_s16le:	ami_ct_s16le,
-	ct_u16le:	ami_ct_u16le,
+	.ct_ulaw	= ami_ct_ulaw,
+	.ct_alaw	= ami_ct_alaw,
+	.ct_s8		= ami_ct_s8,
+	.ct_u8		= ami_ct_u8,
+	.ct_s16be	= ami_ct_s16be,
+	.ct_u16be	= ami_ct_u16be,
+	.ct_s16le	= ami_ct_s16le,
+	.ct_u16le	= ami_ct_u16le,
 };
 
 /*** Low level stuff *********************************************************/
@@ -681,44 +681,44 @@
 /*** Machine definitions *****************************************************/
 
 static SETTINGS def_hard = {
-	format: AFMT_S8,
-	stereo: 0,
-	size: 8,
-	speed: 8000
+	.format = AFMT_S8,
+	.stereo = 0,
+	.size = 8,
+	.speed = 8000
 } ;
 
 static SETTINGS def_soft = {
-	format: AFMT_U8,
-	stereo: 0,
-	size: 8,
-	speed: 8000
+	.format = AFMT_U8,
+	.stereo = 0,
+	.size = 8,
+	.speed = 8000
 } ;
 
 static MACHINE machAmiga = {
-	name:		"Amiga",
-	name2:		"AMIGA",
-	open:		AmiOpen,
-	release:	AmiRelease,
-	dma_alloc:	AmiAlloc,
-	dma_free:	AmiFree,
-	irqinit:	AmiIrqInit,
+	.name		= "Amiga",
+	.name2		= "AMIGA",
+	.open		= AmiOpen,
+	.release	= AmiRelease,
+	.dma_alloc	= AmiAlloc,
+	.dma_free	= AmiFree,
+	.irqinit	= AmiIrqInit,
 #ifdef MODULE
-	irqcleanup:	AmiIrqCleanUp,
+	.irqcleanup	= AmiIrqCleanUp,
 #endif /* MODULE */
-	init:		AmiInit,
-	silence:	AmiSilence,
-	setFormat:	AmiSetFormat,
-	setVolume:	AmiSetVolume,
-	setTreble:	AmiSetTreble,
-	play:		AmiPlay,
-	mixer_init:	AmiMixerInit,
-	mixer_ioctl:	AmiMixerIoctl,
-	write_sq_setup:	AmiWriteSqSetup,
-	state_info:	AmiStateInfo,
-	min_dsp_speed:	8000,
-	version:	((DMASOUND_PAULA_REVISION<<8) | DMASOUND_PAULA_EDITION),
-	hardware_afmts:	(AFMT_S8 | AFMT_S16_BE), /* h'ware-supported formats *only* here */
-        capabilities:   DSP_CAP_BATCH          /* As per SNDCTL_DSP_GETCAPS */
+	.init		= AmiInit,
+	.silence	= AmiSilence,
+	.setFormat	= AmiSetFormat,
+	.setVolume	= AmiSetVolume,
+	.setTreble	= AmiSetTreble,
+	.play		= AmiPlay,
+	.mixer_init	= AmiMixerInit,
+	.mixer_ioctl	= AmiMixerIoctl,
+	.write_sq_setup	= AmiWriteSqSetup,
+	.state_info	= AmiStateInfo,
+	.min_dsp_speed	= 8000,
+	.version	= ((DMASOUND_PAULA_REVISION<<8) | DMASOUND_PAULA_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_q40.c 1.8 vs edited =====
--- 1.8/sound/oss/dmasound/dmasound_q40.c	Sat Sep 28 20:38:50 2002
+++ edited/sound/oss/dmasound/dmasound_q40.c	Wed Feb 26 18:33:01 2003
@@ -584,39 +584,39 @@
 /*** Machine definitions *****************************************************/
 
 static SETTINGS def_hard = {
-	format: AFMT_U8,
-	stereo: 0,
-	size: 8,
-	speed: 10000
+	.format = AFMT_U8,
+	.stereo = 0,
+	.size = 8,
+	.speed = 10000
 } ;
 
 static SETTINGS def_soft = {
-	format: AFMT_U8,
-	stereo: 0,
-	size: 8,
-	speed: 8000
+	.format = AFMT_U8,
+	.stereo = 0,
+	.size = 8,
+	.speed = 8000
 } ;
 
 static MACHINE machQ40 = {
-	name:		"Q40",
-	name2:		"Q40",
-	open:		Q40Open,
-	release:	Q40Release,
-	dma_alloc:	Q40Alloc,
-	dma_free:	Q40Free,
-	irqinit:	Q40IrqInit,
+	.name		= "Q40",
+	.name2		= "Q40",
+	.open		= Q40Open,
+	.release	= Q40Release,
+	.dma_alloc	= Q40Alloc,
+	.dma_free	= Q40Free,
+	.irqinit	= Q40IrqInit,
 #ifdef MODULE
-	irqcleanup:	Q40IrqCleanUp,
+	.irqcleanup	= Q40IrqCleanUp,
 #endif /* MODULE */
-	init:		Q40Init,
-	silence:	Q40Silence,
-	setFormat:	Q40SetFormat,
-	setVolume:	Q40SetVolume,
-	play:		Q40Play,
- 	min_dsp_speed:	10000,
-	version:	((DMASOUND_Q40_REVISION<<8) | DMASOUND_Q40_EDITION),
-	hardware_afmts:	AFMT_U8, /* h'ware-supported formats *only* here */
-        capabilities:	DSP_CAP_BATCH  /* As per SNDCTL_DSP_GETCAPS */
+	.init		= Q40Init,
+	.silence	= Q40Silence,
+	.setFormat	= Q40SetFormat,
+	.setVolume	= Q40SetVolume,
+	.play		= Q40Play,
+ 	.min_dsp_speed	= 10000,
+	.version	= ((DMASOUND_Q40_REVISION<<8) | DMASOUND_Q40_EDITION),
+	.hardware_afmts	= AFMT_U8, /* h'ware-supported formats *only* here */
+        .capabilities	= DSP_CAP_BATCH  /* As per SNDCTL_DSP_GETCAPS */
 };
 
 
-- 
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] C99 initializers for sound/oss/dmasound
  2003-04-02 15:12 [PATCH] C99 initializers for sound/oss/dmasound Art Haas
@ 2003-04-02 20:12 ` Geert Uytterhoeven
  2003-04-02 20:22   ` [PATCH][FIXED] " Maciej Soltysiak
  0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2003-04-02 20:12 UTC (permalink / raw)
  To: Art Haas; +Cc: Linux Kernel Development, Linux/PPC Development

On Wed, 2 Apr 2003, Art Haas wrote:
> 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 =====
> --- 1.7/sound/oss/dmasound/dmasound_atari.c	Sat Sep 28 20:38:50 2002
> +++ edited/sound/oss/dmasound/dmasound_atari.c	Wed Feb 26 18:33:00 2003

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 -- geert@linux-m68k.org

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH][FIXED] Re: [PATCH] C99 initializers for sound/oss/dmasound
  2003-04-02 20:12 ` Geert Uytterhoeven
@ 2003-04-02 20:22   ` Maciej Soltysiak
  0 siblings, 0 replies; 3+ messages in thread
From: Maciej Soltysiak @ 2003-04-02 20:22 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Art Haas, Linux Kernel Development, Linux/PPC Development

> > ===== sound/oss/dmasound/dmasound_atari.c 1.7 vs edited =====
> > --- 1.7/sound/oss/dmasound/dmasound_atari.c	Sat Sep 28 20:38:50 2002
> > +++ edited/sound/oss/dmasound/dmasound_atari.c	Wed Feb 26 18:33:00 2003
>
> 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?
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

diff -Nru linux-2.5.64.orig/sound/oss/dmasound/dmasound_atari.c linux-2.5.64/sound/oss/dmasound/dmasound_atari.c
--- linux-2.5.64.orig/sound/oss/dmasound/dmasound_atari.c	2003-03-05 04:29:04.000000000 +0100
+++ linux-2.5.64/sound/oss/dmasound/dmasound_atari.c	2003-04-02 20:23:32.000000000 +0200
@@ -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 */
 };


diff -Nru linux-2.5.64.orig/sound/oss/dmasound/dmasound_awacs.c linux-2.5.64/sound/oss/dmasound/dmasound_awacs.c
--- linux-2.5.64.orig/sound/oss/dmasound/dmasound_awacs.c	2003-03-05 04:29:15.000000000 +0100
+++ linux-2.5.64/sound/oss/dmasound/dmasound_awacs.c	2003-04-02 20:15:00.000000000 +0200
@@ -2405,45 +2405,45 @@
 /*** Machine definitions *****************************************************/

 static SETTINGS def_hard = {
-	format: AFMT_S16_BE,
-	stereo: 1,
-	size: 16,
-	speed: 44100
+	.format	= AFMT_S16_BE,
+	.stereo	= 1,
+	.size	= 16,
+	.speed	= 44100
 } ;

 static SETTINGS def_soft = {
-	format: AFMT_S16_BE,
-	stereo: 1,
-	size: 16,
-	speed: 44100
+	.format	= AFMT_S16_BE,
+	.stereo	= 1,
+	.size	= 16,
+	.speed	= 44100
 } ;

 static MACHINE machPMac = {
-	name:		awacs_name,
-	name2:		"PowerMac Built-in Sound",
-	open:		PMacOpen,
-	release:	PMacRelease,
-	dma_alloc:	PMacAlloc,
-	dma_free:	PMacFree,
-	irqinit:	PMacIrqInit,
+	.name		= awacs_name,
+	.name2		= "PowerMac Built-in Sound",
+	.open		= PMacOpen,
+	.release	= PMacRelease,
+	.dma_alloc	= PMacAlloc,
+	.dma_free	= PMacFree,
+	.irqinit	= PMacIrqInit,
 #ifdef MODULE
-	irqcleanup:	PMacIrqCleanup,
+	.irqcleanup	= PMacIrqCleanup,
 #endif /* MODULE */
-	init:		PMacInit,
-	silence:	PMacSilence,
-	setFormat:	PMacSetFormat,
-	setVolume:	PMacSetVolume,
-	play:		PMacPlay,
-	record:		NULL,		/* default to no record */
-	mixer_init:	PMacMixerInit,
-	mixer_ioctl:	PMacMixerIoctl,
-	write_sq_setup:	PMacWriteSqSetup,
-	read_sq_setup:	PMacReadSqSetup,
-	state_info:	PMacStateInfo,
-	abort_read:	PMacAbortRead,
-	min_dsp_speed:	7350,
-	max_dsp_speed:	44100,
-	version:	((DMASOUND_AWACS_REVISION<<8) + DMASOUND_AWACS_EDITION)
+	.init		= PMacInit,
+	.silence	= PMacSilence,
+	.setFormat	= PMacSetFormat,
+	.setVolume	= PMacSetVolume,
+	.play		= PMacPlay,
+	.record		= NULL,		/* default to no record */
+	.mixer_init	= PMacMixerInit,
+	.mixer_ioctl	= PMacMixerIoctl,
+	.write_sq_setup	= PMacWriteSqSetup,
+	.read_sq_setup	= PMacReadSqSetup,
+	.state_info	= PMacStateInfo,
+	.abort_read	= PMacAbortRead,
+	.min_dsp_speed	= 7350,
+	.max_dsp_speed	= 44100,
+	.version	= ((DMASOUND_AWACS_REVISION<<8) + DMASOUND_AWACS_EDITION)
 };


diff -Nru linux-2.5.64.orig/sound/oss/dmasound/dmasound_core.c linux-2.5.64/sound/oss/dmasound/dmasound_core.c
--- linux-2.5.64.orig/sound/oss/dmasound/dmasound_core.c	2003-03-05 04:29:00.000000000 +0100
+++ linux-2.5.64/sound/oss/dmasound/dmasound_core.c	2003-04-02 20:16:09.000000000 +0200
@@ -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)
diff -Nru linux-2.5.64.orig/sound/oss/dmasound/dmasound_paula.c linux-2.5.64/sound/oss/dmasound/dmasound_paula.c
--- linux-2.5.64.orig/sound/oss/dmasound/dmasound_paula.c	2003-03-05 04:28:53.000000000 +0100
+++ linux-2.5.64/sound/oss/dmasound/dmasound_paula.c	2003-04-02 20:17:41.000000000 +0200
@@ -298,14 +298,14 @@


 static TRANS transAmiga = {
-	ct_ulaw:	ami_ct_ulaw,
-	ct_alaw:	ami_ct_alaw,
-	ct_s8:		ami_ct_s8,
-	ct_u8:		ami_ct_u8,
-	ct_s16be:	ami_ct_s16be,
-	ct_u16be:	ami_ct_u16be,
-	ct_s16le:	ami_ct_s16le,
-	ct_u16le:	ami_ct_u16le,
+	.ct_ulaw	= ami_ct_ulaw,
+	.ct_alaw	= ami_ct_alaw,
+	.ct_s8		= ami_ct_s8,
+	.ct_u8		= ami_ct_u8,
+	.ct_s16be	= ami_ct_s16be,
+	.ct_u16be	= ami_ct_u16be,
+	.ct_s16le	= ami_ct_s16le,
+	.ct_u16le	= ami_ct_u16le,
 };

 /*** Low level stuff *********************************************************/
@@ -681,44 +681,44 @@
 /*** Machine definitions *****************************************************/

 static SETTINGS def_hard = {
-	format: AFMT_S8,
-	stereo: 0,
-	size: 8,
-	speed: 8000
+	.format	= AFMT_S8,
+	.stereo	= 0,
+	.size	= 8,
+	.speed	= 8000
 } ;

 static SETTINGS def_soft = {
-	format: AFMT_U8,
-	stereo: 0,
-	size: 8,
-	speed: 8000
+	.format	= AFMT_U8,
+	.stereo	= 0,
+	.size	= 8,
+	.speed	= 8000
 } ;

 static MACHINE machAmiga = {
-	name:		"Amiga",
-	name2:		"AMIGA",
-	open:		AmiOpen,
-	release:	AmiRelease,
-	dma_alloc:	AmiAlloc,
-	dma_free:	AmiFree,
-	irqinit:	AmiIrqInit,
+	.name		= "Amiga",
+	.name2		= "AMIGA",
+	.open		= AmiOpen,
+	.release	= AmiRelease,
+	.dma_alloc	= AmiAlloc,
+	.dma_free	= AmiFree,
+	.irqinit	= AmiIrqInit,
 #ifdef MODULE
-	irqcleanup:	AmiIrqCleanUp,
+	.irqcleanup	= AmiIrqCleanUp,
 #endif /* MODULE */
-	init:		AmiInit,
-	silence:	AmiSilence,
-	setFormat:	AmiSetFormat,
-	setVolume:	AmiSetVolume,
-	setTreble:	AmiSetTreble,
-	play:		AmiPlay,
-	mixer_init:	AmiMixerInit,
-	mixer_ioctl:	AmiMixerIoctl,
-	write_sq_setup:	AmiWriteSqSetup,
-	state_info:	AmiStateInfo,
-	min_dsp_speed:	8000,
-	version:	((DMASOUND_PAULA_REVISION<<8) | DMASOUND_PAULA_EDITION),
-	hardware_afmts:	(AFMT_S8 | AFMT_S16_BE), /* h'ware-supported formats *only* here */
-        capabilities:   DSP_CAP_BATCH          /* As per SNDCTL_DSP_GETCAPS */
+	.init		= AmiInit,
+	.silence	= AmiSilence,
+	.setFormat	= AmiSetFormat,
+	.setVolume	= AmiSetVolume,
+	.setTreble	= AmiSetTreble,
+	.play		= AmiPlay,
+	.mixer_init	= AmiMixerInit,
+	.mixer_ioctl	= AmiMixerIoctl,
+	.write_sq_setup	= AmiWriteSqSetup,
+	.state_info	= AmiStateInfo,
+	.min_dsp_speed	= 8000,
+	.version	= ((DMASOUND_PAULA_REVISION<<8) | DMASOUND_PAULA_EDITION),
+	.hardware_afmts	= (AFMT_S8 | AFMT_S16_BE), /* h'ware-supported formats *only* here */
+	.capabilities	= DSP_CAP_BATCH          /* As per SNDCTL_DSP_GETCAPS */
 };


diff -Nru linux-2.5.64.orig/sound/oss/dmasound/dmasound_q40.c linux-2.5.64/sound/oss/dmasound/dmasound_q40.c
--- linux-2.5.64.orig/sound/oss/dmasound/dmasound_q40.c	2003-03-05 04:28:53.000000000 +0100
+++ linux-2.5.64/sound/oss/dmasound/dmasound_q40.c	2003-04-02 20:23:40.000000000 +0200
@@ -584,39 +584,39 @@
 /*** Machine definitions *****************************************************/

 static SETTINGS def_hard = {
-	format: AFMT_U8,
-	stereo: 0,
-	size: 8,
-	speed: 10000
+	.format	= AFMT_U8,
+	.stereo	= 0,
+	.size	= 8,
+	.speed	= 10000
 } ;

 static SETTINGS def_soft = {
-	format: AFMT_U8,
-	stereo: 0,
-	size: 8,
-	speed: 8000
+	.format	= AFMT_U8,
+	.stereo	= 0,
+	.size	= 8,
+	.speed	= 8000
 } ;

 static MACHINE machQ40 = {
-	name:		"Q40",
-	name2:		"Q40",
-	open:		Q40Open,
-	release:	Q40Release,
-	dma_alloc:	Q40Alloc,
-	dma_free:	Q40Free,
-	irqinit:	Q40IrqInit,
+	.name		= "Q40",
+	.name2		= "Q40",
+	.open		= Q40Open,
+	.release	= Q40Release,
+	.dma_alloc	= Q40Alloc,
+	.dma_free	= Q40Free,
+	.irqinit	= Q40IrqInit,
 #ifdef MODULE
-	irqcleanup:	Q40IrqCleanUp,
+	.irqcleanup	= Q40IrqCleanUp,
 #endif /* MODULE */
-	init:		Q40Init,
-	silence:	Q40Silence,
-	setFormat:	Q40SetFormat,
-	setVolume:	Q40SetVolume,
-	play:		Q40Play,
- 	min_dsp_speed:	10000,
-	version:	((DMASOUND_Q40_REVISION<<8) | DMASOUND_Q40_EDITION),
-	hardware_afmts:	AFMT_U8, /* h'ware-supported formats *only* here */
-        capabilities:	DSP_CAP_BATCH  /* As per SNDCTL_DSP_GETCAPS */
+	.init		= Q40Init,
+	.silence	= Q40Silence,
+	.setFormat	= Q40SetFormat,
+	.setVolume	= Q40SetVolume,
+	.play		= Q40Play,
+ 	.min_dsp_speed	= 10000,
+	.version	= ((DMASOUND_Q40_REVISION<<8) | DMASOUND_Q40_EDITION),
+	.hardware_afmts	= AFMT_U8, /* h'ware-supported formats *only* here */
+	.capabilities	= DSP_CAP_BATCH  /* As per SNDCTL_DSP_GETCAPS */
 };



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-04-02 20:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-02 15:12 [PATCH] C99 initializers for sound/oss/dmasound Art Haas
2003-04-02 20:12 ` Geert Uytterhoeven
2003-04-02 20:22   ` [PATCH][FIXED] " Maciej Soltysiak

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.