diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-06-08 08:57:57 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-06-08 08:57:57 -0400 |
commit | 514eef9c2a711b4c24b97bb456d39695a6fe1775 (patch) | |
tree | 0d98fb13304707682faa56d136249e9177a54932 /sound/pci/ctxfi/ctamixer.c | |
parent | 4836ac655410e7f126d316b0be062b38746f7529 (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/ctamixer.c')
-rw-r--r-- | sound/pci/ctxfi/ctamixer.c | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/sound/pci/ctxfi/ctamixer.c b/sound/pci/ctxfi/ctamixer.c index 859e996ad728..a1db51b3ead8 100644 --- a/sound/pci/ctxfi/ctamixer.c +++ b/sound/pci/ctxfi/ctamixer.c | |||
@@ -58,9 +58,9 @@ static struct rsc_ops amixer_basic_rsc_ops = { | |||
58 | 58 | ||
59 | static int amixer_set_input(struct amixer *amixer, struct rsc *rsc) | 59 | static int amixer_set_input(struct amixer *amixer, struct rsc *rsc) |
60 | { | 60 | { |
61 | struct hw *hw = NULL; | 61 | struct hw *hw; |
62 | 62 | ||
63 | hw = (struct hw *)amixer->rsc.hw; | 63 | hw = amixer->rsc.hw; |
64 | hw->amixer_set_mode(amixer->rsc.ctrl_blk, AMIXER_Y_IMMEDIATE); | 64 | hw->amixer_set_mode(amixer->rsc.ctrl_blk, AMIXER_Y_IMMEDIATE); |
65 | amixer->input = rsc; | 65 | amixer->input = rsc; |
66 | if (NULL == rsc) | 66 | if (NULL == rsc) |
@@ -75,9 +75,9 @@ static int amixer_set_input(struct amixer *amixer, struct rsc *rsc) | |||
75 | /* y is a 14-bit immediate constant */ | 75 | /* y is a 14-bit immediate constant */ |
76 | static int amixer_set_y(struct amixer *amixer, unsigned int y) | 76 | static int amixer_set_y(struct amixer *amixer, unsigned int y) |
77 | { | 77 | { |
78 | struct hw *hw = NULL; | 78 | struct hw *hw; |
79 | 79 | ||
80 | hw = (struct hw *)amixer->rsc.hw; | 80 | hw = amixer->rsc.hw; |
81 | hw->amixer_set_y(amixer->rsc.ctrl_blk, y); | 81 | hw->amixer_set_y(amixer->rsc.ctrl_blk, y); |
82 | 82 | ||
83 | return 0; | 83 | return 0; |
@@ -85,9 +85,9 @@ static int amixer_set_y(struct amixer *amixer, unsigned int y) | |||
85 | 85 | ||
86 | static int amixer_set_invalid_squash(struct amixer *amixer, unsigned int iv) | 86 | static int amixer_set_invalid_squash(struct amixer *amixer, unsigned int iv) |
87 | { | 87 | { |
88 | struct hw *hw = NULL; | 88 | struct hw *hw; |
89 | 89 | ||
90 | hw = (struct hw *)amixer->rsc.hw; | 90 | hw = amixer->rsc.hw; |
91 | hw->amixer_set_iv(amixer->rsc.ctrl_blk, iv); | 91 | hw->amixer_set_iv(amixer->rsc.ctrl_blk, iv); |
92 | 92 | ||
93 | return 0; | 93 | return 0; |
@@ -95,9 +95,9 @@ static int amixer_set_invalid_squash(struct amixer *amixer, unsigned int iv) | |||
95 | 95 | ||
96 | static int amixer_set_sum(struct amixer *amixer, struct sum *sum) | 96 | static int amixer_set_sum(struct amixer *amixer, struct sum *sum) |
97 | { | 97 | { |
98 | struct hw *hw = NULL; | 98 | struct hw *hw; |
99 | 99 | ||
100 | hw = (struct hw *)amixer->rsc.hw; | 100 | hw = amixer->rsc.hw; |
101 | amixer->sum = sum; | 101 | amixer->sum = sum; |
102 | if (NULL == sum) { | 102 | if (NULL == sum) { |
103 | hw->amixer_set_se(amixer->rsc.ctrl_blk, 0); | 103 | hw->amixer_set_se(amixer->rsc.ctrl_blk, 0); |
@@ -112,13 +112,13 @@ static int amixer_set_sum(struct amixer *amixer, struct sum *sum) | |||
112 | 112 | ||
113 | static int amixer_commit_write(struct amixer *amixer) | 113 | static int amixer_commit_write(struct amixer *amixer) |
114 | { | 114 | { |
115 | struct hw *hw = NULL; | 115 | struct hw *hw; |
116 | unsigned int index = 0; | 116 | unsigned int index; |
117 | int i = 0; | 117 | int i; |
118 | struct rsc *input = NULL; | 118 | struct rsc *input; |
119 | struct sum *sum = NULL; | 119 | struct sum *sum; |
120 | 120 | ||
121 | hw = (struct hw *)amixer->rsc.hw; | 121 | hw = amixer->rsc.hw; |
122 | input = amixer->input; | 122 | input = amixer->input; |
123 | sum = amixer->sum; | 123 | sum = amixer->sum; |
124 | 124 | ||
@@ -158,10 +158,10 @@ static int amixer_commit_write(struct amixer *amixer) | |||
158 | 158 | ||
159 | static int amixer_commit_raw_write(struct amixer *amixer) | 159 | static int amixer_commit_raw_write(struct amixer *amixer) |
160 | { | 160 | { |
161 | struct hw *hw = NULL; | 161 | struct hw *hw; |
162 | unsigned int index = 0; | 162 | unsigned int index; |
163 | 163 | ||
164 | hw = (struct hw *)amixer->rsc.hw; | 164 | hw = amixer->rsc.hw; |
165 | index = amixer->rsc.ops->output_slot(&amixer->rsc); | 165 | index = amixer->rsc.ops->output_slot(&amixer->rsc); |
166 | hw->amixer_commit_write(hw, index, amixer->rsc.ctrl_blk); | 166 | hw->amixer_commit_write(hw, index, amixer->rsc.ctrl_blk); |
167 | 167 | ||
@@ -170,9 +170,9 @@ static int amixer_commit_raw_write(struct amixer *amixer) | |||
170 | 170 | ||
171 | static int amixer_get_y(struct amixer *amixer) | 171 | static int amixer_get_y(struct amixer *amixer) |
172 | { | 172 | { |
173 | struct hw *hw = NULL; | 173 | struct hw *hw; |
174 | 174 | ||
175 | hw = (struct hw *)amixer->rsc.hw; | 175 | hw = amixer->rsc.hw; |
176 | return hw->amixer_get_y(amixer->rsc.ctrl_blk); | 176 | return hw->amixer_get_y(amixer->rsc.ctrl_blk); |
177 | } | 177 | } |
178 | 178 | ||
@@ -201,7 +201,7 @@ static int amixer_rsc_init(struct amixer *amixer, | |||
201 | const struct amixer_desc *desc, | 201 | const struct amixer_desc *desc, |
202 | struct amixer_mgr *mgr) | 202 | struct amixer_mgr *mgr) |
203 | { | 203 | { |
204 | int err = 0; | 204 | int err; |
205 | 205 | ||
206 | err = rsc_init(&amixer->rsc, amixer->idx[0], | 206 | err = rsc_init(&amixer->rsc, amixer->idx[0], |
207 | AMIXER, desc->msr, mgr->mgr.hw); | 207 | AMIXER, desc->msr, mgr->mgr.hw); |
@@ -233,9 +233,9 @@ static int get_amixer_rsc(struct amixer_mgr *mgr, | |||
233 | const struct amixer_desc *desc, | 233 | const struct amixer_desc *desc, |
234 | struct amixer **ramixer) | 234 | struct amixer **ramixer) |
235 | { | 235 | { |
236 | int err = 0, i = 0; | 236 | int err, i; |
237 | unsigned int idx = 0; | 237 | unsigned int idx; |
238 | struct amixer *amixer = NULL; | 238 | struct amixer *amixer; |
239 | unsigned long flags; | 239 | unsigned long flags; |
240 | 240 | ||
241 | *ramixer = NULL; | 241 | *ramixer = NULL; |
@@ -284,7 +284,7 @@ error: | |||
284 | static int put_amixer_rsc(struct amixer_mgr *mgr, struct amixer *amixer) | 284 | static int put_amixer_rsc(struct amixer_mgr *mgr, struct amixer *amixer) |
285 | { | 285 | { |
286 | unsigned long flags; | 286 | unsigned long flags; |
287 | int i = 0; | 287 | int i; |
288 | 288 | ||
289 | spin_lock_irqsave(&mgr->mgr_lock, flags); | 289 | spin_lock_irqsave(&mgr->mgr_lock, flags); |
290 | for (i = 0; i < amixer->rsc.msr; i++) | 290 | for (i = 0; i < amixer->rsc.msr; i++) |
@@ -299,7 +299,7 @@ static int put_amixer_rsc(struct amixer_mgr *mgr, struct amixer *amixer) | |||
299 | 299 | ||
300 | int amixer_mgr_create(void *hw, struct amixer_mgr **ramixer_mgr) | 300 | int amixer_mgr_create(void *hw, struct amixer_mgr **ramixer_mgr) |
301 | { | 301 | { |
302 | int err = 0; | 302 | int err; |
303 | struct amixer_mgr *amixer_mgr; | 303 | struct amixer_mgr *amixer_mgr; |
304 | 304 | ||
305 | *ramixer_mgr = NULL; | 305 | *ramixer_mgr = NULL; |
@@ -367,7 +367,7 @@ static int sum_rsc_init(struct sum *sum, | |||
367 | const struct sum_desc *desc, | 367 | const struct sum_desc *desc, |
368 | struct sum_mgr *mgr) | 368 | struct sum_mgr *mgr) |
369 | { | 369 | { |
370 | int err = 0; | 370 | int err; |
371 | 371 | ||
372 | err = rsc_init(&sum->rsc, sum->idx[0], SUM, desc->msr, mgr->mgr.hw); | 372 | err = rsc_init(&sum->rsc, sum->idx[0], SUM, desc->msr, mgr->mgr.hw); |
373 | if (err) | 373 | if (err) |
@@ -388,9 +388,9 @@ static int get_sum_rsc(struct sum_mgr *mgr, | |||
388 | const struct sum_desc *desc, | 388 | const struct sum_desc *desc, |
389 | struct sum **rsum) | 389 | struct sum **rsum) |
390 | { | 390 | { |
391 | int err = 0, i = 0; | 391 | int err, i; |
392 | unsigned int idx = 0; | 392 | unsigned int idx; |
393 | struct sum *sum = NULL; | 393 | struct sum *sum; |
394 | unsigned long flags; | 394 | unsigned long flags; |
395 | 395 | ||
396 | *rsum = NULL; | 396 | *rsum = NULL; |
@@ -438,7 +438,7 @@ error: | |||
438 | static int put_sum_rsc(struct sum_mgr *mgr, struct sum *sum) | 438 | static int put_sum_rsc(struct sum_mgr *mgr, struct sum *sum) |
439 | { | 439 | { |
440 | unsigned long flags; | 440 | unsigned long flags; |
441 | int i = 0; | 441 | int i; |
442 | 442 | ||
443 | spin_lock_irqsave(&mgr->mgr_lock, flags); | 443 | spin_lock_irqsave(&mgr->mgr_lock, flags); |
444 | for (i = 0; i < sum->rsc.msr; i++) | 444 | for (i = 0; i < sum->rsc.msr; i++) |
@@ -453,7 +453,7 @@ static int put_sum_rsc(struct sum_mgr *mgr, struct sum *sum) | |||
453 | 453 | ||
454 | int sum_mgr_create(void *hw, struct sum_mgr **rsum_mgr) | 454 | int sum_mgr_create(void *hw, struct sum_mgr **rsum_mgr) |
455 | { | 455 | { |
456 | int err = 0; | 456 | int err; |
457 | struct sum_mgr *sum_mgr; | 457 | struct sum_mgr *sum_mgr; |
458 | 458 | ||
459 | *rsum_mgr = NULL; | 459 | *rsum_mgr = NULL; |