Skip to content

Commit d7cabee

Browse files
broonieVinod Koul
authored andcommitted
dmaengine: PL08x: Avoid collisions with get_signal() macro
As pointed out by Arnd Bergmann there is a get_signal macro definied in linux/signal.h which can conflict with the platform data callback function of the same name leading to confusing errors from the compiler (especially if signal.h manages to get pulled into the driver itself due to header dependencies). Avoid such errors by renaming get_signal and put_signal in the platform data to get_xfer_signal and put_xfer_signal. Signed-off-by: Mark Brown <broonie@linaro.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
1 parent e368b51 commit d7cabee

5 files changed

Lines changed: 14 additions & 14 deletions

File tree

‎arch/arm/mach-lpc32xx/phy3250.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,8 @@ static void pl08x_put_signal(const struct pl08x_channel_data *cd, int ch)
182182
static struct pl08x_platform_data pl08x_pd = {
183183
.slave_channels = &pl08x_slave_channels[0],
184184
.num_slave_channels = ARRAY_SIZE(pl08x_slave_channels),
185-
.get_signal = pl08x_get_signal,
186-
.put_signal = pl08x_put_signal,
185+
.get_xfer_signal = pl08x_get_signal,
186+
.put_xfer_signal = pl08x_put_signal,
187187
.lli_buses = PL08X_AHB1,
188188
.mem_buses = PL08X_AHB1,
189189
};

‎arch/arm/mach-spear/spear3xx.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ struct pl08x_platform_data pl080_plat_data = {
5656
},
5757
.lli_buses = PL08X_AHB1,
5858
.mem_buses = PL08X_AHB1,
59-
.get_signal = pl080_get_signal,
60-
.put_signal = pl080_put_signal,
59+
.get_xfer_signal = pl080_get_signal,
60+
.put_xfer_signal = pl080_put_signal,
6161
};
6262

6363
/*

‎arch/arm/mach-spear/spear6xx.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,8 @@ static struct pl08x_platform_data spear6xx_pl080_plat_data = {
335335
},
336336
.lli_buses = PL08X_AHB1,
337337
.mem_buses = PL08X_AHB1,
338-
.get_signal = pl080_get_signal,
339-
.put_signal = pl080_put_signal,
338+
.get_xfer_signal = pl080_get_signal,
339+
.put_xfer_signal = pl080_put_signal,
340340
.slave_channels = spear600_dma_info,
341341
.num_slave_channels = ARRAY_SIZE(spear600_dma_info),
342342
};

‎drivers/dma/amba-pl08x.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,8 @@ static int pl08x_request_mux(struct pl08x_dma_chan *plchan)
299299
const struct pl08x_platform_data *pd = plchan->host->pd;
300300
int ret;
301301

302-
if (plchan->mux_use++ == 0 && pd->get_signal) {
303-
ret = pd->get_signal(plchan->cd);
302+
if (plchan->mux_use++ == 0 && pd->get_xfer_signal) {
303+
ret = pd->get_xfer_signal(plchan->cd);
304304
if (ret < 0) {
305305
plchan->mux_use = 0;
306306
return ret;
@@ -318,8 +318,8 @@ static void pl08x_release_mux(struct pl08x_dma_chan *plchan)
318318
if (plchan->signal >= 0) {
319319
WARN_ON(plchan->mux_use == 0);
320320

321-
if (--plchan->mux_use == 0 && pd->put_signal) {
322-
pd->put_signal(plchan->cd, plchan->signal);
321+
if (--plchan->mux_use == 0 && pd->put_xfer_signal) {
322+
pd->put_xfer_signal(plchan->cd, plchan->signal);
323323
plchan->signal = -1;
324324
}
325325
}

‎include/linux/amba/pl08x.h‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,11 @@ struct pl08x_channel_data {
7676
* platform, all inclusive, including multiplexed channels. The available
7777
* physical channels will be multiplexed around these signals as they are
7878
* requested, just enumerate all possible channels.
79-
* @get_signal: request a physical signal to be used for a DMA transfer
79+
* @get_xfer_signal: request a physical signal to be used for a DMA transfer
8080
* immediately: if there is some multiplexing or similar blocking the use
8181
* of the channel the transfer can be denied by returning less than zero,
8282
* else it returns the allocated signal number
83-
* @put_signal: indicate to the platform that this physical signal is not
83+
* @put_xfer_signal: indicate to the platform that this physical signal is not
8484
* running any DMA transfer and multiplexing can be recycled
8585
* @lli_buses: buses which LLIs can be fetched from: PL08X_AHB1 | PL08X_AHB2
8686
* @mem_buses: buses which memory can be accessed from: PL08X_AHB1 | PL08X_AHB2
@@ -89,8 +89,8 @@ struct pl08x_platform_data {
8989
const struct pl08x_channel_data *slave_channels;
9090
unsigned int num_slave_channels;
9191
struct pl08x_channel_data memcpy_channel;
92-
int (*get_signal)(const struct pl08x_channel_data *);
93-
void (*put_signal)(const struct pl08x_channel_data *, int);
92+
int (*get_xfer_signal)(const struct pl08x_channel_data *);
93+
void (*put_xfer_signal)(const struct pl08x_channel_data *, int);
9494
u8 lli_buses;
9595
u8 mem_buses;
9696
};

0 commit comments

Comments
 (0)