Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 372517
b: refs/heads/master
c: e3e89ae
h: refs/heads/master
i:
  372515: bf7cfda
v: v3
  • Loading branch information
Laurent Pinchart committed Mar 15, 2013
1 parent ccb5ff7 commit 4aa38b7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 942785db87740d144eba0dd717991e07878aaffb
refs/heads/master: e3e89ae43e132b80039614098597ad2fec6cfbb1
13 changes: 0 additions & 13 deletions trunk/drivers/pinctrl/sh-pfc/pinctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ struct sh_pfc_pinctrl {

struct pinctrl_pin_desc *pads;
unsigned int nr_pads;

spinlock_t lock;
};

static int sh_pfc_get_groups_count(struct pinctrl_dev *pctldev)
Expand Down Expand Up @@ -321,7 +319,6 @@ static void sh_pfc_map_one_gpio(struct sh_pfc *pfc, struct sh_pfc_pinctrl *pmx,
struct pinmux_gpio *gpio, unsigned offset)
{
struct pinmux_data_reg *dummy;
unsigned long flags;
int bit;

gpio->flags &= ~PINMUX_FLAG_TYPE;
Expand All @@ -330,10 +327,7 @@ static void sh_pfc_map_one_gpio(struct sh_pfc *pfc, struct sh_pfc_pinctrl *pmx,
gpio->flags |= PINMUX_TYPE_GPIO;
else {
gpio->flags |= PINMUX_TYPE_FUNCTION;

spin_lock_irqsave(&pmx->lock, flags);
pmx->nr_functions++;
spin_unlock_irqrestore(&pmx->lock, flags);
}
}

Expand Down Expand Up @@ -381,25 +375,20 @@ static int sh_pfc_map_gpios(struct sh_pfc *pfc, struct sh_pfc_pinctrl *pmx)

static int sh_pfc_map_functions(struct sh_pfc *pfc, struct sh_pfc_pinctrl *pmx)
{
unsigned long flags;
int i, fn;

pmx->functions = devm_kzalloc(pfc->dev, pmx->nr_functions *
sizeof(*pmx->functions), GFP_KERNEL);
if (unlikely(!pmx->functions))
return -ENOMEM;

spin_lock_irqsave(&pmx->lock, flags);

for (i = fn = 0; i < pmx->nr_pads; i++) {
struct pinmux_gpio *gpio = pfc->info->gpios + i;

if ((gpio->flags & PINMUX_FLAG_TYPE) == PINMUX_TYPE_FUNCTION)
pmx->functions[fn++] = gpio;
}

spin_unlock_irqrestore(&pmx->lock, flags);

return 0;
}

Expand All @@ -412,8 +401,6 @@ int sh_pfc_register_pinctrl(struct sh_pfc *pfc)
if (unlikely(!pmx))
return -ENOMEM;

spin_lock_init(&pmx->lock);

pmx->pfc = pfc;
pfc->pinctrl = pmx;

Expand Down

0 comments on commit 4aa38b7

Please sign in to comment.