aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/ctxfi/cthw20k2.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-06-08 08:57:57 -0400
committerTakashi Iwai <tiwai@suse.de>2009-06-08 08:57:57 -0400
commit514eef9c2a711b4c24b97bb456d39695a6fe1775 (patch)
tree0d98fb13304707682faa56d136249e9177a54932 /sound/pci/ctxfi/cthw20k2.c
parent4836ac655410e7f126d316b0be062b38746f7529 (diff)
ALSA: ctxfi - Remove useless initializations and cast
Remove useless variable initializations and cast at the beginning of functions. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/ctxfi/cthw20k2.c')
-rw-r--r--sound/pci/ctxfi/cthw20k2.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/sound/pci/ctxfi/cthw20k2.c b/sound/pci/ctxfi/cthw20k2.c
index edbfb4827469..7d6dcbaf5244 100644
--- a/sound/pci/ctxfi/cthw20k2.c
+++ b/sound/pci/ctxfi/cthw20k2.c
@@ -168,7 +168,7 @@ static int src_get_rsc_ctrl_blk(void **rblk)
168 168
169static int src_put_rsc_ctrl_blk(void *blk) 169static int src_put_rsc_ctrl_blk(void *blk)
170{ 170{
171 kfree((struct src_rsc_ctrl_blk *)blk); 171 kfree(blk);
172 172
173 return 0; 173 return 0;
174} 174}
@@ -359,7 +359,7 @@ static unsigned int src_param_pitch_mixer(unsigned int src_idx)
359static int src_commit_write(struct hw *hw, unsigned int idx, void *blk) 359static int src_commit_write(struct hw *hw, unsigned int idx, void *blk)
360{ 360{
361 struct src_rsc_ctrl_blk *ctl = blk; 361 struct src_rsc_ctrl_blk *ctl = blk;
362 int i = 0; 362 int i;
363 363
364 if (ctl->dirty.bf.czbfs) { 364 if (ctl->dirty.bf.czbfs) {
365 /* Clear Z-Buffer registers */ 365 /* Clear Z-Buffer registers */
@@ -458,8 +458,8 @@ static int src_mgr_dsb_src(void *blk, unsigned int idx)
458static int src_mgr_commit_write(struct hw *hw, void *blk) 458static int src_mgr_commit_write(struct hw *hw, void *blk)
459{ 459{
460 struct src_mgr_ctrl_blk *ctl = blk; 460 struct src_mgr_ctrl_blk *ctl = blk;
461 int i = 0; 461 int i;
462 unsigned int ret = 0; 462 unsigned int ret;
463 463
464 if (ctl->dirty.bf.enbsa) { 464 if (ctl->dirty.bf.enbsa) {
465 do { 465 do {
@@ -494,7 +494,7 @@ static int src_mgr_get_ctrl_blk(void **rblk)
494 494
495static int src_mgr_put_ctrl_blk(void *blk) 495static int src_mgr_put_ctrl_blk(void *blk)
496{ 496{
497 kfree((struct src_mgr_ctrl_blk *)blk); 497 kfree(blk);
498 498
499 return 0; 499 return 0;
500} 500}
@@ -515,7 +515,7 @@ static int srcimp_mgr_get_ctrl_blk(void **rblk)
515 515
516static int srcimp_mgr_put_ctrl_blk(void *blk) 516static int srcimp_mgr_put_ctrl_blk(void *blk)
517{ 517{
518 kfree((struct srcimp_mgr_ctrl_blk *)blk); 518 kfree(blk);
519 519
520 return 0; 520 return 0;
521} 521}
@@ -704,7 +704,7 @@ static int amixer_rsc_get_ctrl_blk(void **rblk)
704 704
705static int amixer_rsc_put_ctrl_blk(void *blk) 705static int amixer_rsc_put_ctrl_blk(void *blk)
706{ 706{
707 kfree((struct amixer_rsc_ctrl_blk *)blk); 707 kfree(blk);
708 708
709 return 0; 709 return 0;
710} 710}
@@ -893,7 +893,7 @@ static int dai_get_ctrl_blk(void **rblk)
893 893
894static int dai_put_ctrl_blk(void *blk) 894static int dai_put_ctrl_blk(void *blk)
895{ 895{
896 kfree((struct dai_ctrl_blk *)blk); 896 kfree(blk);
897 897
898 return 0; 898 return 0;
899} 899}
@@ -943,7 +943,7 @@ static int dao_get_ctrl_blk(void **rblk)
943 943
944static int dao_put_ctrl_blk(void *blk) 944static int dao_put_ctrl_blk(void *blk)
945{ 945{
946 kfree((struct dao_ctrl_blk *)blk); 946 kfree(blk);
947 947
948 return 0; 948 return 0;
949} 949}
@@ -1051,8 +1051,8 @@ static int daio_mgr_set_imapaddr(void *blk, unsigned int addr)
1051static int daio_mgr_commit_write(struct hw *hw, void *blk) 1051static int daio_mgr_commit_write(struct hw *hw, void *blk)
1052{ 1052{
1053 struct daio_mgr_ctrl_blk *ctl = blk; 1053 struct daio_mgr_ctrl_blk *ctl = blk;
1054 unsigned int data = 0; 1054 unsigned int data;
1055 int i = 0; 1055 int i;
1056 1056
1057 for (i = 0; i < 8; i++) { 1057 for (i = 0; i < 8; i++) {
1058 if ((ctl->dirty.bf.atxctl & (0x1 << i))) { 1058 if ((ctl->dirty.bf.atxctl & (0x1 << i))) {
@@ -1080,7 +1080,7 @@ static int daio_mgr_commit_write(struct hw *hw, void *blk)
1080static int daio_mgr_get_ctrl_blk(struct hw *hw, void **rblk) 1080static int daio_mgr_get_ctrl_blk(struct hw *hw, void **rblk)
1081{ 1081{
1082 struct daio_mgr_ctrl_blk *blk; 1082 struct daio_mgr_ctrl_blk *blk;
1083 int i = 0; 1083 int i;
1084 1084
1085 *rblk = NULL; 1085 *rblk = NULL;
1086 blk = kzalloc(sizeof(*blk), GFP_KERNEL); 1086 blk = kzalloc(sizeof(*blk), GFP_KERNEL);
@@ -1099,7 +1099,7 @@ static int daio_mgr_get_ctrl_blk(struct hw *hw, void **rblk)
1099 1099
1100static int daio_mgr_put_ctrl_blk(void *blk) 1100static int daio_mgr_put_ctrl_blk(void *blk)
1101{ 1101{
1102 kfree((struct daio_mgr_ctrl_blk *)blk); 1102 kfree(blk);
1103 1103
1104 return 0; 1104 return 0;
1105} 1105}
@@ -1125,7 +1125,7 @@ struct trn_conf {
1125 1125
1126static int hw_daio_init(struct hw *hw, const struct daio_conf *info) 1126static int hw_daio_init(struct hw *hw, const struct daio_conf *info)
1127{ 1127{
1128 u32 dwData = 0; 1128 u32 dwData;
1129 int i; 1129 int i;
1130 1130
1131 /* Program I2S with proper sample rate and enable the correct I2S 1131 /* Program I2S with proper sample rate and enable the correct I2S
@@ -1195,9 +1195,9 @@ static int hw_daio_init(struct hw *hw, const struct daio_conf *info)
1195/* TRANSPORT operations */ 1195/* TRANSPORT operations */
1196static int hw_trn_init(struct hw *hw, const struct trn_conf *info) 1196static int hw_trn_init(struct hw *hw, const struct trn_conf *info)
1197{ 1197{
1198 u32 vmctl = 0, data = 0; 1198 u32 vmctl, data;
1199 unsigned long ptp_phys_low = 0, ptp_phys_high = 0; 1199 u32 ptp_phys_low, ptp_phys_high;
1200 int i = 0; 1200 int i;
1201 1201
1202 /* Set up device page table */ 1202 /* Set up device page table */
1203 if ((~0UL) == info->vm_pgt_phys) { 1203 if ((~0UL) == info->vm_pgt_phys) {
@@ -1433,7 +1433,7 @@ static int I2CLockChip(struct hw *hw)
1433 1433
1434static int I2CInit(struct hw *hw, u8 bDeviceID, u8 bAddressSize, u8 bDataSize) 1434static int I2CInit(struct hw *hw, u8 bDeviceID, u8 bAddressSize, u8 bDataSize)
1435{ 1435{
1436 int err = 0; 1436 int err;
1437 unsigned int RegI2CStatus; 1437 unsigned int RegI2CStatus;
1438 unsigned int RegI2CAddress; 1438 unsigned int RegI2CAddress;
1439 1439
@@ -1481,7 +1481,7 @@ static int I2CUninit(struct hw *hw)
1481static int I2CWaitDataReady(struct hw *hw) 1481static int I2CWaitDataReady(struct hw *hw)
1482{ 1482{
1483 int i = 0x400000; 1483 int i = 0x400000;
1484 unsigned int ret = 0; 1484 unsigned int ret;
1485 1485
1486 do { 1486 do {
1487 ret = hw_read_20kx(hw, I2C_IF_STATUS); 1487 ret = hw_read_20kx(hw, I2C_IF_STATUS);
@@ -1541,9 +1541,9 @@ static int I2CWrite(struct hw *hw, u16 wAddress, u32 dwData)
1541 1541
1542static int hw_dac_init(struct hw *hw, const struct dac_conf *info) 1542static int hw_dac_init(struct hw *hw, const struct dac_conf *info)
1543{ 1543{
1544 int err = 0; 1544 int err;
1545 u32 dwData = 0; 1545 u32 dwData;
1546 int i = 0; 1546 int i;
1547 struct REGS_CS4382 cs4382_Read = {0}; 1547 struct REGS_CS4382 cs4382_Read = {0};
1548 struct REGS_CS4382 cs4382_Def = { 1548 struct REGS_CS4382 cs4382_Def = {
1549 0x00000001, /* Mode Control 1 */ 1549 0x00000001, /* Mode Control 1 */
@@ -1696,7 +1696,7 @@ End:
1696 1696
1697static int hw_is_adc_input_selected(struct hw *hw, enum ADCSRC type) 1697static int hw_is_adc_input_selected(struct hw *hw, enum ADCSRC type)
1698{ 1698{
1699 u32 data = 0; 1699 u32 data;
1700 1700
1701 data = hw_read_20kx(hw, GPIO_DATA); 1701 data = hw_read_20kx(hw, GPIO_DATA);
1702 switch (type) { 1702 switch (type) {
@@ -1714,7 +1714,7 @@ static int hw_is_adc_input_selected(struct hw *hw, enum ADCSRC type)
1714 1714
1715static int hw_adc_input_select(struct hw *hw, enum ADCSRC type) 1715static int hw_adc_input_select(struct hw *hw, enum ADCSRC type)
1716{ 1716{
1717 u32 data = 0; 1717 u32 data;
1718 1718
1719 data = hw_read_20kx(hw, GPIO_DATA); 1719 data = hw_read_20kx(hw, GPIO_DATA);
1720 switch (type) { 1720 switch (type) {
@@ -1747,8 +1747,8 @@ static int hw_adc_input_select(struct hw *hw, enum ADCSRC type)
1747 1747
1748static int hw_adc_init(struct hw *hw, const struct adc_conf *info) 1748static int hw_adc_init(struct hw *hw, const struct adc_conf *info)
1749{ 1749{
1750 int err = 0; 1750 int err;
1751 u32 dwMux = 2, dwData = 0, dwCtl = 0; 1751 u32 dwMux = 2, dwData, dwCtl;
1752 1752
1753 /* Set ADC reset bit as output */ 1753 /* Set ADC reset bit as output */
1754 dwData = hw_read_20kx(hw, GPIO_CTRL); 1754 dwData = hw_read_20kx(hw, GPIO_CTRL);