mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-21 12:04:03 +08:00
This is a first set of pin control fixes for the v4.3 series:
- 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. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJV+VRDAAoJEEEQszewGV1z7UQP+wZi0VTV3VY04sbGxFe9NTCl BSXcFYoxq/6SMRkgewa47MIqEejO0q8Qq+2wE1HhUy4xiCSg5XLxCJGePqUGsglf 0GjUbTinXuc+HqEdR56xqz+H8RAjC5bqlUFOhXNPhpmAJlLvg6WL4t/08Dcd2N/9 RuoAlbPqzO8ingAvoj4r8cwF7/4pRojOvh/aFQ5jZ4aVriL04Uqnzdnf4OmplNIj gzEMICTIg6hQo0iWrKnn97DSHGR4UFKn7FQxF6g48tOIzE4hiWgfyXdpY6emG0Zi eeEH6y/kAk3V3kmNqLe83N8TLBiHvKoj33s/ZtFuLHoakeMcQR3B3FUodQWAEs8A 6bzB8bninXEU8h8eyOhly/0DIOM6rGTEyNgPcJI0F5CSfcB5uFdl5s+X4xEEiwKo Bsx1sfLKKI7p7lWXbML+7B+3JcgLr4E0yT6QsC9yA2AyHIgtZIBfp1hc82U9Qfgf lheT09XGGS+8uuECQuG3woI/qokZdHlnIGsY28sqEJVrSKyXoYSFZ03YZi2DEKsj 2qPJfpfEE6x6gMUsfh+u1oJlfYrJfSU+X4uBFJ9estLOX7J9y/nygULZutQFImZ1 hUBhFDnUiKe33oe4VuLplDt/KkQ1JGC32mgYsSVGTLzUS2/vyeTlYsLXxsohLgv6 0fec5ExVS9/JWJHwFwOf =xpIg -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
9efeaaf9a0
@ -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 */
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -361,7 +361,7 @@ static inline void s3c24xx_demux_eint(struct irq_desc *desc,
|
||||
u32 offset, u32 range)
|
||||
{
|
||||
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;
|
||||
unsigned int pend, mask;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user