summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/sh-pfc/pinctrl.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2012-11-28 23:56:48 +0400
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2013-03-15 16:33:36 +0400
commitd785fdb5d8ebdb0081624e9d8b220ff199c22645 (patch)
treea3473d67733c72333690f522f860010c44087242 /drivers/pinctrl/sh-pfc/pinctrl.c
parente3e89ae43e132b80039614098597ad2fec6cfbb1 (diff)
downloadlinux-d785fdb5d8ebdb0081624e9d8b220ff199c22645.tar.xz
sh-pfc: Don't take the sh_pfc spinlock in sh_pfc_map_gpios()
The sh_pfc_map_gpios() function is only called at initialization time when no other task can access the sh_pfc fields. Don't protect the operation with a spinlock. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/sh-pfc/pinctrl.c')
-rw-r--r--drivers/pinctrl/sh-pfc/pinctrl.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/pinctrl/sh-pfc/pinctrl.c b/drivers/pinctrl/sh-pfc/pinctrl.c
index 9bd0a830c140..4ce2753cb2df 100644
--- a/drivers/pinctrl/sh-pfc/pinctrl.c
+++ b/drivers/pinctrl/sh-pfc/pinctrl.c
@@ -334,7 +334,6 @@ static void sh_pfc_map_one_gpio(struct sh_pfc *pfc, struct sh_pfc_pinctrl *pmx,
/* pinmux ranges -> pinctrl pin descs */
static int sh_pfc_map_gpios(struct sh_pfc *pfc, struct sh_pfc_pinctrl *pmx)
{
- unsigned long flags;
int i;
pmx->nr_pads = pfc->info->last_gpio - pfc->info->first_gpio + 1;
@@ -346,8 +345,6 @@ static int sh_pfc_map_gpios(struct sh_pfc *pfc, struct sh_pfc_pinctrl *pmx)
return -ENOMEM;
}
- spin_lock_irqsave(&pfc->lock, flags);
-
/*
* We don't necessarily have a 1:1 mapping between pin and linux
* GPIO number, as the latter maps to the associated enum_id.
@@ -368,8 +365,6 @@ static int sh_pfc_map_gpios(struct sh_pfc *pfc, struct sh_pfc_pinctrl *pmx)
sh_pfc_map_one_gpio(pfc, pmx, gpio, i);
}
- spin_unlock_irqrestore(&pfc->lock, flags);
-
return 0;
}