[PATCH] pinctrl: Declare operation structures as const

Linus Walleij linus.walleij at linaro.org
Fri Feb 15 15:51:51 EST 2013


On Fri, Feb 15, 2013 at 3:43 PM, Laurent Pinchart
<laurent.pinchart+renesas at ideasonboard.com> wrote:

> The pinconf, pinctrl and pinmux operation structures hold function
> pointers that are never modified. Declare them as const.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas at ideasonboard.com>

Nice I love consting.

> This patch hasn't been compile-tested on all the above platforms, Tested-by
> and/or Acked-by tags would thus be welcome.

I get this on all platforms after this patch:

/linux-pinctrl/drivers/pinctrl/pinconf.c: In function
'pinconf_dbg_config_print':
/linux-pinctrl/drivers/pinctrl/pinconf.c:708:12: warning: assignment
discards 'const' qualifier from pointer target type [enabled by
default]

Pls fix! :-)

> I've left the sh-pfc driver untouched for now, it will be handled as part as
> my next (hopefully soon to come) sh-pfc pinctrl series.

Sounds like a deal.

Yours,
Linus Walleij



More information about the linux-arm-kernel mailing list