Re: [PATCH 1/3] pinctrl: core: create unlocked version of pinctrl_find_gpio_range_from_pin

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Feb 20, 2016 at 11:51 PM, Joachim Eastwood <manabian@xxxxxxxxx> wrote:

> pinctrl_find_gpio_range_from_pin takes the pctldev->mutex but so
> does pinconf_pins_show and this will cause a deadlock if
> pinctrl_find_gpio_range_from_pin is used in .pin_config_get
> callback.
>
> Create an unlocked version of pinctrl_find_gpio_range_from_pin to
> allow pin to gpio lookup to be used from pinconf_pins_show.
>
> Signed-off-by: Joachim Eastwood <manabian@xxxxxxxxx>

I understand that the function is needed and it's semantically
OK.

> +EXPORT_SYMBOL_GPL(__pinctrl_find_gpio_range_from_pin);
(...)
> +extern struct pinctrl_gpio_range *
> +__pinctrl_find_gpio_range_from_pin(struct pinctrl_dev *pctldev,
> +                                  unsigned int pin);
> +

This function name is NOT OK.

Rename it pinctrl_fund_gpio_range_from_pin_unlocked(),
The arbitrary uses of the __-prefix is one of my biggest confusions
when trying to understand code.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux