Re: [PATCH] spi: dw-mid: constify dw_spi_dma_ops structure

2015-11-28 Thread Andy Shevchenko
On Sat, Nov 28, 2015 at 4:09 PM, Julia Lawall  wrote:
> The dw_spi_dma_ops structure is never modified, so declare it as const.
>
> Done with the help of Coccinelle.
>
> Signed-off-by: Julia Lawall 
>

Acked-by: Andy Shevchenko 

> ---
>  drivers/spi/spi-dw-mid.c |2 +-
>  drivers/spi/spi-dw.h |2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/spi/spi-dw-mid.c b/drivers/spi/spi-dw-mid.c
> index bb1052e..9185f6c 100644
> --- a/drivers/spi/spi-dw-mid.c
> +++ b/drivers/spi/spi-dw-mid.c
> @@ -283,7 +283,7 @@ static void mid_spi_dma_stop(struct dw_spi *dws)
> }
>  }
>
> -static struct dw_spi_dma_ops mid_dma_ops = {
> +static const struct dw_spi_dma_ops mid_dma_ops = {
> .dma_init   = mid_spi_dma_init,
> .dma_exit   = mid_spi_dma_exit,
> .dma_setup  = mid_spi_dma_setup,
> diff --git a/drivers/spi/spi-dw.h b/drivers/spi/spi-dw.h
> index 35589a2..61bc3cb 100644
> --- a/drivers/spi/spi-dw.h
> +++ b/drivers/spi/spi-dw.h
> @@ -130,7 +130,7 @@ struct dw_spi {
> struct dma_chan *rxchan;
> unsigned long   dma_chan_busy;
> dma_addr_t  dma_addr; /* phy address of the Data register 
> */
> -   struct dw_spi_dma_ops   *dma_ops;
> +   const struct dw_spi_dma_ops *dma_ops;
> void*dma_tx;
> void*dma_rx;
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-spi" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
With Best Regards,
Andy Shevchenko
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] spi: dw-mid: constify dw_spi_dma_ops structure

2015-11-28 Thread Julia Lawall
The dw_spi_dma_ops structure is never modified, so declare it as const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall 

---
 drivers/spi/spi-dw-mid.c |2 +-
 drivers/spi/spi-dw.h |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/spi-dw-mid.c b/drivers/spi/spi-dw-mid.c
index bb1052e..9185f6c 100644
--- a/drivers/spi/spi-dw-mid.c
+++ b/drivers/spi/spi-dw-mid.c
@@ -283,7 +283,7 @@ static void mid_spi_dma_stop(struct dw_spi *dws)
}
 }
 
-static struct dw_spi_dma_ops mid_dma_ops = {
+static const struct dw_spi_dma_ops mid_dma_ops = {
.dma_init   = mid_spi_dma_init,
.dma_exit   = mid_spi_dma_exit,
.dma_setup  = mid_spi_dma_setup,
diff --git a/drivers/spi/spi-dw.h b/drivers/spi/spi-dw.h
index 35589a2..61bc3cb 100644
--- a/drivers/spi/spi-dw.h
+++ b/drivers/spi/spi-dw.h
@@ -130,7 +130,7 @@ struct dw_spi {
struct dma_chan *rxchan;
unsigned long   dma_chan_busy;
dma_addr_t  dma_addr; /* phy address of the Data register */
-   struct dw_spi_dma_ops   *dma_ops;
+   const struct dw_spi_dma_ops *dma_ops;
void*dma_tx;
void*dma_rx;
 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] spi: dw-mid: constify dw_spi_dma_ops structure

2015-11-28 Thread Julia Lawall
The dw_spi_dma_ops structure is never modified, so declare it as const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall 

---
 drivers/spi/spi-dw-mid.c |2 +-
 drivers/spi/spi-dw.h |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/spi-dw-mid.c b/drivers/spi/spi-dw-mid.c
index bb1052e..9185f6c 100644
--- a/drivers/spi/spi-dw-mid.c
+++ b/drivers/spi/spi-dw-mid.c
@@ -283,7 +283,7 @@ static void mid_spi_dma_stop(struct dw_spi *dws)
}
 }
 
-static struct dw_spi_dma_ops mid_dma_ops = {
+static const struct dw_spi_dma_ops mid_dma_ops = {
.dma_init   = mid_spi_dma_init,
.dma_exit   = mid_spi_dma_exit,
.dma_setup  = mid_spi_dma_setup,
diff --git a/drivers/spi/spi-dw.h b/drivers/spi/spi-dw.h
index 35589a2..61bc3cb 100644
--- a/drivers/spi/spi-dw.h
+++ b/drivers/spi/spi-dw.h
@@ -130,7 +130,7 @@ struct dw_spi {
struct dma_chan *rxchan;
unsigned long   dma_chan_busy;
dma_addr_t  dma_addr; /* phy address of the Data register */
-   struct dw_spi_dma_ops   *dma_ops;
+   const struct dw_spi_dma_ops *dma_ops;
void*dma_tx;
void*dma_rx;
 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] spi: dw-mid: constify dw_spi_dma_ops structure

2015-11-28 Thread Andy Shevchenko
On Sat, Nov 28, 2015 at 4:09 PM, Julia Lawall  wrote:
> The dw_spi_dma_ops structure is never modified, so declare it as const.
>
> Done with the help of Coccinelle.
>
> Signed-off-by: Julia Lawall 
>

Acked-by: Andy Shevchenko 

> ---
>  drivers/spi/spi-dw-mid.c |2 +-
>  drivers/spi/spi-dw.h |2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/spi/spi-dw-mid.c b/drivers/spi/spi-dw-mid.c
> index bb1052e..9185f6c 100644
> --- a/drivers/spi/spi-dw-mid.c
> +++ b/drivers/spi/spi-dw-mid.c
> @@ -283,7 +283,7 @@ static void mid_spi_dma_stop(struct dw_spi *dws)
> }
>  }
>
> -static struct dw_spi_dma_ops mid_dma_ops = {
> +static const struct dw_spi_dma_ops mid_dma_ops = {
> .dma_init   = mid_spi_dma_init,
> .dma_exit   = mid_spi_dma_exit,
> .dma_setup  = mid_spi_dma_setup,
> diff --git a/drivers/spi/spi-dw.h b/drivers/spi/spi-dw.h
> index 35589a2..61bc3cb 100644
> --- a/drivers/spi/spi-dw.h
> +++ b/drivers/spi/spi-dw.h
> @@ -130,7 +130,7 @@ struct dw_spi {
> struct dma_chan *rxchan;
> unsigned long   dma_chan_busy;
> dma_addr_t  dma_addr; /* phy address of the Data register 
> */
> -   struct dw_spi_dma_ops   *dma_ops;
> +   const struct dw_spi_dma_ops *dma_ops;
> void*dma_tx;
> void*dma_rx;
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-spi" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
With Best Regards,
Andy Shevchenko
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/