summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/pinmux.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pinctrl/pinmux.c')
-rw-r--r--drivers/pinctrl/pinmux.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/pinctrl/pinmux.c b/drivers/pinctrl/pinmux.c
index addba55334d9..aae71a37219b 100644
--- a/drivers/pinctrl/pinmux.c
+++ b/drivers/pinctrl/pinmux.c
@@ -796,7 +796,7 @@ pinmux_generic_get_function_name(struct pinctrl_dev *pctldev,
if (!function)
return NULL;
- return function->name;
+ return function->func.name;
}
EXPORT_SYMBOL_GPL(pinmux_generic_get_function_name);
@@ -805,12 +805,12 @@ EXPORT_SYMBOL_GPL(pinmux_generic_get_function_name);
* @pctldev: pin controller device
* @selector: function number
* @groups: array of pin groups
- * @num_groups: number of pin groups
+ * @ngroups: number of pin groups
*/
int pinmux_generic_get_function_groups(struct pinctrl_dev *pctldev,
unsigned int selector,
const char * const **groups,
- unsigned int * const num_groups)
+ unsigned int * const ngroups)
{
struct function_desc *function;
@@ -821,8 +821,8 @@ int pinmux_generic_get_function_groups(struct pinctrl_dev *pctldev,
__func__, selector);
return -EINVAL;
}
- *groups = function->group_names;
- *num_groups = function->num_group_names;
+ *groups = function->func.groups;
+ *ngroups = function->func.ngroups;
return 0;
}
@@ -852,13 +852,13 @@ EXPORT_SYMBOL_GPL(pinmux_generic_get_function);
* @pctldev: pin controller device
* @name: name of the function
* @groups: array of pin groups
- * @num_groups: number of pin groups
+ * @ngroups: number of pin groups
* @data: pin controller driver specific data
*/
int pinmux_generic_add_function(struct pinctrl_dev *pctldev,
const char *name,
const char * const *groups,
- const unsigned int num_groups,
+ const unsigned int ngroups,
void *data)
{
struct function_desc *function;
@@ -877,10 +877,7 @@ int pinmux_generic_add_function(struct pinctrl_dev *pctldev,
if (!function)
return -ENOMEM;
- function->name = name;
- function->group_names = groups;
- function->num_group_names = num_groups;
- function->data = data;
+ *function = PINCTRL_FUNCTION_DESC(name, groups, ngroups, data);
error = radix_tree_insert(&pctldev->pin_function_tree, selector, function);
if (error)