diff options
Diffstat (limited to 'sound/pci/ctxfi/ctdaio.c')
-rw-r--r-- | sound/pci/ctxfi/ctdaio.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/sound/pci/ctxfi/ctdaio.c b/sound/pci/ctxfi/ctdaio.c index a2aea399eba1..befead4eeaab 100644 --- a/sound/pci/ctxfi/ctdaio.c +++ b/sound/pci/ctxfi/ctdaio.c | |||
@@ -168,9 +168,9 @@ static int dao_commit_write(struct dao *dao) | |||
168 | 168 | ||
169 | static int dao_set_left_input(struct dao *dao, struct rsc *input) | 169 | static int dao_set_left_input(struct dao *dao, struct rsc *input) |
170 | { | 170 | { |
171 | struct imapper *entry = NULL; | 171 | struct imapper *entry; |
172 | struct daio *daio = &dao->daio; | 172 | struct daio *daio = &dao->daio; |
173 | int i = 0; | 173 | int i; |
174 | 174 | ||
175 | entry = kzalloc((sizeof(*entry) * daio->rscl.msr), GFP_KERNEL); | 175 | entry = kzalloc((sizeof(*entry) * daio->rscl.msr), GFP_KERNEL); |
176 | if (NULL == entry) | 176 | if (NULL == entry) |
@@ -196,9 +196,9 @@ static int dao_set_left_input(struct dao *dao, struct rsc *input) | |||
196 | 196 | ||
197 | static int dao_set_right_input(struct dao *dao, struct rsc *input) | 197 | static int dao_set_right_input(struct dao *dao, struct rsc *input) |
198 | { | 198 | { |
199 | struct imapper *entry = NULL; | 199 | struct imapper *entry; |
200 | struct daio *daio = &dao->daio; | 200 | struct daio *daio = &dao->daio; |
201 | int i = 0; | 201 | int i; |
202 | 202 | ||
203 | entry = kzalloc((sizeof(*entry) * daio->rscr.msr), GFP_KERNEL); | 203 | entry = kzalloc((sizeof(*entry) * daio->rscr.msr), GFP_KERNEL); |
204 | if (NULL == entry) | 204 | if (NULL == entry) |
@@ -224,9 +224,9 @@ static int dao_set_right_input(struct dao *dao, struct rsc *input) | |||
224 | 224 | ||
225 | static int dao_clear_left_input(struct dao *dao) | 225 | static int dao_clear_left_input(struct dao *dao) |
226 | { | 226 | { |
227 | struct imapper *entry = NULL; | 227 | struct imapper *entry; |
228 | struct daio *daio = &dao->daio; | 228 | struct daio *daio = &dao->daio; |
229 | int i = 0; | 229 | int i; |
230 | 230 | ||
231 | if (NULL == dao->imappers[0]) | 231 | if (NULL == dao->imappers[0]) |
232 | return 0; | 232 | return 0; |
@@ -248,9 +248,9 @@ static int dao_clear_left_input(struct dao *dao) | |||
248 | 248 | ||
249 | static int dao_clear_right_input(struct dao *dao) | 249 | static int dao_clear_right_input(struct dao *dao) |
250 | { | 250 | { |
251 | struct imapper *entry = NULL; | 251 | struct imapper *entry; |
252 | struct daio *daio = &dao->daio; | 252 | struct daio *daio = &dao->daio; |
253 | int i = 0; | 253 | int i; |
254 | 254 | ||
255 | if (NULL == dao->imappers[daio->rscl.msr]) | 255 | if (NULL == dao->imappers[daio->rscl.msr]) |
256 | return 0; | 256 | return 0; |
@@ -299,7 +299,7 @@ static int dai_set_srt_srcr(struct dai *dai, struct rsc *src) | |||
299 | 299 | ||
300 | static int dai_set_srt_msr(struct dai *dai, unsigned int msr) | 300 | static int dai_set_srt_msr(struct dai *dai, unsigned int msr) |
301 | { | 301 | { |
302 | unsigned int rsr = 0; | 302 | unsigned int rsr; |
303 | 303 | ||
304 | for (rsr = 0; msr > 1; msr >>= 1) | 304 | for (rsr = 0; msr > 1; msr >>= 1) |
305 | rsr++; | 305 | rsr++; |
@@ -340,8 +340,8 @@ static int daio_rsc_init(struct daio *daio, | |||
340 | const struct daio_desc *desc, | 340 | const struct daio_desc *desc, |
341 | void *hw) | 341 | void *hw) |
342 | { | 342 | { |
343 | int err = 0; | 343 | int err; |
344 | unsigned int idx_l = 0, idx_r = 0; | 344 | unsigned int idx_l, idx_r; |
345 | 345 | ||
346 | switch (((struct hw *)hw)->get_chip_type(hw)) { | 346 | switch (((struct hw *)hw)->get_chip_type(hw)) { |
347 | case ATC20K1: | 347 | case ATC20K1: |
@@ -400,8 +400,8 @@ static int dao_rsc_init(struct dao *dao, | |||
400 | struct daio_mgr *mgr) | 400 | struct daio_mgr *mgr) |
401 | { | 401 | { |
402 | struct hw *hw = mgr->mgr.hw; | 402 | struct hw *hw = mgr->mgr.hw; |
403 | unsigned int conf = 0; | 403 | unsigned int conf; |
404 | int err = 0; | 404 | int err; |
405 | 405 | ||
406 | err = daio_rsc_init(&dao->daio, desc, mgr->mgr.hw); | 406 | err = daio_rsc_init(&dao->daio, desc, mgr->mgr.hw); |
407 | if (err) | 407 | if (err) |
@@ -423,7 +423,7 @@ static int dao_rsc_init(struct dao *dao, | |||
423 | daio_device_index(dao->daio.type, hw)); | 423 | daio_device_index(dao->daio.type, hw)); |
424 | hw->daio_mgr_commit_write(hw, mgr->mgr.ctrl_blk); | 424 | hw->daio_mgr_commit_write(hw, mgr->mgr.ctrl_blk); |
425 | 425 | ||
426 | conf |= (desc->msr & 0x7) | (desc->passthru << 3); | 426 | conf = (desc->msr & 0x7) | (desc->passthru << 3); |
427 | hw->daio_mgr_dao_init(mgr->mgr.ctrl_blk, | 427 | hw->daio_mgr_dao_init(mgr->mgr.ctrl_blk, |
428 | daio_device_index(dao->daio.type, hw), conf); | 428 | daio_device_index(dao->daio.type, hw), conf); |
429 | hw->daio_mgr_enb_dao(mgr->mgr.ctrl_blk, | 429 | hw->daio_mgr_enb_dao(mgr->mgr.ctrl_blk, |
@@ -475,9 +475,9 @@ static int dai_rsc_init(struct dai *dai, | |||
475 | const struct daio_desc *desc, | 475 | const struct daio_desc *desc, |
476 | struct daio_mgr *mgr) | 476 | struct daio_mgr *mgr) |
477 | { | 477 | { |
478 | int err = 0; | 478 | int err; |
479 | struct hw *hw = mgr->mgr.hw; | 479 | struct hw *hw = mgr->mgr.hw; |
480 | unsigned int rsr = 0, msr = 0; | 480 | unsigned int rsr, msr; |
481 | 481 | ||
482 | err = daio_rsc_init(&dai->daio, desc, mgr->mgr.hw); | 482 | err = daio_rsc_init(&dai->daio, desc, mgr->mgr.hw); |
483 | if (err) | 483 | if (err) |
@@ -536,7 +536,7 @@ static int get_daio_rsc(struct daio_mgr *mgr, | |||
536 | const struct daio_desc *desc, | 536 | const struct daio_desc *desc, |
537 | struct daio **rdaio) | 537 | struct daio **rdaio) |
538 | { | 538 | { |
539 | int err = 0; | 539 | int err; |
540 | struct dai *dai = NULL; | 540 | struct dai *dai = NULL; |
541 | struct dao *dao = NULL; | 541 | struct dao *dao = NULL; |
542 | unsigned long flags; | 542 | unsigned long flags; |
@@ -660,7 +660,7 @@ static int daio_map_op(void *data, struct imapper *entry) | |||
660 | static int daio_imap_add(struct daio_mgr *mgr, struct imapper *entry) | 660 | static int daio_imap_add(struct daio_mgr *mgr, struct imapper *entry) |
661 | { | 661 | { |
662 | unsigned long flags; | 662 | unsigned long flags; |
663 | int err = 0; | 663 | int err; |
664 | 664 | ||
665 | spin_lock_irqsave(&mgr->imap_lock, flags); | 665 | spin_lock_irqsave(&mgr->imap_lock, flags); |
666 | if ((0 == entry->addr) && (mgr->init_imap_added)) { | 666 | if ((0 == entry->addr) && (mgr->init_imap_added)) { |
@@ -677,7 +677,7 @@ static int daio_imap_add(struct daio_mgr *mgr, struct imapper *entry) | |||
677 | static int daio_imap_delete(struct daio_mgr *mgr, struct imapper *entry) | 677 | static int daio_imap_delete(struct daio_mgr *mgr, struct imapper *entry) |
678 | { | 678 | { |
679 | unsigned long flags; | 679 | unsigned long flags; |
680 | int err = 0; | 680 | int err; |
681 | 681 | ||
682 | spin_lock_irqsave(&mgr->imap_lock, flags); | 682 | spin_lock_irqsave(&mgr->imap_lock, flags); |
683 | err = input_mapper_delete(&mgr->imappers, entry, daio_map_op, mgr); | 683 | err = input_mapper_delete(&mgr->imappers, entry, daio_map_op, mgr); |
@@ -701,7 +701,7 @@ static int daio_mgr_commit_write(struct daio_mgr *mgr) | |||
701 | 701 | ||
702 | int daio_mgr_create(void *hw, struct daio_mgr **rdaio_mgr) | 702 | int daio_mgr_create(void *hw, struct daio_mgr **rdaio_mgr) |
703 | { | 703 | { |
704 | int err = 0, i = 0; | 704 | int err, i; |
705 | struct daio_mgr *daio_mgr; | 705 | struct daio_mgr *daio_mgr; |
706 | struct imapper *entry; | 706 | struct imapper *entry; |
707 | 707 | ||