Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 302333
b: refs/heads/master
c: a1d31f7
h: refs/heads/master
i:
  302331: c109d2c
v: v3
  • Loading branch information
Dong Aisheng authored and Linus Walleij committed Apr 18, 2012
1 parent 11dcf17 commit 25fcd53
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 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: d1e90e9e7467dbfe521b25ba79f520bf676ebc36
refs/heads/master: a1d31f71e6ed2f714830df8885ec07dfe1f6632e
8 changes: 5 additions & 3 deletions trunk/drivers/pinctrl/pinmux.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,25 @@
int pinmux_check_ops(struct pinctrl_dev *pctldev)
{
const struct pinmux_ops *ops = pctldev->desc->pmxops;
unsigned nfuncs = ops->get_functions_count(pctldev);
unsigned nfuncs;
unsigned selector = 0;

/* Check that we implement required operations */
if (!ops->get_functions_count ||
if (!ops ||
!ops->get_functions_count ||
!ops->get_function_name ||
!ops->get_function_groups ||
!ops->enable ||
!ops->disable)
return -EINVAL;

/* Check that all functions registered have names */
nfuncs = ops->get_functions_count(pctldev);
while (selector < nfuncs) {
const char *fname = ops->get_function_name(pctldev,
selector);
if (!fname) {
pr_err("pinmux ops has no name for function%u\n",
dev_err(pctldev->dev, "pinmux ops has no name for function%u\n",
selector);
return -EINVAL;
}
Expand Down

0 comments on commit 25fcd53

Please sign in to comment.