diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2013-03-25 08:23:52 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2013-04-15 00:21:18 -0400 |
commit | a53e28da574a40bcc9f78f5d0b0b60570182595b (patch) | |
tree | 9b39b12b7e52518ca08a351112ba69a8229fa907 | |
parent | a7e340657a04777077a86e235f7074e8e261ac2e (diff) |
dma: Make the 'mask' parameter of __dma_request_channel const
The 'mask' parameter is not modified in __dma_request_channel and really
shouldn't be. Make this explicit by making the parameter const.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r-- | drivers/dma/dmaengine.c | 9 | ||||
-rw-r--r-- | include/linux/dmaengine.h | 11 |
2 files changed, 12 insertions, 8 deletions
diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c index b2728d6ba2fd..d07ef7dc04ec 100644 --- a/drivers/dma/dmaengine.c +++ b/drivers/dma/dmaengine.c | |||
@@ -174,7 +174,8 @@ static struct class dma_devclass = { | |||
174 | #define dma_device_satisfies_mask(device, mask) \ | 174 | #define dma_device_satisfies_mask(device, mask) \ |
175 | __dma_device_satisfies_mask((device), &(mask)) | 175 | __dma_device_satisfies_mask((device), &(mask)) |
176 | static int | 176 | static int |
177 | __dma_device_satisfies_mask(struct dma_device *device, dma_cap_mask_t *want) | 177 | __dma_device_satisfies_mask(struct dma_device *device, |
178 | const dma_cap_mask_t *want) | ||
178 | { | 179 | { |
179 | dma_cap_mask_t has; | 180 | dma_cap_mask_t has; |
180 | 181 | ||
@@ -463,7 +464,8 @@ static void dma_channel_rebalance(void) | |||
463 | } | 464 | } |
464 | } | 465 | } |
465 | 466 | ||
466 | static struct dma_chan *private_candidate(dma_cap_mask_t *mask, struct dma_device *dev, | 467 | static struct dma_chan *private_candidate(const dma_cap_mask_t *mask, |
468 | struct dma_device *dev, | ||
467 | dma_filter_fn fn, void *fn_param) | 469 | dma_filter_fn fn, void *fn_param) |
468 | { | 470 | { |
469 | struct dma_chan *chan; | 471 | struct dma_chan *chan; |
@@ -505,7 +507,8 @@ static struct dma_chan *private_candidate(dma_cap_mask_t *mask, struct dma_devic | |||
505 | * @fn: optional callback to disposition available channels | 507 | * @fn: optional callback to disposition available channels |
506 | * @fn_param: opaque parameter to pass to dma_filter_fn | 508 | * @fn_param: opaque parameter to pass to dma_filter_fn |
507 | */ | 509 | */ |
508 | struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, dma_filter_fn fn, void *fn_param) | 510 | struct dma_chan *__dma_request_channel(const dma_cap_mask_t *mask, |
511 | dma_filter_fn fn, void *fn_param) | ||
509 | { | 512 | { |
510 | struct dma_device *device, *_d; | 513 | struct dma_device *device, *_d; |
511 | struct dma_chan *chan = NULL; | 514 | struct dma_chan *chan = NULL; |
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 91ac8da25020..dd6d21b335c8 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
@@ -967,7 +967,8 @@ enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie); | |||
967 | #ifdef CONFIG_DMA_ENGINE | 967 | #ifdef CONFIG_DMA_ENGINE |
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(const dma_cap_mask_t *mask, |
971 | dma_filter_fn fn, void *fn_param); | ||
971 | struct dma_chan *dma_request_slave_channel(struct device *dev, char *name); | 972 | struct dma_chan *dma_request_slave_channel(struct device *dev, char *name); |
972 | void dma_release_channel(struct dma_chan *chan); | 973 | void dma_release_channel(struct dma_chan *chan); |
973 | #else | 974 | #else |
@@ -978,7 +979,7 @@ static inline enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descript | |||
978 | static inline void dma_issue_pending_all(void) | 979 | static inline void dma_issue_pending_all(void) |
979 | { | 980 | { |
980 | } | 981 | } |
981 | static inline struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, | 982 | static inline struct dma_chan *__dma_request_channel(const dma_cap_mask_t *mask, |
982 | dma_filter_fn fn, void *fn_param) | 983 | dma_filter_fn fn, void *fn_param) |
983 | { | 984 | { |
984 | return NULL; | 985 | return NULL; |
@@ -1005,9 +1006,9 @@ struct dma_chan *net_dma_find_channel(void); | |||
1005 | __dma_request_slave_channel_compat(&(mask), x, y, dev, name) | 1006 | __dma_request_slave_channel_compat(&(mask), x, y, dev, name) |
1006 | 1007 | ||
1007 | static inline struct dma_chan | 1008 | static inline struct dma_chan |
1008 | *__dma_request_slave_channel_compat(dma_cap_mask_t *mask, dma_filter_fn fn, | 1009 | *__dma_request_slave_channel_compat(const dma_cap_mask_t *mask, |
1009 | void *fn_param, struct device *dev, | 1010 | dma_filter_fn fn, void *fn_param, |
1010 | char *name) | 1011 | struct device *dev, char *name) |
1011 | { | 1012 | { |
1012 | struct dma_chan *chan; | 1013 | struct dma_chan *chan; |
1013 | 1014 | ||