Skip to content

Commit bef29ec

Browse files
Markus PargmannVinod Koul
authored andcommitted
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>
1 parent 41ef2d5 commit bef29ec

4 files changed

Lines changed: 8 additions & 8 deletions

File tree

‎drivers/dma/dmaengine.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ EXPORT_SYMBOL_GPL(__dma_request_channel);
555555
* @dev: pointer to client device structure
556556
* @name: slave channel name
557557
*/
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)
559559
{
560560
/* If device-tree is present get slave info from here */
561561
if (dev->of_node)

‎drivers/dma/of-dma.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ EXPORT_SYMBOL_GPL(of_dma_controller_free);
172172
* specifiers, matches the name provided. Returns 0 if the name matches and
173173
* a valid pointer to the DMA specifier is found. Otherwise returns -ENODEV.
174174
*/
175-
static int of_dma_match_channel(struct device_node *np, char *name, int index,
176-
struct of_phandle_args *dma_spec)
175+
static int of_dma_match_channel(struct device_node *np, const char *name,
176+
int index, struct of_phandle_args *dma_spec)
177177
{
178178
const char *s;
179179

@@ -198,7 +198,7 @@ static int of_dma_match_channel(struct device_node *np, char *name, int index,
198198
* Returns pointer to appropriate dma channel on success or NULL on error.
199199
*/
200200
struct dma_chan *of_dma_request_slave_channel(struct device_node *np,
201-
char *name)
201+
const char *name)
202202
{
203203
struct of_phandle_args dma_spec;
204204
struct of_dma *ofdma;

‎include/linux/dmaengine.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -968,7 +968,7 @@ enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie);
968968
enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx);
969969
void dma_issue_pending_all(void);
970970
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);
972972
void dma_release_channel(struct dma_chan *chan);
973973
#else
974974
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,
984984
return NULL;
985985
}
986986
static inline struct dma_chan *dma_request_slave_channel(struct device *dev,
987-
char *name)
987+
const char *name)
988988
{
989989
return NULL;
990990
}

‎include/linux/of_dma.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ extern int of_dma_controller_register(struct device_node *np,
4040
void *data);
4141
extern int of_dma_controller_free(struct device_node *np);
4242
extern struct dma_chan *of_dma_request_slave_channel(struct device_node *np,
43-
char *name);
43+
const char *name);
4444
extern struct dma_chan *of_dma_simple_xlate(struct of_phandle_args *dma_spec,
4545
struct of_dma *ofdma);
4646
#else
@@ -58,7 +58,7 @@ static inline int of_dma_controller_free(struct device_node *np)
5858
}
5959

6060
static inline struct dma_chan *of_dma_request_slave_channel(struct device_node *np,
61-
char *name)
61+
const char *name)
6262
{
6363
return NULL;
6464
}

0 commit comments

Comments
 (0)