[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190508112842.11654-12-alexandru.ardelean@analog.com>
Date: Wed, 8 May 2019 14:28:36 +0300
From: Alexandru Ardelean <alexandru.ardelean@...log.com>
To: <linuxppc-dev@...ts.ozlabs.org>, <linux-kernel@...r.kernel.org>,
<linux-ide@...r.kernel.org>, <linux-clk@...r.kernel.org>,
<linux-rpi-kernel@...ts.infradead.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-rockchip@...ts.infradead.org>, <linux-pm@...r.kernel.org>,
<linux-gpio@...r.kernel.org>, <dri-devel@...ts.freedesktop.org>,
<intel-gfx@...ts.freedesktop.org>, <linux-omap@...r.kernel.org>,
<linux-mmc@...r.kernel.org>, <linux-wireless@...r.kernel.org>,
<netdev@...r.kernel.org>, <linux-pci@...r.kernel.org>,
<linux-tegra@...r.kernel.org>, <devel@...verdev.osuosl.org>,
<linux-usb@...r.kernel.org>, <kvm@...r.kernel.org>,
<linux-fbdev@...r.kernel.org>, <linux-mtd@...ts.infradead.org>,
<cgroups@...r.kernel.org>, <linux-mm@...ck.org>,
<linux-security-module@...r.kernel.org>,
<linux-integrity@...r.kernel.org>, <alsa-devel@...a-project.org>
CC: <gregkh@...uxfoundation.org>, <andriy.shevchenko@...ux.intel.com>,
Alexandru Ardelean <alexandru.ardelean@...log.com>
Subject: [PATCH 10/16] pinctrl: armada-37xx: use new match_string() helper/macro
The change is mostly cosmetic.
The `armada_37xx_pin_group` struct is defined as.
struct armada_37xx_pin_group {
const char *name;
unsigned int start_pin;
unsigned int npins;
u32 reg_mask;
u32 val[NB_FUNCS];
unsigned int extra_pin;
unsigned int extra_npins;
const char *funcs[NB_FUNCS];
unsigned int *pins;
};
The `funcs` field is a static array of strings, so using the
new `match_string()` helper (which does an implicit ARRAY_SIZE(gp->funcs))
should be fine.
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@...log.com>
---
drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
index 07a5bcaa0067..68b0db5ef5e9 100644
--- a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
+++ b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
@@ -348,7 +348,7 @@ static int armada_37xx_pmx_set_by_name(struct pinctrl_dev *pctldev,
dev_dbg(info->dev, "enable function %s group %s\n",
name, grp->name);
- func = __match_string(grp->funcs, NB_FUNCS, name);
+ func = match_string(grp->funcs, name);
if (func < 0)
return -ENOTSUPP;
@@ -938,7 +938,7 @@ static int armada_37xx_fill_func(struct armada_37xx_pinctrl *info)
struct armada_37xx_pin_group *gp = &info->groups[g];
int f;
- f = __match_string(gp->funcs, NB_FUNCS, name);
+ f = match_string(gp->funcs, name);
if (f < 0)
continue;
--
2.17.1
Powered by blists - more mailing lists