2017-03-17 20:27:59

by Moritz Fischer

[permalink] [raw]
Subject: [PATCH] fpga: altera_freeze_bridge: Constify ops

The ops are not changing, make them const.

Signed-off-by: Moritz Fischer <[email protected]>
Cc: Alan Tull <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
drivers/fpga/altera-freeze-bridge.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/fpga/altera-freeze-bridge.c b/drivers/fpga/altera-freeze-bridge.c
index 8dcd9fb..8c1bc7e 100644
--- a/drivers/fpga/altera-freeze-bridge.c
+++ b/drivers/fpga/altera-freeze-bridge.c
@@ -203,7 +203,7 @@ static int altera_freeze_br_enable_show(struct fpga_bridge *bridge)
return priv->enable;
}

-static struct fpga_bridge_ops altera_freeze_br_br_ops = {
+static const struct fpga_bridge_ops altera_freeze_br_br_ops = {
.enable_set = altera_freeze_br_enable_set,
.enable_show = altera_freeze_br_enable_show,
};
--
2.7.4


2017-03-23 18:29:59

by Alan Tull

[permalink] [raw]
Subject: Re: [PATCH] fpga: altera_freeze_bridge: Constify ops

On Fri, Mar 17, 2017 at 3:15 PM, Moritz Fischer <[email protected]> wrote:
> The ops are not changing, make them const.
>
> Signed-off-by: Moritz Fischer <[email protected]>

Acked-by: Alan Tull <[email protected]>

> Cc: Alan Tull <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> ---
> drivers/fpga/altera-freeze-bridge.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/fpga/altera-freeze-bridge.c b/drivers/fpga/altera-freeze-bridge.c
> index 8dcd9fb..8c1bc7e 100644
> --- a/drivers/fpga/altera-freeze-bridge.c
> +++ b/drivers/fpga/altera-freeze-bridge.c
> @@ -203,7 +203,7 @@ static int altera_freeze_br_enable_show(struct fpga_bridge *bridge)
> return priv->enable;
> }
>
> -static struct fpga_bridge_ops altera_freeze_br_br_ops = {
> +static const struct fpga_bridge_ops altera_freeze_br_br_ops = {
> .enable_set = altera_freeze_br_enable_set,
> .enable_show = altera_freeze_br_enable_show,
> };
> --
> 2.7.4
>