[PATCH] pinctrl: mcp23s08: Fix MCP23S18 regression

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In commit 9b3e4207661e I introduced a regression on MCP23S18 where
probing would always fail with ENOMEM.

Unlike the xxx08 and xxx17 variants, the MCP23S18 does not support SPI
addressing, and therefore there are no duplicate debugfs entries for
this particular chip, ever. That's why this code should not care about
the one_regmap_config being NULL. That variable is not used in this
branch at all.

Sorry, and thanks for catching this early.

Signed-off-by: Jan Kundrát <jan.kundrat@xxxxxxxxx>
Reported-by: Phil Reid <preid@xxxxxxxxxxxxxxxxx>
Fixes: 9b3e4207661e ("pinctrl: mcp23s08: spi: Fix regmap debugfs entries")
---
 drivers/pinctrl/pinctrl-mcp23s08.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/pinctrl/pinctrl-mcp23s08.c b/drivers/pinctrl/pinctrl-mcp23s08.c
index 4d2e1874710c..c873747eceb3 100644
--- a/drivers/pinctrl/pinctrl-mcp23s08.c
+++ b/drivers/pinctrl/pinctrl-mcp23s08.c
@@ -821,8 +821,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;
-- 
2.14.3


--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux