dmaengine: PL08x: Avoid collisions with get_signal() macro
authorMark Brown <broonie@linaro.org>
Wed, 19 Jun 2013 19:38:28 +0000 (20:38 +0100)
committerVinod Koul <vinod.koul@intel.com>
Fri, 5 Jul 2013 06:10:47 +0000 (11:40 +0530)
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>
arch/arm/mach-lpc32xx/phy3250.c
arch/arm/mach-spear/spear3xx.c
arch/arm/mach-spear/spear6xx.c
drivers/dma/amba-pl08x.c
include/linux/amba/pl08x.h

index c1cd5a943ab11bfc45eefac18ba777b3f043d714..e54f87ec2e4adca1913893e05665030c824bf40b 100644 (file)
@@ -182,8 +182,8 @@ static void pl08x_put_signal(const struct pl08x_channel_data *cd, int ch)
 static struct pl08x_platform_data pl08x_pd = {
        .slave_channels = &pl08x_slave_channels[0],
        .num_slave_channels = ARRAY_SIZE(pl08x_slave_channels),
-       .get_signal = pl08x_get_signal,
-       .put_signal = pl08x_put_signal,
+       .get_xfer_signal = pl08x_get_signal,
+       .put_xfer_signal = pl08x_put_signal,
        .lli_buses = PL08X_AHB1,
        .mem_buses = PL08X_AHB1,
 };
index 0227c97797cdc1f0bc50b14084e47298ce7879a3..bf3b1fd8cb2398b62e6990c3f116749c76f375ec 100644 (file)
@@ -56,8 +56,8 @@ struct pl08x_platform_data pl080_plat_data = {
        },
        .lli_buses = PL08X_AHB1,
        .mem_buses = PL08X_AHB1,
-       .get_signal = pl080_get_signal,
-       .put_signal = pl080_put_signal,
+       .get_xfer_signal = pl080_get_signal,
+       .put_xfer_signal = pl080_put_signal,
 };
 
 /*
index ec8eefbbdfadaf67c74dbaa0e1921dec440b57be..cf477c78bb18b5c8fa1678baf524381b498e5d44 100644 (file)
@@ -335,8 +335,8 @@ static struct pl08x_platform_data spear6xx_pl080_plat_data = {
        },
        .lli_buses = PL08X_AHB1,
        .mem_buses = PL08X_AHB1,
-       .get_signal = pl080_get_signal,
-       .put_signal = pl080_put_signal,
+       .get_xfer_signal = pl080_get_signal,
+       .put_xfer_signal = pl080_put_signal,
        .slave_channels = spear600_dma_info,
        .num_slave_channels = ARRAY_SIZE(spear600_dma_info),
 };
index 8bad254a498d7788530e97a5e5599ca90a2aefe1..06fe45c74de57b3151e8520e9d7154f7ba7906e2 100644 (file)
@@ -299,8 +299,8 @@ static int pl08x_request_mux(struct pl08x_dma_chan *plchan)
        const struct pl08x_platform_data *pd = plchan->host->pd;
        int ret;
 
-       if (plchan->mux_use++ == 0 && pd->get_signal) {
-               ret = pd->get_signal(plchan->cd);
+       if (plchan->mux_use++ == 0 && pd->get_xfer_signal) {
+               ret = pd->get_xfer_signal(plchan->cd);
                if (ret < 0) {
                        plchan->mux_use = 0;
                        return ret;
@@ -318,8 +318,8 @@ static void pl08x_release_mux(struct pl08x_dma_chan *plchan)
        if (plchan->signal >= 0) {
                WARN_ON(plchan->mux_use == 0);
 
-               if (--plchan->mux_use == 0 && pd->put_signal) {
-                       pd->put_signal(plchan->cd, plchan->signal);
+               if (--plchan->mux_use == 0 && pd->put_xfer_signal) {
+                       pd->put_xfer_signal(plchan->cd, plchan->signal);
                        plchan->signal = -1;
                }
        }
index 2a5f64a11b77aee8d56100d60df81a7600511a6e..10fe2a211c2e35d4812cacf9407ef6bfe094b440 100644 (file)
@@ -76,11 +76,11 @@ struct pl08x_channel_data {
  * platform, all inclusive, including multiplexed channels. The available
  * physical channels will be multiplexed around these signals as they are
  * requested, just enumerate all possible channels.
- * @get_signal: request a physical signal to be used for a DMA transfer
+ * @get_xfer_signal: request a physical signal to be used for a DMA transfer
  * immediately: if there is some multiplexing or similar blocking the use
  * of the channel the transfer can be denied by returning less than zero,
  * else it returns the allocated signal number
- * @put_signal: indicate to the platform that this physical signal is not
+ * @put_xfer_signal: indicate to the platform that this physical signal is not
  * running any DMA transfer and multiplexing can be recycled
  * @lli_buses: buses which LLIs can be fetched from: PL08X_AHB1 | PL08X_AHB2
  * @mem_buses: buses which memory can be accessed from: PL08X_AHB1 | PL08X_AHB2
@@ -89,8 +89,8 @@ struct pl08x_platform_data {
        const struct pl08x_channel_data *slave_channels;
        unsigned int num_slave_channels;
        struct pl08x_channel_data memcpy_channel;
-       int (*get_signal)(const struct pl08x_channel_data *);
-       void (*put_signal)(const struct pl08x_channel_data *, int);
+       int (*get_xfer_signal)(const struct pl08x_channel_data *);
+       void (*put_xfer_signal)(const struct pl08x_channel_data *, int);
        u8 lli_buses;
        u8 mem_buses;
 };