summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ssfdc.c
diff options
context:
space:
mode:
authorJon Hunter <jonathanh@nvidia.com>2016-06-16 16:27:41 +0100
committerLinus Walleij <linus.walleij@linaro.org>2016-06-18 10:40:15 +0200
commit98849fa0163e755ef2c4565c814bf08ffb5a2c4a (patch)
tree16eedfa5ba4b87ef030f42146c76d50769c8ef1e /drivers/mtd/ssfdc.c
parent1a7d1cb81eb2519de1359d35cbcade4da41b638d (diff)
downloadtalos-op-linux-98849fa0163e755ef2c4565c814bf08ffb5a2c4a.tar.gz
talos-op-linux-98849fa0163e755ef2c4565c814bf08ffb5a2c4a.zip
pinctrl: OF: Don't create a pinctrl handle if no pinctrl entries exist
When pinctrl_get() is called for a device, it will return a valid handle even if the device itself has no pinctrl state entries defined in device-tree. This is caused by the function pinctrl_dt_to_map() which will return success even if the first pinctrl state, 'pinctrl-0', is not found in the device-tree node for a device. According to the pinctrl device-tree binding documentation, pinctrl states must be numbered starting from 0 and so 'pinctrl-0' should always be present if a device uses pinctrl and therefore, if 'pinctrl-0' is not present it seems valid that we should not return a valid pinctrl handle. Fix this by returning an error code if the property 'pinctrl-0' is not present for a device. Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/mtd/ssfdc.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud