summaryrefslogtreecommitdiff
path: root/sound/pci/ctxfi/cthw20k2.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-06-08 14:57:57 +0200
committerTakashi Iwai <tiwai@suse.de>2009-06-08 14:57:57 +0200
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)
static int src_put_rsc_ctrl_blk(void *blk)
{
- kfree((struct src_rsc_ctrl_blk *)blk);
+ kfree(blk);
return 0;
}
@@ -359,7 +359,7 @@ static unsigned int src_param_pitch_mixer(unsigned int src_idx)
static int src_commit_write(struct hw *hw, unsigned int idx, void *blk)
{
struct src_rsc_ctrl_blk *ctl = blk;
- int i = 0;
+ int i;
if (ctl->dirty.bf.czbfs) {
/* Clear Z-Buffer registers */
@@ -458,8 +458,8 @@ static int src_mgr_dsb_src(void *blk, unsigned int idx)
static int src_mgr_commit_write(struct hw *hw, void *blk)
{
struct src_mgr_ctrl_blk *ctl = blk;
- int i = 0;
- unsigned int ret = 0;
+ int i;
+ unsigned int ret;
if (ctl->dirty.bf.enbsa) {
do {
@@ -494,7 +494,7 @@ static int src_mgr_get_ctrl_blk(void **rblk)
static int src_mgr_put_ctrl_blk(void *blk)
{
- kfree((struct src_mgr_ctrl_blk *)blk);
+ kfree(blk);
return 0;
}
@@ -515,7 +515,7 @@ static int srcimp_mgr_get_ctrl_blk(void **rblk)
static int srcimp_mgr_put_ctrl_blk(void *blk)
{
- kfree((struct srcimp_mgr_ctrl_blk *)blk);
+ kfree(blk);
return 0;
}
@@ -704,7 +704,7 @@ static int amixer_rsc_get_ctrl_blk(void **rblk)
static int amixer_rsc_put_ctrl_blk(void *blk)
{
- kfree((struct amixer_rsc_ctrl_blk *)blk);
+ kfree(blk);
return 0;
}
@@ -893,7 +893,7 @@ static int dai_get_ctrl_blk(void **rblk)
static int dai_put_ctrl_blk(void *blk)
{
- kfree((struct dai_ctrl_blk *)blk);
+ kfree(blk);
return 0;
}
@@ -943,7 +943,7 @@ static int dao_get_ctrl_blk(void **rblk)
static int dao_put_ctrl_blk(void *blk)
{
- kfree((struct dao_ctrl_blk *)blk);
+ kfree(blk);
return 0;
}
@@ -1051,8 +1051,8 @@ static int daio_mgr_set_imapaddr(void *blk, unsigned int addr)
static int daio_mgr_commit_write(struct hw *hw, void *blk)
{
struct daio_mgr_ctrl_blk *ctl = blk;
- unsigned int data = 0;
- int i = 0;
+ unsigned int data;
+ int i;
for (i = 0; i < 8; i++) {
if ((ctl->dirty.bf.atxctl & (0x1 << i))) {
@@ -1080,7 +1080,7 @@ static int daio_mgr_commit_write(struct hw *hw, void *blk)
static int daio_mgr_get_ctrl_blk(struct hw *hw, void **rblk)
{
struct daio_mgr_ctrl_blk *blk;
- int i = 0;
+ int i;
*rblk = NULL;
blk = kzalloc(sizeof(*blk), GFP_KERNEL);
@@ -1099,7 +1099,7 @@ static int daio_mgr_get_ctrl_blk(struct hw *hw, void **rblk)
static int daio_mgr_put_ctrl_blk(void *blk)
{
- kfree((struct daio_mgr_ctrl_blk *)blk);
+ kfree(blk);
return 0;
}
@@ -1125,7 +1125,7 @@ struct trn_conf {
static int hw_daio_init(struct hw *hw, const struct daio_conf *info)
{
- u32 dwData = 0;
+ u32 dwData;
int i;
/* 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)
/* TRANSPORT operations */
static int hw_trn_init(struct hw *hw, const struct trn_conf *info)
{
- u32 vmctl = 0, data = 0;
- unsigned long ptp_phys_low = 0, ptp_phys_high = 0;
- int i = 0;
+ u32 vmctl, data;
+ u32 ptp_phys_low, ptp_phys_high;
+ int i;
/* Set up device page table */
if ((~0UL) == info->vm_pgt_phys) {
@@ -1433,7 +1433,7 @@ static int I2CLockChip(struct hw *hw)
static int I2CInit(struct hw *hw, u8 bDeviceID, u8 bAddressSize, u8 bDataSize)
{
- int err = 0;
+ int err;
unsigned int RegI2CStatus;
unsigned int RegI2CAddress;
@@ -1481,7 +1481,7 @@ static int I2CUninit(struct hw *hw)
static int I2CWaitDataReady(struct hw *hw)
{
int i = 0x400000;
- unsigned int ret = 0;
+ unsigned int ret;
do {
ret = hw_read_20kx(hw, I2C_IF_STATUS);
@@ -1541,9 +1541,9 @@ static int I2CWrite(struct hw *hw, u16 wAddress, u32 dwData)
static int hw_dac_init(struct hw *hw, const struct dac_conf *info)
{
- int err = 0;
- u32 dwData = 0;
- int i = 0;
+ int err;
+ u32 dwData;
+ int i;
struct REGS_CS4382 cs4382_Read = {0};
struct REGS_CS4382 cs4382_Def = {
0x00000001, /* Mode Control 1 */
@@ -1696,7 +1696,7 @@ End:
static int hw_is_adc_input_selected(struct hw *hw, enum ADCSRC type)
{
- u32 data = 0;
+ u32 data;
data = hw_read_20kx(hw, GPIO_DATA);
switch (type) {
@@ -1714,7 +1714,7 @@ static int hw_is_adc_input_selected(struct hw *hw, enum ADCSRC type)
static int hw_adc_input_select(struct hw *hw, enum ADCSRC type)
{
- u32 data = 0;
+ u32 data;
data = hw_read_20kx(hw, GPIO_DATA);
switch (type) {
@@ -1747,8 +1747,8 @@ static int hw_adc_input_select(struct hw *hw, enum ADCSRC type)
static int hw_adc_init(struct hw *hw, const struct adc_conf *info)
{
- int err = 0;
- u32 dwMux = 2, dwData = 0, dwCtl = 0;
+ int err;
+ u32 dwMux = 2, dwData, dwCtl;
/* Set ADC reset bit as output */
dwData = hw_read_20kx(hw, GPIO_CTRL);