diff options
author | Markus Pargmann <mpa@pengutronix.de> | 2013-02-24 10:36:09 -0500 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2013-04-15 00:22:03 -0400 |
commit | bef29ec508e58bf8b9ec0915de5b0739fb800c91 (patch) | |
tree | cd51452c8e8f1dcd1070daf0cf13f6cfa1e95b1f | |
parent | 41ef2d5678d83af030125550329b6ae8b74618fa (diff) |
DMA: of: Constant names
No DMA of-function alters the name, so this patch changes the name arguments
to be constant. Most drivers will probably request DMA channels using a
constant name.
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r-- | drivers/dma/dmaengine.c | 2 | ||||
-rw-r--r-- | drivers/dma/of-dma.c | 6 | ||||
-rw-r--r-- | include/linux/dmaengine.h | 4 | ||||
-rw-r--r-- | include/linux/of_dma.h | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c index b2728d6ba2fd..2cbfefea93ee 100644 --- a/drivers/dma/dmaengine.c +++ b/drivers/dma/dmaengine.c | |||
@@ -555,7 +555,7 @@ EXPORT_SYMBOL_GPL(__dma_request_channel); | |||
555 | * @dev: pointer to client device structure | 555 | * @dev: pointer to client device structure |
556 | * @name: slave channel name | 556 | * @name: slave channel name |
557 | */ | 557 | */ |
558 | struct dma_chan *dma_request_slave_channel(struct device *dev, char *name) | 558 | struct dma_chan *dma_request_slave_channel(struct device *dev, const char *name) |
559 | { | 559 | { |
560 | /* If device-tree is present get slave info from here */ | 560 | /* If device-tree is present get slave info from here */ |
561 | if (dev->of_node) | 561 | if (dev->of_node) |
diff --git a/drivers/dma/of-dma.c b/drivers/dma/of-dma.c index 69d04d28b1ef..6036cd08e222 100644 --- a/drivers/dma/of-dma.c +++ b/drivers/dma/of-dma.c | |||
@@ -172,8 +172,8 @@ EXPORT_SYMBOL_GPL(of_dma_controller_free); | |||
172 | * specifiers, matches the name provided. Returns 0 if the name matches and | 172 | * specifiers, matches the name provided. Returns 0 if the name matches and |
173 | * a valid pointer to the DMA specifier is found. Otherwise returns -ENODEV. | 173 | * a valid pointer to the DMA specifier is found. Otherwise returns -ENODEV. |
174 | */ | 174 | */ |
175 | static int of_dma_match_channel(struct device_node *np, char *name, int index, | 175 | static int of_dma_match_channel(struct device_node *np, const char *name, |
176 | struct of_phandle_args *dma_spec) | 176 | int index, struct of_phandle_args *dma_spec) |
177 | { | 177 | { |
178 | const char *s; | 178 | const char *s; |
179 | 179 | ||
@@ -198,7 +198,7 @@ static int of_dma_match_channel(struct device_node *np, char *name, int index, | |||
198 | * Returns pointer to appropriate dma channel on success or NULL on error. | 198 | * Returns pointer to appropriate dma channel on success or NULL on error. |
199 | */ | 199 | */ |
200 | struct dma_chan *of_dma_request_slave_channel(struct device_node *np, | 200 | struct dma_chan *of_dma_request_slave_channel(struct device_node *np, |
201 | char *name) | 201 | const char *name) |
202 | { | 202 | { |
203 | struct of_phandle_args dma_spec; | 203 | struct of_phandle_args dma_spec; |
204 | struct of_dma *ofdma; | 204 | struct of_dma *ofdma; |
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 91ac8da25020..274071ca6f04 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
@@ -968,7 +968,7 @@ enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie); | |||
968 | enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx); | 968 | enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx); |
969 | void dma_issue_pending_all(void); | 969 | void dma_issue_pending_all(void); |
970 | struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, dma_filter_fn fn, void *fn_param); | 970 | struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, dma_filter_fn fn, void *fn_param); |
971 | struct dma_chan *dma_request_slave_channel(struct device *dev, char *name); | 971 | struct dma_chan *dma_request_slave_channel(struct device *dev, const char *name); |
972 | void dma_release_channel(struct dma_chan *chan); | 972 | void dma_release_channel(struct dma_chan *chan); |
973 | #else | 973 | #else |
974 | static inline enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx) | 974 | static inline enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx) |
@@ -984,7 +984,7 @@ static inline struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, | |||
984 | return NULL; | 984 | return NULL; |
985 | } | 985 | } |
986 | static inline struct dma_chan *dma_request_slave_channel(struct device *dev, | 986 | static inline struct dma_chan *dma_request_slave_channel(struct device *dev, |
987 | char *name) | 987 | const char *name) |
988 | { | 988 | { |
989 | return NULL; | 989 | return NULL; |
990 | } | 990 | } |
diff --git a/include/linux/of_dma.h b/include/linux/of_dma.h index d15073e080dd..ce6a8ab3d2bb 100644 --- a/include/linux/of_dma.h +++ b/include/linux/of_dma.h | |||
@@ -40,7 +40,7 @@ extern int of_dma_controller_register(struct device_node *np, | |||
40 | void *data); | 40 | void *data); |
41 | extern int of_dma_controller_free(struct device_node *np); | 41 | extern int of_dma_controller_free(struct device_node *np); |
42 | extern struct dma_chan *of_dma_request_slave_channel(struct device_node *np, | 42 | extern struct dma_chan *of_dma_request_slave_channel(struct device_node *np, |
43 | char *name); | 43 | const char *name); |
44 | extern struct dma_chan *of_dma_simple_xlate(struct of_phandle_args *dma_spec, | 44 | extern struct dma_chan *of_dma_simple_xlate(struct of_phandle_args *dma_spec, |
45 | struct of_dma *ofdma); | 45 | struct of_dma *ofdma); |
46 | #else | 46 | #else |
@@ -58,7 +58,7 @@ static inline int of_dma_controller_free(struct device_node *np) | |||
58 | } | 58 | } |
59 | 59 | ||
60 | static inline struct dma_chan *of_dma_request_slave_channel(struct device_node *np, | 60 | static inline struct dma_chan *of_dma_request_slave_channel(struct device_node *np, |
61 | char *name) | 61 | const char *name) |
62 | { | 62 | { |
63 | return NULL; | 63 | return NULL; |
64 | } | 64 | } |