aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorHimangi Saraogi <himangi774@gmail.com>2014-08-05 09:26:47 -0400
committerTakashi Iwai <tiwai@suse.de>2014-08-05 14:08:00 -0400
commit81cb6b6be54d160ac8feb61f1510f33a3cece1d3 (patch)
treed05e94452b9e4ee84e18c9ccae98f66cdcd45259 /sound
parent8b0276d281c9c9e62669736703c87385436a1265 (diff)
sound/oss/pss: Remove typedefs pss_mixerdata and pss_confdata
The Linux kernel coding style guidelines suggest not using typedefs for structure types. This patch gets rid of the typedefs for pss_mixerdata and pss_confdata. The following Coccinelle semantic patch is used to make the change. @tn@ identifier i; type td; @@ -typedef struct i { ... } -td ; @@ type tn.td; identifier tn.i; @@ -td + struct i Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/oss/pss.c46
1 files changed, 24 insertions, 22 deletions
diff --git a/sound/oss/pss.c b/sound/oss/pss.c
index 145e36b2cfd0..ca0d6e9f49f5 100644
--- a/sound/oss/pss.c
+++ b/sound/oss/pss.c
@@ -123,25 +123,25 @@ static bool pss_mixer;
123#endif 123#endif
124 124
125 125
126typedef struct pss_mixerdata { 126struct pss_mixerdata {
127 unsigned int volume_l; 127 unsigned int volume_l;
128 unsigned int volume_r; 128 unsigned int volume_r;
129 unsigned int bass; 129 unsigned int bass;
130 unsigned int treble; 130 unsigned int treble;
131 unsigned int synth; 131 unsigned int synth;
132} pss_mixerdata; 132};
133 133
134typedef struct pss_confdata { 134struct pss_confdata {
135 int base; 135 int base;
136 int irq; 136 int irq;
137 int dma; 137 int dma;
138 int *osp; 138 int *osp;
139 pss_mixerdata mixer; 139 struct pss_mixerdata mixer;
140 int ad_mixer_dev; 140 int ad_mixer_dev;
141} pss_confdata; 141};
142 142
143static pss_confdata pss_data; 143static struct pss_confdata pss_data;
144static pss_confdata *devc = &pss_data; 144static struct pss_confdata *devc = &pss_data;
145static DEFINE_SPINLOCK(lock); 145static DEFINE_SPINLOCK(lock);
146 146
147static int pss_initialized; 147static int pss_initialized;
@@ -150,7 +150,7 @@ static int pss_cdrom_port = -1; /* Parameter for the PSS cdrom port */
150static bool pss_enable_joystick; /* Parameter for enabling the joystick */ 150static bool pss_enable_joystick; /* Parameter for enabling the joystick */
151static coproc_operations pss_coproc_operations; 151static coproc_operations pss_coproc_operations;
152 152
153static void pss_write(pss_confdata *devc, int data) 153static void pss_write(struct pss_confdata *devc, int data)
154{ 154{
155 unsigned long i, limit; 155 unsigned long i, limit;
156 156
@@ -206,7 +206,7 @@ static int __init probe_pss(struct address_info *hw_config)
206 return 1; 206 return 1;
207} 207}
208 208
209static int set_irq(pss_confdata * devc, int dev, int irq) 209static int set_irq(struct pss_confdata *devc, int dev, int irq)
210{ 210{
211 static unsigned short irq_bits[16] = 211 static unsigned short irq_bits[16] =
212 { 212 {
@@ -232,7 +232,7 @@ static int set_irq(pss_confdata * devc, int dev, int irq)
232 return 1; 232 return 1;
233} 233}
234 234
235static void set_io_base(pss_confdata * devc, int dev, int base) 235static void set_io_base(struct pss_confdata *devc, int dev, int base)
236{ 236{
237 unsigned short tmp = inw(REG(dev)) & 0x003f; 237 unsigned short tmp = inw(REG(dev)) & 0x003f;
238 unsigned short bits = (base & 0x0ffc) << 4; 238 unsigned short bits = (base & 0x0ffc) << 4;
@@ -240,7 +240,7 @@ static void set_io_base(pss_confdata * devc, int dev, int base)
240 outw(bits | tmp, REG(dev)); 240 outw(bits | tmp, REG(dev));
241} 241}
242 242
243static int set_dma(pss_confdata * devc, int dev, int dma) 243static int set_dma(struct pss_confdata *devc, int dev, int dma)
244{ 244{
245 static unsigned short dma_bits[8] = 245 static unsigned short dma_bits[8] =
246 { 246 {
@@ -264,7 +264,7 @@ static int set_dma(pss_confdata * devc, int dev, int dma)
264 return 1; 264 return 1;
265} 265}
266 266
267static int pss_reset_dsp(pss_confdata * devc) 267static int pss_reset_dsp(struct pss_confdata *devc)
268{ 268{
269 unsigned long i, limit = jiffies + HZ/10; 269 unsigned long i, limit = jiffies + HZ/10;
270 270
@@ -275,7 +275,7 @@ static int pss_reset_dsp(pss_confdata * devc)
275 return 1; 275 return 1;
276} 276}
277 277
278static int pss_put_dspword(pss_confdata * devc, unsigned short word) 278static int pss_put_dspword(struct pss_confdata *devc, unsigned short word)
279{ 279{
280 int i, val; 280 int i, val;
281 281
@@ -291,7 +291,7 @@ static int pss_put_dspword(pss_confdata * devc, unsigned short word)
291 return 0; 291 return 0;
292} 292}
293 293
294static int pss_get_dspword(pss_confdata * devc, unsigned short *word) 294static int pss_get_dspword(struct pss_confdata *devc, unsigned short *word)
295{ 295{
296 int i, val; 296 int i, val;
297 297
@@ -307,7 +307,8 @@ static int pss_get_dspword(pss_confdata * devc, unsigned short *word)
307 return 0; 307 return 0;
308} 308}
309 309
310static int pss_download_boot(pss_confdata * devc, unsigned char *block, int size, int flags) 310static int pss_download_boot(struct pss_confdata *devc, unsigned char *block,
311 int size, int flags)
311{ 312{
312 int i, val, count; 313 int i, val, count;
313 unsigned long limit; 314 unsigned long limit;
@@ -397,7 +398,7 @@ static int pss_download_boot(pss_confdata * devc, unsigned char *block, int size
397} 398}
398 399
399/* Mixer */ 400/* Mixer */
400static void set_master_volume(pss_confdata *devc, int left, int right) 401static void set_master_volume(struct pss_confdata *devc, int left, int right)
401{ 402{
402 static unsigned char log_scale[101] = { 403 static unsigned char log_scale[101] = {
403 0xdb, 0xe0, 0xe3, 0xe5, 0xe7, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xed, 0xee, 404 0xdb, 0xe0, 0xe3, 0xe5, 0xe7, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xed, 0xee,
@@ -416,7 +417,7 @@ static void set_master_volume(pss_confdata *devc, int left, int right)
416 pss_write(devc, log_scale[right] | 0x0100); 417 pss_write(devc, log_scale[right] | 0x0100);
417} 418}
418 419
419static void set_synth_volume(pss_confdata *devc, int volume) 420static void set_synth_volume(struct pss_confdata *devc, int volume)
420{ 421{
421 int vol = ((0x8000*volume)/100L); 422 int vol = ((0x8000*volume)/100L);
422 pss_write(devc, 0x0080); 423 pss_write(devc, 0x0080);
@@ -425,21 +426,21 @@ static void set_synth_volume(pss_confdata *devc, int volume)
425 pss_write(devc, vol); 426 pss_write(devc, vol);
426} 427}
427 428
428static void set_bass(pss_confdata *devc, int level) 429static void set_bass(struct pss_confdata *devc, int level)
429{ 430{
430 int vol = (int)(((0xfd - 0xf0) * level)/100L) + 0xf0; 431 int vol = (int)(((0xfd - 0xf0) * level)/100L) + 0xf0;
431 pss_write(devc, 0x0010); 432 pss_write(devc, 0x0010);
432 pss_write(devc, vol | 0x0200); 433 pss_write(devc, vol | 0x0200);
433}; 434};
434 435
435static void set_treble(pss_confdata *devc, int level) 436static void set_treble(struct pss_confdata *devc, int level)
436{ 437{
437 int vol = (((0xfd - 0xf0) * level)/100L) + 0xf0; 438 int vol = (((0xfd - 0xf0) * level)/100L) + 0xf0;
438 pss_write(devc, 0x0010); 439 pss_write(devc, 0x0010);
439 pss_write(devc, vol | 0x0300); 440 pss_write(devc, vol | 0x0300);
440}; 441};
441 442
442static void pss_mixer_reset(pss_confdata *devc) 443static void pss_mixer_reset(struct pss_confdata *devc)
443{ 444{
444 set_master_volume(devc, 33, 33); 445 set_master_volume(devc, 33, 33);
445 set_bass(devc, 50); 446 set_bass(devc, 50);
@@ -499,7 +500,8 @@ static int ret_vol_stereo(int left, int right)
499 return ((right << 8) | left); 500 return ((right << 8) | left);
500} 501}
501 502
502static int call_ad_mixer(pss_confdata *devc,unsigned int cmd, void __user *arg) 503static int call_ad_mixer(struct pss_confdata *devc, unsigned int cmd,
504 void __user *arg)
503{ 505{
504 if (devc->ad_mixer_dev != NO_WSS_MIXER) 506 if (devc->ad_mixer_dev != NO_WSS_MIXER)
505 return mixer_devs[devc->ad_mixer_dev]->ioctl(devc->ad_mixer_dev, cmd, arg); 507 return mixer_devs[devc->ad_mixer_dev]->ioctl(devc->ad_mixer_dev, cmd, arg);
@@ -509,7 +511,7 @@ static int call_ad_mixer(pss_confdata *devc,unsigned int cmd, void __user *arg)
509 511
510static int pss_mixer_ioctl (int dev, unsigned int cmd, void __user *arg) 512static int pss_mixer_ioctl (int dev, unsigned int cmd, void __user *arg)
511{ 513{
512 pss_confdata *devc = mixer_devs[dev]->devc; 514 struct pss_confdata *devc = mixer_devs[dev]->devc;
513 int cmdf = cmd & 0xff; 515 int cmdf = cmd & 0xff;
514 516
515 if ((cmdf != SOUND_MIXER_VOLUME) && (cmdf != SOUND_MIXER_BASS) && 517 if ((cmdf != SOUND_MIXER_VOLUME) && (cmdf != SOUND_MIXER_BASS) &&