Commit 9efeaaf9 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'pinctrl-v4.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl

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
...@@ -349,6 +349,9 @@ static bool pinctrl_ready_for_gpio_range(unsigned gpio) ...@@ -349,6 +349,9 @@ static bool pinctrl_ready_for_gpio_range(unsigned gpio)
struct pinctrl_gpio_range *range = NULL; struct pinctrl_gpio_range *range = NULL;
struct gpio_chip *chip = gpio_to_chip(gpio); 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); mutex_lock(&pinctrldev_list_mutex);
/* Loop over the pin controllers */ /* Loop over the pin controllers */
......
...@@ -337,9 +337,9 @@ static int dc_pinctrl_probe(struct platform_device *pdev) ...@@ -337,9 +337,9 @@ static int dc_pinctrl_probe(struct platform_device *pdev)
pmap->dev = &pdev->dev; pmap->dev = &pdev->dev;
pmap->pctl = pinctrl_register(pctl_desc, &pdev->dev, pmap); 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"); 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); ret = dc_gpiochip_add(pmap, pdev->dev.of_node);
......
...@@ -313,8 +313,7 @@ static int pinmux_func_name_to_selector(struct pinctrl_dev *pctldev, ...@@ -313,8 +313,7 @@ static int pinmux_func_name_to_selector(struct pinctrl_dev *pctldev,
/* See if this pctldev has this function */ /* See if this pctldev has this function */
while (selector < nfuncs) { while (selector < nfuncs) {
const char *fname = ops->get_function_name(pctldev, const char *fname = ops->get_function_name(pctldev, selector);
selector);
if (!strcmp(function, fname)) if (!strcmp(function, fname))
return selector; return selector;
......
...@@ -723,9 +723,9 @@ static int pm8xxx_gpio_probe(struct platform_device *pdev) ...@@ -723,9 +723,9 @@ static int pm8xxx_gpio_probe(struct platform_device *pdev)
#endif #endif
pctrl->pctrl = pinctrl_register(&pctrl->desc, &pdev->dev, pctrl); 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"); dev_err(&pdev->dev, "couldn't register pm8xxx gpio driver\n");
return -ENODEV; return PTR_ERR(pctrl->pctrl);
} }
pctrl->chip = pm8xxx_gpio_template; pctrl->chip = pm8xxx_gpio_template;
......
...@@ -814,9 +814,9 @@ static int pm8xxx_mpp_probe(struct platform_device *pdev) ...@@ -814,9 +814,9 @@ static int pm8xxx_mpp_probe(struct platform_device *pdev)
#endif #endif
pctrl->pctrl = pinctrl_register(&pctrl->desc, &pdev->dev, pctrl); 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"); dev_err(&pdev->dev, "couldn't register pm8xxx mpp driver\n");
return -ENODEV; return PTR_ERR(pctrl->pctrl);
} }
pctrl->chip = pm8xxx_mpp_template; pctrl->chip = pm8xxx_mpp_template;
......
...@@ -361,7 +361,7 @@ static inline void s3c24xx_demux_eint(struct irq_desc *desc, ...@@ -361,7 +361,7 @@ static inline void s3c24xx_demux_eint(struct irq_desc *desc,
u32 offset, u32 range) u32 offset, u32 range)
{ {
struct s3c24xx_eint_data *data = irq_desc_get_handler_data(desc); struct s3c24xx_eint_data *data = irq_desc_get_handler_data(desc);
struct irq_chip *chip = irq_desc_get_irq_chip(desc); struct irq_chip *chip = irq_desc_get_chip(desc);
struct samsung_pinctrl_drv_data *d = data->drvdata; struct samsung_pinctrl_drv_data *d = data->drvdata;
unsigned int pend, mask; unsigned int pend, mask;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment