Commit dd47155a authored by Bartosz Golaszewski's avatar Bartosz Golaszewski Committed by Linus Walleij
Browse files

pinctrl: pinmux: open-code PINCTRL_FUNCTION_DESC()



This macro is only used in one place and pin function descriptors should
only be created by pinmux core so there's no point in exposing it to
other pinctrl users. Remove the macro and hand-code its functionality.

Signed-off-by: default avatarBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: default avatarBjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/20250709-pinctrl-gpio-pinfuncs-v2-1-b6135149c0d9@linaro.org


Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 63149542
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -891,7 +891,8 @@ int pinmux_generic_add_function(struct pinctrl_dev *pctldev,
	if (!function)
		return -ENOMEM;

	*function = PINCTRL_FUNCTION_DESC(name, groups, ngroups, data);
	function->func = PINCTRL_PINFUNCTION(name, groups, ngroups);
	function->data = data;

	error = radix_tree_insert(&pctldev->pin_function_tree, selector, function);
	if (error)
+0 −7
Original line number Diff line number Diff line
@@ -141,13 +141,6 @@ struct function_desc {
	void *data;
};

/* Convenient macro to define a generic pin function descriptor */
#define PINCTRL_FUNCTION_DESC(_name, _grps, _num_grps, _data)	\
(struct function_desc) {					\
	.func = PINCTRL_PINFUNCTION(_name, _grps, _num_grps),	\
	.data = _data,						\
}

int pinmux_generic_get_function_count(struct pinctrl_dev *pctldev);

const char *