summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/pinctrl-mcp23s08.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2019-02-11 11:17:23 +0300
committerLinus Walleij <linus.walleij@linaro.org>2019-02-11 11:17:23 +0300
commite65372124cd749ebbe4ac2abe5a511d7d1ac68db (patch)
tree1f9fd7cec6ffba19c76fff1e82c562fa1adae5da /drivers/pinctrl/pinctrl-mcp23s08.c
parenta3240f09307ac978270d423b542f229e2ccc07b8 (diff)
parentd13937116f1e82bf508a6325111b322c30c85eb9 (diff)
downloadlinux-e65372124cd749ebbe4ac2abe5a511d7d1ac68db.tar.xz
Merge tag 'v5.0-rc6' into devel
Linux 5.0-rc6
Diffstat (limited to 'drivers/pinctrl/pinctrl-mcp23s08.c')
-rw-r--r--drivers/pinctrl/pinctrl-mcp23s08.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/pinctrl/pinctrl-mcp23s08.c b/drivers/pinctrl/pinctrl-mcp23s08.c
index 2047e03178a3..5d7a8514def9 100644
--- a/drivers/pinctrl/pinctrl-mcp23s08.c
+++ b/drivers/pinctrl/pinctrl-mcp23s08.c
@@ -824,8 +824,13 @@ static int mcp23s08_probe_one(struct mcp23s08 *mcp, struct device *dev,
break;
case MCP_TYPE_S18:
+ one_regmap_config =
+ devm_kmemdup(dev, &mcp23x17_regmap,
+ sizeof(struct regmap_config), GFP_KERNEL);
+ if (!one_regmap_config)
+ return -ENOMEM;
mcp->regmap = devm_regmap_init(dev, &mcp23sxx_spi_regmap, mcp,
- &mcp23x17_regmap);
+ one_regmap_config);
mcp->reg_shift = 1;
mcp->chip.ngpio = 16;
mcp->chip.label = "mcp23s18";