linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 05/29] sh-pfc: Don't take the sh_pfc spinlock in sh_pfc_map_gpios()
@ 2013-01-09  0:52 Laurent Pinchart
  0 siblings, 0 replies; only message in thread
From: Laurent Pinchart @ 2013-01-09  0:52 UTC (permalink / raw)
  To: linux-sh

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>
---
 drivers/pinctrl/sh-pfc/pinctrl.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/drivers/pinctrl/sh-pfc/pinctrl.c b/drivers/pinctrl/sh-pfc/pinctrl.c
index 472fcf5..67d576c 100644
--- a/drivers/pinctrl/sh-pfc/pinctrl.c
+++ b/drivers/pinctrl/sh-pfc/pinctrl.c
@@ -344,7 +344,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;
@@ -356,8 +355,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.
@@ -378,8 +375,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);
-
 	sh_pfc_pinctrl_desc.pins = pmx->pads;
 	sh_pfc_pinctrl_desc.npins = pmx->nr_pads;
 
-- 
1.7.8.6


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-01-09  0:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-09  0:52 [PATCH v2 05/29] sh-pfc: Don't take the sh_pfc spinlock in sh_pfc_map_gpios() Laurent Pinchart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).