pinctrl: mcp23s08: fix probing of mcp23s18
authorPhil Reid <preid@electromag.com.au>
Mon, 19 Feb 2018 09:25:18 +0000 (17:25 +0800)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 22 Feb 2018 15:04:26 +0000 (16:04 +0100)
one_regmap_config is always null if mcp type is MCP_TYPE_S18.
Remove the null check so that the mcp23s18 will probe.

Fixes: 1781af563aef66c2eb7cda ("pinctrl: mcp23s08: spi: Fix duplicate pinctrl debugfs entries")
Signed-off-by: Phil Reid <preid@electromag.com.au>
Reviewed-by: Jan Kundrát <jan.kundrat@cesnet.cz>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-mcp23s08.c

index f3f9f19..8327757 100644 (file)
@@ -823,8 +823,6 @@ static int mcp23s08_probe_one(struct mcp23s08 *mcp, struct device *dev,
                break;
 
        case MCP_TYPE_S18:
-               if (!one_regmap_config)
-                       return -ENOMEM;
                mcp->regmap = devm_regmap_init(dev, &mcp23sxx_spi_regmap, mcp,
                                               &mcp23x17_regmap);
                mcp->reg_shift = 1;