--- zzzz-none-000/linux-3.10.107/sound/oss/pss.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/sound/oss/pss.c 2021-02-04 17:41:59.000000000 +0000 @@ -123,25 +123,25 @@ #endif -typedef struct pss_mixerdata { +struct pss_mixerdata { unsigned int volume_l; unsigned int volume_r; unsigned int bass; unsigned int treble; unsigned int synth; -} pss_mixerdata; +}; -typedef struct pss_confdata { +struct pss_confdata { int base; int irq; int dma; int *osp; - pss_mixerdata mixer; + struct pss_mixerdata mixer; int ad_mixer_dev; -} pss_confdata; +}; -static pss_confdata pss_data; -static pss_confdata *devc = &pss_data; +static struct pss_confdata pss_data; +static struct pss_confdata *devc = &pss_data; static DEFINE_SPINLOCK(lock); static int pss_initialized; @@ -150,7 +150,7 @@ static bool pss_enable_joystick; /* Parameter for enabling the joystick */ static coproc_operations pss_coproc_operations; -static void pss_write(pss_confdata *devc, int data) +static void pss_write(struct pss_confdata *devc, int data) { unsigned long i, limit; @@ -206,7 +206,7 @@ return 1; } -static int set_irq(pss_confdata * devc, int dev, int irq) +static int set_irq(struct pss_confdata *devc, int dev, int irq) { static unsigned short irq_bits[16] = { @@ -232,7 +232,7 @@ return 1; } -static void set_io_base(pss_confdata * devc, int dev, int base) +static void set_io_base(struct pss_confdata *devc, int dev, int base) { unsigned short tmp = inw(REG(dev)) & 0x003f; unsigned short bits = (base & 0x0ffc) << 4; @@ -240,7 +240,7 @@ outw(bits | tmp, REG(dev)); } -static int set_dma(pss_confdata * devc, int dev, int dma) +static int set_dma(struct pss_confdata *devc, int dev, int dma) { static unsigned short dma_bits[8] = { @@ -264,7 +264,7 @@ return 1; } -static int pss_reset_dsp(pss_confdata * devc) +static int pss_reset_dsp(struct pss_confdata *devc) { unsigned long i, limit = jiffies + HZ/10; @@ -275,7 +275,7 @@ return 1; } -static int pss_put_dspword(pss_confdata * devc, unsigned short word) +static int pss_put_dspword(struct pss_confdata *devc, unsigned short word) { int i, val; @@ -291,7 +291,7 @@ return 0; } -static int pss_get_dspword(pss_confdata * devc, unsigned short *word) +static int pss_get_dspword(struct pss_confdata *devc, unsigned short *word) { int i, val; @@ -307,7 +307,8 @@ return 0; } -static int pss_download_boot(pss_confdata * devc, unsigned char *block, int size, int flags) +static int pss_download_boot(struct pss_confdata *devc, unsigned char *block, + int size, int flags) { int i, val, count; unsigned long limit; @@ -397,7 +398,7 @@ } /* Mixer */ -static void set_master_volume(pss_confdata *devc, int left, int right) +static void set_master_volume(struct pss_confdata *devc, int left, int right) { static unsigned char log_scale[101] = { 0xdb, 0xe0, 0xe3, 0xe5, 0xe7, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xed, 0xee, @@ -416,7 +417,7 @@ pss_write(devc, log_scale[right] | 0x0100); } -static void set_synth_volume(pss_confdata *devc, int volume) +static void set_synth_volume(struct pss_confdata *devc, int volume) { int vol = ((0x8000*volume)/100L); pss_write(devc, 0x0080); @@ -425,21 +426,21 @@ pss_write(devc, vol); } -static void set_bass(pss_confdata *devc, int level) +static void set_bass(struct pss_confdata *devc, int level) { int vol = (int)(((0xfd - 0xf0) * level)/100L) + 0xf0; pss_write(devc, 0x0010); pss_write(devc, vol | 0x0200); }; -static void set_treble(pss_confdata *devc, int level) +static void set_treble(struct pss_confdata *devc, int level) { int vol = (((0xfd - 0xf0) * level)/100L) + 0xf0; pss_write(devc, 0x0010); pss_write(devc, vol | 0x0300); }; -static void pss_mixer_reset(pss_confdata *devc) +static void pss_mixer_reset(struct pss_confdata *devc) { set_master_volume(devc, 33, 33); set_bass(devc, 50); @@ -499,7 +500,8 @@ return ((right << 8) | left); } -static int call_ad_mixer(pss_confdata *devc,unsigned int cmd, void __user *arg) +static int call_ad_mixer(struct pss_confdata *devc, unsigned int cmd, + void __user *arg) { if (devc->ad_mixer_dev != NO_WSS_MIXER) return mixer_devs[devc->ad_mixer_dev]->ioctl(devc->ad_mixer_dev, cmd, arg); @@ -509,7 +511,7 @@ static int pss_mixer_ioctl (int dev, unsigned int cmd, void __user *arg) { - pss_confdata *devc = mixer_devs[dev]->devc; + struct pss_confdata *devc = mixer_devs[dev]->devc; int cmdf = cmd & 0xff; if ((cmdf != SOUND_MIXER_VOLUME) && (cmdf != SOUND_MIXER_BASS) && @@ -1226,7 +1228,7 @@ { if(!pss_no_sound) { - if(fw_load && pss_synth) + if (fw_load) vfree(pss_synth); if(pssmss) unload_pss_mss(&cfg2);