From: Antoine Ténart Date: Thu, 10 Apr 2014 13:07:50 +0000 (+0200) Subject: pinctrl: allows not to define the get_group_pins operation X-Git-Tag: omap-for-v3.16/fixes-against-rc1~39^2~31^2~61 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e5b3b2d9ed202697a937c282f9c4d93b1e3e0848;p=pandora-kernel.git pinctrl: allows not to define the get_group_pins operation When using a group only pinctrl driver, which does not have any information on the pins it is useless to define a get_group_pins always returning an empty list of pins. When not using get_group_pin[1], a driver must implement it so pins = NULL and num_pins = 0. This patch makes it the default behaviour if not defined in the pinctrl driver when used in pinmux enable and disable funtions and in pinctrl_groups_show. It also adds a check in pinctrl_get_group_pins and return -EINVAL if not defined. This function is called in the gpiolib when adding when pingroup range. It cannot be used if no group is defined, so this seams reasonable. [1] get_group_pin(struct pinctrl_dev *pctldev, unsigned selector, const unsigned **pins, unsigned *num_pins); Signed-off-by: Antoine Ténart Signed-off-by: Linus Walleij --- Reading git-diff-tree failed