diff options
author | Eliot Blennerhassett <eblennerhassett@audioscience.com> | 2012-03-30 09:52:25 +1300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-03-30 16:24:48 +0200 |
commit | 92fd918c2416404c2ec09829b25243b9a785dc9b (patch) | |
tree | c474a04f3be33825f4c6162bce2010d53efc8ff0 /sound/pci/asihpi/hpios.c | |
parent | c578ae0026da81a589245ee08e0fd1b1d8a55f4e (diff) | |
download | linux-stable-92fd918c2416404c2ec09829b25243b9a785dc9b.tar.gz linux-stable-92fd918c2416404c2ec09829b25243b9a785dc9b.tar.bz2 linux-stable-92fd918c2416404c2ec09829b25243b9a785dc9b.zip |
ALSA: asihpi - fix return value of hpios_locked_mem_alloc()
Make this function consistent with others in this module by
returning 1 for error, instead of -ENOMEM
(reverts function signature change from a938fb1e)
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/asihpi/hpios.c')
-rw-r--r-- | sound/pci/asihpi/hpios.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/pci/asihpi/hpios.c b/sound/pci/asihpi/hpios.c index 87f4385fe8c7..5ef4fe964366 100644 --- a/sound/pci/asihpi/hpios.c +++ b/sound/pci/asihpi/hpios.c @@ -1,7 +1,7 @@ /****************************************************************************** AudioScience HPI driver - Copyright (C) 1997-2011 AudioScience Inc. <support@audioscience.com> + Copyright (C) 1997-2012 AudioScience Inc. <support@audioscience.com> This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as @@ -39,11 +39,11 @@ void hpios_delay_micro_seconds(u32 num_micro_sec) } -/** Allocated an area of locked memory for bus master DMA operations. +/** Allocate an area of locked memory for bus master DMA operations. -On error, return -ENOMEM, and *pMemArea.size = 0 +If allocation fails, return 1, and *pMemArea.size = 0 */ -int hpios_locked_mem_alloc(struct consistent_dma_area *p_mem_area, u32 size, +u16 hpios_locked_mem_alloc(struct consistent_dma_area *p_mem_area, u32 size, struct pci_dev *pdev) { /*?? any benefit in using managed dmam_alloc_coherent? */ @@ -62,7 +62,7 @@ int hpios_locked_mem_alloc(struct consistent_dma_area *p_mem_area, u32 size, HPI_DEBUG_LOG(WARNING, "failed to allocate %d bytes locked memory\n", size); p_mem_area->size = 0; - return -ENOMEM; + return 1; } } |