Skip to content

Commit

Permalink
pinctrl: pinctrl-mxs: Fix variables' definition type
Browse files Browse the repository at this point in the history
Fix the following warnings when building with W=1 option:

drivers/pinctrl/pinctrl-mxs.c: In function 'mxs_dt_free_map':
drivers/pinctrl/pinctrl-mxs.c:151:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
drivers/pinctrl/pinctrl-mxs.c: In function 'mxs_pinctrl_enable':
drivers/pinctrl/pinctrl-mxs.c:208:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
drivers/pinctrl/pinctrl-mxs.c: In function 'mxs_pinconf_group_set':
drivers/pinctrl/pinctrl-mxs.c:265:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
drivers/pinctrl/pinctrl-mxs.c: In function 'mxs_pinctrl_parse_group':
drivers/pinctrl/pinctrl-mxs.c:376:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Fabio Estevam authored and Linus Walleij committed Jan 18, 2013
1 parent f9925b5 commit 4b090d8
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions drivers/pinctrl/pinctrl-mxs.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ static int mxs_dt_node_to_map(struct pinctrl_dev *pctldev,
static void mxs_dt_free_map(struct pinctrl_dev *pctldev,
struct pinctrl_map *map, unsigned num_maps)
{
int i;
u32 i;

for (i = 0; i < num_maps; i++) {
if (map[i].type == PIN_MAP_TYPE_MUX_GROUP)
Expand Down Expand Up @@ -203,7 +203,7 @@ static int mxs_pinctrl_enable(struct pinctrl_dev *pctldev, unsigned selector,
void __iomem *reg;
u8 bank, shift;
u16 pin;
int i;
u32 i;

for (i = 0; i < g->npins; i++) {
bank = PINID_TO_BANK(g->pins[i]);
Expand Down Expand Up @@ -256,7 +256,7 @@ static int mxs_pinconf_group_set(struct pinctrl_dev *pctldev,
void __iomem *reg;
u8 ma, vol, pull, bank, shift;
u16 pin;
int i;
u32 i;

ma = CONFIG_TO_MA(config);
vol = CONFIG_TO_VOL(config);
Expand Down Expand Up @@ -345,8 +345,7 @@ static int mxs_pinctrl_parse_group(struct platform_device *pdev,
const char *propname = "fsl,pinmux-ids";
char *group;
int length = strlen(np->name) + SUFFIX_LEN;
int i;
u32 val;
u32 val, i;

group = devm_kzalloc(&pdev->dev, length, GFP_KERNEL);
if (!group)
Expand Down

0 comments on commit 4b090d8

Please sign in to comment.