Message ID | 1392932279-25979-1-git-send-email-kamal@canonical.com |
---|---|
State | New |
Headers | show |
On Thu, 2014-02-20 at 13:37 -0800, Kamal Mostafa wrote: > This is a note to let you know that I have just added a patch titled > > pinctrl: do not init debugfs entries for unimplemented > > to the linux-3.8.y-queue branch of the 3.8.y.z extended stable tree > which can be found at: > > http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.8.y-queue > > This patch is scheduled to be released in version 3.8.13.19. Correction: I've dropped this patch from the 3.8-stable queue, per LKML discussions. -Kamal > If you, or anyone else, feels it should not be added to this tree, please > reply to this email. > > For more information about the 3.8.y.z tree, see > https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable > > Thanks. > -Kamal > > ------ > > From 552ee5aab241166904a2f1e4593bb9b7c2302b04 Mon Sep 17 00:00:00 2001 > From: Florian Vaussard <florian.vaussard@epfl.ch> > Date: Wed, 5 Feb 2014 07:51:22 +0100 > Subject: pinctrl: do not init debugfs entries for unimplemented > functionalities > > commit e7f2a444891cb39f11d5429467d0fd7e011fe7fe upstream. > > Commit c420619 "pinctrl: pinconf: remove checks on ops->pin_config_get" > removed the check on (ops != NULL) when performing pinconf_pins_show() or > pinconf_groups_show(). As these entries are always enabled, even if > pinconf is not supported, reading will result in an oops due to NULL > ops. > > Instead of checking for ops, remove the corresponding debugfs entries if > pinconf and/or pinmux are not implemented. > > Tested on OMAP3 (pinctrl-single). > > Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch> > Signed-off-by: Linus Walleij <linus.walleij@linaro.org> > Signed-off-by: Kamal Mostafa <kamal@canonical.com> > --- > drivers/pinctrl/core.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c > index 59f5a96..6fb08d9 100644 > --- a/drivers/pinctrl/core.c > +++ b/drivers/pinctrl/core.c > @@ -1377,8 +1377,10 @@ static void pinctrl_init_device_debugfs(struct pinctrl_dev *pctldev) > device_root, pctldev, &pinctrl_groups_ops); > debugfs_create_file("gpio-ranges", S_IFREG | S_IRUGO, > device_root, pctldev, &pinctrl_gpioranges_ops); > - pinmux_init_device_debugfs(device_root, pctldev); > - pinconf_init_device_debugfs(device_root, pctldev); > + if (pctldev->desc->pmxops) > + pinmux_init_device_debugfs(device_root, pctldev); > + if (pctldev->desc->confops) > + pinconf_init_device_debugfs(device_root, pctldev); > } > > static void pinctrl_remove_device_debugfs(struct pinctrl_dev *pctldev) > -- > 1.8.3.2 >
diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c index 59f5a96..6fb08d9 100644 --- a/drivers/pinctrl/core.c +++ b/drivers/pinctrl/core.c @@ -1377,8 +1377,10 @@ static void pinctrl_init_device_debugfs(struct pinctrl_dev *pctldev) device_root, pctldev, &pinctrl_groups_ops); debugfs_create_file("gpio-ranges", S_IFREG | S_IRUGO, device_root, pctldev, &pinctrl_gpioranges_ops); - pinmux_init_device_debugfs(device_root, pctldev); - pinconf_init_device_debugfs(device_root, pctldev); + if (pctldev->desc->pmxops) + pinmux_init_device_debugfs(device_root, pctldev); + if (pctldev->desc->confops) + pinconf_init_device_debugfs(device_root, pctldev); } static void pinctrl_remove_device_debugfs(struct pinctrl_dev *pctldev)