pinctrl: sx150x: make struct sx150x_regmap_config static

Message ID 20171005102356.29944-1-colin.king@canonical.com
State New
Headers show
Series
  • pinctrl: sx150x: make struct sx150x_regmap_config static
Related show

Commit Message

Colin Ian King Oct. 5, 2017, 10:23 a.m.
From: Colin Ian King <colin.king@canonical.com>

The structure sx150x_regmap_config is local to the source and does not
need to be in global scope, so make it static.

Cleans up sparse warning:
symbol 'sx150x_regmap_config' was not declared. Should it be static?

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/pinctrl/pinctrl-sx150x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Linus Walleij Oct. 9, 2017, 9:02 p.m. | #1
On Thu, Oct 5, 2017 at 12:23 PM, Colin King <colin.king@canonical.com> wrote:

> From: Colin Ian King <colin.king@canonical.com>
>
> The structure sx150x_regmap_config is local to the source and does not
> need to be in global scope, so make it static.
>
> Cleans up sparse warning:
> symbol 'sx150x_regmap_config' was not declared. Should it be static?
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Patch applied.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/pinctrl/pinctrl-sx150x.c b/drivers/pinctrl/pinctrl-sx150x.c
index 7450f5118445..c5ab8cef942d 100644
--- a/drivers/pinctrl/pinctrl-sx150x.c
+++ b/drivers/pinctrl/pinctrl-sx150x.c
@@ -1087,7 +1087,7 @@  static bool sx150x_reg_volatile(struct device *dev, unsigned int reg)
 	return reg == pctl->data->reg_irq_src || reg == pctl->data->reg_data;
 }
 
-const struct regmap_config sx150x_regmap_config = {
+static const struct regmap_config sx150x_regmap_config = {
 	.reg_bits = 8,
 	.val_bits = 32,