diff options
author | Eliot Blennerhassett <eblennerhassett@audioscience.com> | 2010-04-16 15:33:55 +1200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-04-16 11:20:49 +0200 |
commit | c35651f17005bf1090facdd19462f45994bf656e (patch) | |
tree | fc2a84236fcce6c4d6deb00348229edb47f98b46 | |
parent | af508260e01c386664876e20a8ce4d6c06437ba4 (diff) | |
download | alsa-driver-build-unstable-c35651f17005bf1090facdd19462f45994bf656e.tar.gz |
ALSA: asihpi - Fix sParse warnings.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | pci/asihpi/asihpi.c | 8 | ||||
-rw-r--r-- | pci/asihpi/hpi6000.c | 4 | ||||
-rw-r--r-- | pci/asihpi/hpifunc.c | 12 |
3 files changed, 9 insertions, 15 deletions
diff --git a/pci/asihpi/asihpi.c b/pci/asihpi/asihpi.c index 51825c9a4..d4e577595 100644 --- a/pci/asihpi/asihpi.c +++ b/pci/asihpi/asihpi.c @@ -2373,7 +2373,7 @@ static int snd_asihpi_clksrc_get(struct snd_kcontrol *kcontrol, (struct snd_card_asihpi *)(kcontrol->private_data); struct clk_cache *clkcache = &asihpi->cc; u32 h_control = kcontrol->private_value; - u16 source, index = 0; + u16 source, srcindex = 0; int i; ucontrol->value.enumerated.item[0] = 0; @@ -2381,12 +2381,12 @@ static int snd_asihpi_clksrc_get(struct snd_kcontrol *kcontrol, source = 0; if (source == HPI_SAMPLECLOCK_SOURCE_AESEBU_INPUT) - if (hpi_sample_clock_get_source_index(ss, h_control, &index)) - index = 0; + if (hpi_sample_clock_get_source_index(ss, h_control, &srcindex)) + srcindex = 0; for (i = 0; i < clkcache->count; i++) if ((clkcache->s[i].source == source) && - (clkcache->s[i].index == index)) + (clkcache->s[i].index == srcindex)) break; ucontrol->value.enumerated.item[0] = i; diff --git a/pci/asihpi/hpi6000.c b/pci/asihpi/hpi6000.c index 3675eca44..9c5093173 100644 --- a/pci/asihpi/hpi6000.c +++ b/pci/asihpi/hpi6000.c @@ -1655,8 +1655,8 @@ static short hpi6000_wait_dsp_ack(struct hpi_adapter_obj *pao, u16 dsp_index, ack = hpi_read_word(pdo, HPI_HIF_ADDR(dsp_ack)); if (ack == ack_value) break; - if ((ack & HPI_HIF_ERROR_MASK) & - !hpi6000_check_PCI2040_error_flag(pao, H6READ)) + if ((ack & HPI_HIF_ERROR_MASK) + && !hpi6000_check_PCI2040_error_flag(pao, H6READ)) break; /*for (i=0;i<1000;i++) */ /* dwPause=i+1; */ diff --git a/pci/asihpi/hpifunc.c b/pci/asihpi/hpifunc.c index 4e0f76df5..254c580db 100644 --- a/pci/asihpi/hpifunc.c +++ b/pci/asihpi/hpifunc.c @@ -290,13 +290,6 @@ u16 hpi_adapter_close(const struct hpi_hsubsys *ph_subsys, u16 adapter_index) return hr.error; } -u16 hpi_adapter_find_object(const struct hpi_hsubsys *ph_subsys, - u16 adapter_index, u16 object_type, u16 object_index, - u16 *p_dsp_index) -{ - return HPI_ERROR_UNIMPLEMENTED; -} - u16 hpi_adapter_set_mode(const struct hpi_hsubsys *ph_subsys, u16 adapter_index, u32 adapter_mode) { @@ -3277,7 +3270,8 @@ void hpi_entity_free(struct hpi_entity *entity) kfree(entity); } -u16 hpi_entity_alloc_and_copy(struct hpi_entity *src, struct hpi_entity **dst) +static u16 hpi_entity_alloc_and_copy(struct hpi_entity *src, + struct hpi_entity **dst) { size_t buf_size; HPI_DEBUG_ASSERT(dst != NULL); @@ -3407,7 +3401,7 @@ u16 hpi_entity_alloc_and_pack(const enum e_entity_type type, { size_t bytes_to_copy, total_size; u16 hE = 0; - *entity = 0; + *entity = NULL; hE = hpi_entity_check_type(type); if (hE) |