OSDN Git Service

cw1200: add const to hwbus_ops structures
authorBhumika Goyal <bhumirks@gmail.com>
Fri, 23 Jun 2017 11:43:19 +0000 (17:13 +0530)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 28 Jun 2017 18:17:46 +0000 (21:17 +0300)
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>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/st/cw1200/cw1200_sdio.c
drivers/net/wireless/st/cw1200/cw1200_spi.c

index 709f56e..1037ec6 100644 (file)
@@ -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,
index 63f95e9..412fb6e 100644 (file)
@@ -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,