You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
acpi-dma: convert to return error code when asked for channel
Currently acpi_dma_request_slave_chan_by_index() and acpi_dma_request_slave_chan_by_name() return only requested channel or NULL. This patch converts them to return appropriate error code instead of NULL in case of unsuccessfull request. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
This commit is contained in:
committed by
Vinod Koul
parent
8f01258385
commit
0f6a928d03
@@ -16,6 +16,7 @@
|
||||
|
||||
#include <linux/list.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/dmaengine.h>
|
||||
|
||||
/**
|
||||
@@ -103,12 +104,12 @@ static inline void devm_acpi_dma_controller_free(struct device *dev)
|
||||
static inline struct dma_chan *acpi_dma_request_slave_chan_by_index(
|
||||
struct device *dev, size_t index)
|
||||
{
|
||||
return NULL;
|
||||
return ERR_PTR(-ENODEV);
|
||||
}
|
||||
static inline struct dma_chan *acpi_dma_request_slave_chan_by_name(
|
||||
struct device *dev, const char *name)
|
||||
{
|
||||
return NULL;
|
||||
return ERR_PTR(-ENODEV);
|
||||
}
|
||||
|
||||
#define acpi_dma_simple_xlate NULL
|
||||
|
||||
Reference in New Issue
Block a user