diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2012-11-28 14:52:53 -0500 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2013-03-15 08:33:36 -0400 |
commit | e3e89ae43e132b80039614098597ad2fec6cfbb1 (patch) | |
tree | fe3ef2021905ce79c2d46d262a8940e31ec9b4d2 /drivers/pinctrl/sh-pfc | |
parent | 942785db87740d144eba0dd717991e07878aaffb (diff) |
sh-pfc: Drop the sh_pfc_pinctrl spinlock
The spinlock is used to protect data that is only accessed sequentially
during initialization. Remove it.
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')
-rw-r--r-- | drivers/pinctrl/sh-pfc/pinctrl.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/drivers/pinctrl/sh-pfc/pinctrl.c b/drivers/pinctrl/sh-pfc/pinctrl.c index d113746ec873..9bd0a830c140 100644 --- a/drivers/pinctrl/sh-pfc/pinctrl.c +++ b/drivers/pinctrl/sh-pfc/pinctrl.c | |||
@@ -37,8 +37,6 @@ struct sh_pfc_pinctrl { | |||
37 | 37 | ||
38 | struct pinctrl_pin_desc *pads; | 38 | struct pinctrl_pin_desc *pads; |
39 | unsigned int nr_pads; | 39 | unsigned int nr_pads; |
40 | |||
41 | spinlock_t lock; | ||
42 | }; | 40 | }; |
43 | 41 | ||
44 | static int sh_pfc_get_groups_count(struct pinctrl_dev *pctldev) | 42 | static int sh_pfc_get_groups_count(struct pinctrl_dev *pctldev) |
@@ -321,7 +319,6 @@ static void sh_pfc_map_one_gpio(struct sh_pfc *pfc, struct sh_pfc_pinctrl *pmx, | |||
321 | struct pinmux_gpio *gpio, unsigned offset) | 319 | struct pinmux_gpio *gpio, unsigned offset) |
322 | { | 320 | { |
323 | struct pinmux_data_reg *dummy; | 321 | struct pinmux_data_reg *dummy; |
324 | unsigned long flags; | ||
325 | int bit; | 322 | int bit; |
326 | 323 | ||
327 | gpio->flags &= ~PINMUX_FLAG_TYPE; | 324 | gpio->flags &= ~PINMUX_FLAG_TYPE; |
@@ -330,10 +327,7 @@ static void sh_pfc_map_one_gpio(struct sh_pfc *pfc, struct sh_pfc_pinctrl *pmx, | |||
330 | gpio->flags |= PINMUX_TYPE_GPIO; | 327 | gpio->flags |= PINMUX_TYPE_GPIO; |
331 | else { | 328 | else { |
332 | gpio->flags |= PINMUX_TYPE_FUNCTION; | 329 | gpio->flags |= PINMUX_TYPE_FUNCTION; |
333 | |||
334 | spin_lock_irqsave(&pmx->lock, flags); | ||
335 | pmx->nr_functions++; | 330 | pmx->nr_functions++; |
336 | spin_unlock_irqrestore(&pmx->lock, flags); | ||
337 | } | 331 | } |
338 | } | 332 | } |
339 | 333 | ||
@@ -381,7 +375,6 @@ static int sh_pfc_map_gpios(struct sh_pfc *pfc, struct sh_pfc_pinctrl *pmx) | |||
381 | 375 | ||
382 | static int sh_pfc_map_functions(struct sh_pfc *pfc, struct sh_pfc_pinctrl *pmx) | 376 | static int sh_pfc_map_functions(struct sh_pfc *pfc, struct sh_pfc_pinctrl *pmx) |
383 | { | 377 | { |
384 | unsigned long flags; | ||
385 | int i, fn; | 378 | int i, fn; |
386 | 379 | ||
387 | pmx->functions = devm_kzalloc(pfc->dev, pmx->nr_functions * | 380 | pmx->functions = devm_kzalloc(pfc->dev, pmx->nr_functions * |
@@ -389,8 +382,6 @@ static int sh_pfc_map_functions(struct sh_pfc *pfc, struct sh_pfc_pinctrl *pmx) | |||
389 | if (unlikely(!pmx->functions)) | 382 | if (unlikely(!pmx->functions)) |
390 | return -ENOMEM; | 383 | return -ENOMEM; |
391 | 384 | ||
392 | spin_lock_irqsave(&pmx->lock, flags); | ||
393 | |||
394 | for (i = fn = 0; i < pmx->nr_pads; i++) { | 385 | for (i = fn = 0; i < pmx->nr_pads; i++) { |
395 | struct pinmux_gpio *gpio = pfc->info->gpios + i; | 386 | struct pinmux_gpio *gpio = pfc->info->gpios + i; |
396 | 387 | ||
@@ -398,8 +389,6 @@ static int sh_pfc_map_functions(struct sh_pfc *pfc, struct sh_pfc_pinctrl *pmx) | |||
398 | pmx->functions[fn++] = gpio; | 389 | pmx->functions[fn++] = gpio; |
399 | } | 390 | } |
400 | 391 | ||
401 | spin_unlock_irqrestore(&pmx->lock, flags); | ||
402 | |||
403 | return 0; | 392 | return 0; |
404 | } | 393 | } |
405 | 394 | ||
@@ -412,8 +401,6 @@ int sh_pfc_register_pinctrl(struct sh_pfc *pfc) | |||
412 | if (unlikely(!pmx)) | 401 | if (unlikely(!pmx)) |
413 | return -ENOMEM; | 402 | return -ENOMEM; |
414 | 403 | ||
415 | spin_lock_init(&pmx->lock); | ||
416 | |||
417 | pmx->pfc = pfc; | 404 | pmx->pfc = pfc; |
418 | pfc->pinctrl = pmx; | 405 | pfc->pinctrl = pmx; |
419 | 406 | ||