[PATCH 2/2] mfd stmpe: fix test for features

Sascha Hauer s.hauer at pengutronix.de
Thu Nov 29 14:02:48 EST 2012


Use '&' to test for the bit as it was intended.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 drivers/mfd/stmpe-i2c.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/stmpe-i2c.c b/drivers/mfd/stmpe-i2c.c
index 7d16842..9e4bbcc 100644
--- a/drivers/mfd/stmpe-i2c.c
+++ b/drivers/mfd/stmpe-i2c.c
@@ -132,7 +132,7 @@ static int stmpe_probe(struct device_d *dev)
 	i2c_ci->read_reg = stmpe_reg_read;
 	i2c_ci->write_reg = stmpe_reg_write;
 
-	if (pdata->blocks &= STMPE_BLOCK_GPIO)
+	if (pdata->blocks & STMPE_BLOCK_GPIO)
 		add_generic_device("stmpe-gpio", DEVICE_ID_DYNAMIC, NULL, 0, 0, IORESOURCE_MEM, i2c_ci);
 
 	devfs_create(&stmpe_dev->cdev);
-- 
1.7.10.4




More information about the barebox mailing list