Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9efeaaf9 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull pin control fixes from Linus Walleij:
 "This is a first set of pin control fixes for the v4.3 series.  Nothing
  special to say, business as usual.

   - Some IS_ERR() fixes from Julia Lawall.  I always wanted the
     compiler to catch these but error pointers by nailing them as an
     err pointer intrinsic type or something seem to be a "no can do".
     In any case, cocinelle is obviously up to the task, better than
     bugs staying around.

   - Better error handling for NULL GPIO chips.

   - Fix a compile error from the big irq desc refactoring.  I'm
     surprised the fallout wasn't bigger than this"

* tag 'pinctrl-v4.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
  pinctrl: samsung: s3c24xx: fix syntax error
  pinctrl: core: Warn about NULL gpio_chip in pinctrl_ready_for_gpio_range()
  pinctrl: join lines that can be a single line within 80 columns
  pinctrl: digicolor: convert null test to IS_ERR test
  pinctrl: qcom: ssbi: convert null test to IS_ERR test
parents d1291ebd fa84b52c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -349,6 +349,9 @@ static bool pinctrl_ready_for_gpio_range(unsigned gpio)
	struct pinctrl_gpio_range *range = NULL;
	struct gpio_chip *chip = gpio_to_chip(gpio);

	if (WARN(!chip, "no gpio_chip for gpio%i?", gpio))
		return false;

	mutex_lock(&pinctrldev_list_mutex);

	/* Loop over the pin controllers */
+2 −2
Original line number Diff line number Diff line
@@ -337,9 +337,9 @@ static int dc_pinctrl_probe(struct platform_device *pdev)
	pmap->dev = &pdev->dev;

	pmap->pctl = pinctrl_register(pctl_desc, &pdev->dev, pmap);
	if (!pmap->pctl) {
	if (IS_ERR(pmap->pctl)) {
		dev_err(&pdev->dev, "pinctrl driver registration failed\n");
		return -EINVAL;
		return PTR_ERR(pmap->pctl);
	}

	ret = dc_gpiochip_add(pmap, pdev->dev.of_node);
+1 −2
Original line number Diff line number Diff line
@@ -313,8 +313,7 @@ static int pinmux_func_name_to_selector(struct pinctrl_dev *pctldev,

	/* See if this pctldev has this function */
	while (selector < nfuncs) {
		const char *fname = ops->get_function_name(pctldev,
							   selector);
		const char *fname = ops->get_function_name(pctldev, selector);

		if (!strcmp(function, fname))
			return selector;
+2 −2
Original line number Diff line number Diff line
@@ -723,9 +723,9 @@ static int pm8xxx_gpio_probe(struct platform_device *pdev)
#endif

	pctrl->pctrl = pinctrl_register(&pctrl->desc, &pdev->dev, pctrl);
	if (!pctrl->pctrl) {
	if (IS_ERR(pctrl->pctrl)) {
		dev_err(&pdev->dev, "couldn't register pm8xxx gpio driver\n");
		return -ENODEV;
		return PTR_ERR(pctrl->pctrl);
	}

	pctrl->chip = pm8xxx_gpio_template;
+2 −2
Original line number Diff line number Diff line
@@ -814,9 +814,9 @@ static int pm8xxx_mpp_probe(struct platform_device *pdev)
#endif

	pctrl->pctrl = pinctrl_register(&pctrl->desc, &pdev->dev, pctrl);
	if (!pctrl->pctrl) {
	if (IS_ERR(pctrl->pctrl)) {
		dev_err(&pdev->dev, "couldn't register pm8xxx mpp driver\n");
		return -ENODEV;
		return PTR_ERR(pctrl->pctrl);
	}

	pctrl->chip = pm8xxx_mpp_template;
Loading