aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/acpi-dma.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2013-12-02 08:16:28 -0500
committerVinod Koul <vinod.koul@intel.com>2014-01-26 07:03:57 -0500
commit39d1447811fef1262ba956aac719c90a0f7b257f (patch)
treedffea87752f7e79ef997de0306b73b6a5f10cc8c /drivers/dma/acpi-dma.c
parentaf58652a3e6746c8ad498984c61c12a1941c9175 (diff)
acpi-dma: align documentation with kernel-doc format
It mostly fixes the "RETURN" sections in the resulting manual page. There is no functional change. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/acpi-dma.c')
-rw-r--r--drivers/dma/acpi-dma.c36
1 files changed, 24 insertions, 12 deletions
diff --git a/drivers/dma/acpi-dma.c b/drivers/dma/acpi-dma.c
index e69b03c0fa50..1e506afa33f5 100644
--- a/drivers/dma/acpi-dma.c
+++ b/drivers/dma/acpi-dma.c
@@ -30,11 +30,12 @@ static DEFINE_MUTEX(acpi_dma_lock);
30 * @adev: ACPI device to match with 30 * @adev: ACPI device to match with
31 * @adma: struct acpi_dma of the given DMA controller 31 * @adma: struct acpi_dma of the given DMA controller
32 * 32 *
33 * Returns 1 on success, 0 when no information is available, or appropriate
34 * errno value on error.
35 *
36 * In order to match a device from DSDT table to the corresponding CSRT device 33 * In order to match a device from DSDT table to the corresponding CSRT device
37 * we use MMIO address and IRQ. 34 * we use MMIO address and IRQ.
35 *
36 * Return:
37 * 1 on success, 0 when no information is available, or appropriate errno value
38 * on error.
38 */ 39 */
39static int acpi_dma_parse_resource_group(const struct acpi_csrt_group *grp, 40static int acpi_dma_parse_resource_group(const struct acpi_csrt_group *grp,
40 struct acpi_device *adev, struct acpi_dma *adma) 41 struct acpi_device *adev, struct acpi_dma *adma)
@@ -101,7 +102,6 @@ static int acpi_dma_parse_resource_group(const struct acpi_csrt_group *grp,
101 * 102 *
102 * We are using this table to get the request line range of the specific DMA 103 * We are using this table to get the request line range of the specific DMA
103 * controller to be used later. 104 * controller to be used later.
104 *
105 */ 105 */
106static void acpi_dma_parse_csrt(struct acpi_device *adev, struct acpi_dma *adma) 106static void acpi_dma_parse_csrt(struct acpi_device *adev, struct acpi_dma *adma)
107{ 107{
@@ -141,10 +141,11 @@ static void acpi_dma_parse_csrt(struct acpi_device *adev, struct acpi_dma *adma)
141 * @data pointer to controller specific data to be used by 141 * @data pointer to controller specific data to be used by
142 * translation function 142 * translation function
143 * 143 *
144 * Returns 0 on success or appropriate errno value on error.
145 *
146 * Allocated memory should be freed with appropriate acpi_dma_controller_free() 144 * Allocated memory should be freed with appropriate acpi_dma_controller_free()
147 * call. 145 * call.
146 *
147 * Return:
148 * 0 on success or appropriate errno value on error.
148 */ 149 */
149int acpi_dma_controller_register(struct device *dev, 150int acpi_dma_controller_register(struct device *dev,
150 struct dma_chan *(*acpi_dma_xlate) 151 struct dma_chan *(*acpi_dma_xlate)
@@ -188,6 +189,9 @@ EXPORT_SYMBOL_GPL(acpi_dma_controller_register);
188 * @dev: struct device of DMA controller 189 * @dev: struct device of DMA controller
189 * 190 *
190 * Memory allocated by acpi_dma_controller_register() is freed here. 191 * Memory allocated by acpi_dma_controller_register() is freed here.
192 *
193 * Return:
194 * 0 on success or appropriate errno value on error.
191 */ 195 */
192int acpi_dma_controller_free(struct device *dev) 196int acpi_dma_controller_free(struct device *dev)
193{ 197{
@@ -225,6 +229,9 @@ static void devm_acpi_dma_release(struct device *dev, void *res)
225 * Managed acpi_dma_controller_register(). DMA controller registered by this 229 * Managed acpi_dma_controller_register(). DMA controller registered by this
226 * function are automatically freed on driver detach. See 230 * function are automatically freed on driver detach. See
227 * acpi_dma_controller_register() for more information. 231 * acpi_dma_controller_register() for more information.
232 *
233 * Return:
234 * 0 on success or appropriate errno value on error.
228 */ 235 */
229int devm_acpi_dma_controller_register(struct device *dev, 236int devm_acpi_dma_controller_register(struct device *dev,
230 struct dma_chan *(*acpi_dma_xlate) 237 struct dma_chan *(*acpi_dma_xlate)
@@ -267,8 +274,6 @@ EXPORT_SYMBOL_GPL(devm_acpi_dma_controller_free);
267 * @adma: struct acpi_dma of DMA controller 274 * @adma: struct acpi_dma of DMA controller
268 * @dma_spec: dma specifier to update 275 * @dma_spec: dma specifier to update
269 * 276 *
270 * Returns 0, if no information is avaiable, -1 on mismatch, and 1 otherwise.
271 *
272 * Accordingly to ACPI 5.0 Specification Table 6-170 "Fixed DMA Resource 277 * Accordingly to ACPI 5.0 Specification Table 6-170 "Fixed DMA Resource
273 * Descriptor": 278 * Descriptor":
274 * DMA Request Line bits is a platform-relative number uniquely 279 * DMA Request Line bits is a platform-relative number uniquely
@@ -276,6 +281,9 @@ EXPORT_SYMBOL_GPL(devm_acpi_dma_controller_free);
276 * mapping is done in a controller-specific OS driver. 281 * mapping is done in a controller-specific OS driver.
277 * That's why we can safely adjust slave_id when the appropriate controller is 282 * That's why we can safely adjust slave_id when the appropriate controller is
278 * found. 283 * found.
284 *
285 * Return:
286 * 0, if no information is avaiable, -1 on mismatch, and 1 otherwise.
279 */ 287 */
280static int acpi_dma_update_dma_spec(struct acpi_dma *adma, 288static int acpi_dma_update_dma_spec(struct acpi_dma *adma,
281 struct acpi_dma_spec *dma_spec) 289 struct acpi_dma_spec *dma_spec)
@@ -334,7 +342,8 @@ static int acpi_dma_parse_fixed_dma(struct acpi_resource *res, void *data)
334 * @dev: struct device to get DMA request from 342 * @dev: struct device to get DMA request from
335 * @index: index of FixedDMA descriptor for @dev 343 * @index: index of FixedDMA descriptor for @dev
336 * 344 *
337 * Returns pointer to appropriate dma channel on success or NULL on error. 345 * Return:
346 * Pointer to appropriate dma channel on success or NULL on error.
338 */ 347 */
339struct dma_chan *acpi_dma_request_slave_chan_by_index(struct device *dev, 348struct dma_chan *acpi_dma_request_slave_chan_by_index(struct device *dev,
340 size_t index) 349 size_t index)
@@ -403,7 +412,8 @@ EXPORT_SYMBOL_GPL(acpi_dma_request_slave_chan_by_index);
403 * translate the names "tx" and "rx" here based on the most common case where 412 * translate the names "tx" and "rx" here based on the most common case where
404 * the first FixedDMA descriptor is TX and second is RX. 413 * the first FixedDMA descriptor is TX and second is RX.
405 * 414 *
406 * Returns pointer to appropriate dma channel on success or NULL on error. 415 * Return:
416 * Pointer to appropriate dma channel on success or NULL on error.
407 */ 417 */
408struct dma_chan *acpi_dma_request_slave_chan_by_name(struct device *dev, 418struct dma_chan *acpi_dma_request_slave_chan_by_name(struct device *dev,
409 const char *name) 419 const char *name)
@@ -427,8 +437,10 @@ EXPORT_SYMBOL_GPL(acpi_dma_request_slave_chan_by_name);
427 * @adma: pointer to ACPI DMA controller data 437 * @adma: pointer to ACPI DMA controller data
428 * 438 *
429 * A simple translation function for ACPI based devices. Passes &struct 439 * A simple translation function for ACPI based devices. Passes &struct
430 * dma_spec to the DMA controller driver provided filter function. Returns 440 * dma_spec to the DMA controller driver provided filter function.
431 * pointer to the channel if found or %NULL otherwise. 441 *
442 * Return:
443 * Pointer to the channel if found or %NULL otherwise.
432 */ 444 */
433struct dma_chan *acpi_dma_simple_xlate(struct acpi_dma_spec *dma_spec, 445struct dma_chan *acpi_dma_simple_xlate(struct acpi_dma_spec *dma_spec,
434 struct acpi_dma *adma) 446 struct acpi_dma *adma)