* [PATCH] cw1200: add const to hwbus_ops structures
@ 2017-06-23 11:43 Bhumika Goyal
2017-06-28 18:18 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Bhumika Goyal @ 2017-06-23 11:43 UTC (permalink / raw)
To: julia.lawall, pizza, kvalo, linux-wireless, netdev, linux-kernel
Cc: Bhumika Goyal
Declare hwbus_ops structures as const as they are only passed as an
argument to the function cw1200_core_probe. This argument is of type
const. So, make these structures const.
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
drivers/net/wireless/st/cw1200/cw1200_sdio.c | 2 +-
drivers/net/wireless/st/cw1200/cw1200_spi.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/st/cw1200/cw1200_sdio.c b/drivers/net/wireless/st/cw1200/cw1200_sdio.c
index 709f56e..1037ec6 100644
--- a/drivers/net/wireless/st/cw1200/cw1200_sdio.c
+++ b/drivers/net/wireless/st/cw1200/cw1200_sdio.c
@@ -266,7 +266,7 @@ static int cw1200_sdio_pm(struct hwbus_priv *self, bool suspend)
return ret;
}
-static struct hwbus_ops cw1200_sdio_hwbus_ops = {
+static const struct hwbus_ops cw1200_sdio_hwbus_ops = {
.hwbus_memcpy_fromio = cw1200_sdio_memcpy_fromio,
.hwbus_memcpy_toio = cw1200_sdio_memcpy_toio,
.lock = cw1200_sdio_lock,
diff --git a/drivers/net/wireless/st/cw1200/cw1200_spi.c b/drivers/net/wireless/st/cw1200/cw1200_spi.c
index 63f95e9..412fb6e4 100644
--- a/drivers/net/wireless/st/cw1200/cw1200_spi.c
+++ b/drivers/net/wireless/st/cw1200/cw1200_spi.c
@@ -352,7 +352,7 @@ static int cw1200_spi_pm(struct hwbus_priv *self, bool suspend)
return irq_set_irq_wake(self->func->irq, suspend);
}
-static struct hwbus_ops cw1200_spi_hwbus_ops = {
+static const struct hwbus_ops cw1200_spi_hwbus_ops = {
.hwbus_memcpy_fromio = cw1200_spi_memcpy_fromio,
.hwbus_memcpy_toio = cw1200_spi_memcpy_toio,
.lock = cw1200_spi_lock,
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: cw1200: add const to hwbus_ops structures
2017-06-23 11:43 [PATCH] cw1200: add const to hwbus_ops structures Bhumika Goyal
@ 2017-06-28 18:18 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2017-06-28 18:18 UTC (permalink / raw)
To: Bhumika Goyal
Cc: julia.lawall, pizza, linux-wireless, netdev, linux-kernel, Bhumika Goyal
Bhumika Goyal <bhumirks@gmail.com> wrote:
> Declare hwbus_ops structures as const as they are only passed as an
> argument to the function cw1200_core_probe. This argument is of type
> const. So, make these structures const.
>
> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Patch applied to wireless-drivers-next.git, thanks.
3ac27dd37b40 cw1200: add const to hwbus_ops structures
--
https://patchwork.kernel.org/patch/9806289/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-06-28 18:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-23 11:43 [PATCH] cw1200: add const to hwbus_ops structures Bhumika Goyal
2017-06-28 18:18 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).