[PATCH 3/3] pcmcia: soc_common: fix SS_STSCHG polarity

Russell King rmk+kernel at armlinux.org.uk
Mon Aug 29 03:03:11 PDT 2016


SS_STSCHG should be set for an IO card when the BVD1 signal is asserted
low, not high.

Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
---
 drivers/pcmcia/soc_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pcmcia/soc_common.c b/drivers/pcmcia/soc_common.c
index eed5e9c05353..d5ca760c4eb2 100644
--- a/drivers/pcmcia/soc_common.c
+++ b/drivers/pcmcia/soc_common.c
@@ -235,7 +235,7 @@ static unsigned int soc_common_pcmcia_skt_state(struct soc_pcmcia_socket *skt)
 	stat |= skt->cs_state.Vcc ? SS_POWERON : 0;
 
 	if (skt->cs_state.flags & SS_IOCARD)
-		stat |= state.bvd1 ? SS_STSCHG : 0;
+		stat |= state.bvd1 ? 0 : SS_STSCHG;
 	else {
 		if (state.bvd1 == 0)
 			stat |= SS_BATDEAD;
-- 
2.1.0




More information about the linux-pcmcia mailing list