Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Mark Brown and committed by
Vinod Koul
d7cabeed e368b510

+14 -14
+2 -2
arch/arm/mach-lpc32xx/phy3250.c
··· 182 182 static struct pl08x_platform_data pl08x_pd = { 183 183 .slave_channels = &pl08x_slave_channels[0], 184 184 .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, 187 187 .lli_buses = PL08X_AHB1, 188 188 .mem_buses = PL08X_AHB1, 189 189 };
+2 -2
arch/arm/mach-spear/spear3xx.c
··· 56 56 }, 57 57 .lli_buses = PL08X_AHB1, 58 58 .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, 61 61 }; 62 62 63 63 /*
+2 -2
arch/arm/mach-spear/spear6xx.c
··· 335 335 }, 336 336 .lli_buses = PL08X_AHB1, 337 337 .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, 340 340 .slave_channels = spear600_dma_info, 341 341 .num_slave_channels = ARRAY_SIZE(spear600_dma_info), 342 342 };
+4 -4
drivers/dma/amba-pl08x.c
··· 299 299 const struct pl08x_platform_data *pd = plchan->host->pd; 300 300 int ret; 301 301 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); 304 304 if (ret < 0) { 305 305 plchan->mux_use = 0; 306 306 return ret; ··· 318 318 if (plchan->signal >= 0) { 319 319 WARN_ON(plchan->mux_use == 0); 320 320 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); 323 323 plchan->signal = -1; 324 324 } 325 325 }
+4 -4
include/linux/amba/pl08x.h
··· 76 76 * platform, all inclusive, including multiplexed channels. The available 77 77 * physical channels will be multiplexed around these signals as they are 78 78 * 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 80 80 * immediately: if there is some multiplexing or similar blocking the use 81 81 * of the channel the transfer can be denied by returning less than zero, 82 82 * 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 84 84 * running any DMA transfer and multiplexing can be recycled 85 85 * @lli_buses: buses which LLIs can be fetched from: PL08X_AHB1 | PL08X_AHB2 86 86 * @mem_buses: buses which memory can be accessed from: PL08X_AHB1 | PL08X_AHB2 ··· 89 89 const struct pl08x_channel_data *slave_channels; 90 90 unsigned int num_slave_channels; 91 91 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); 94 94 u8 lli_buses; 95 95 u8 mem_buses; 96 96 };