aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/i82092.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-11-25 21:35:46 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2019-11-25 21:35:46 -0800
commitae2dc032773da914911f4e2a6075f31d1cbc9ca0 (patch)
treec6ef50f480be3c60ca64fc378ef67fd79b313f1a /drivers/pcmcia/i82092.c
parentMerge tag 'spi-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi (diff)
parentpcmcia: remove unused dprintk definition (diff)
downloadlinux-dev-ae2dc032773da914911f4e2a6075f31d1cbc9ca0.tar.xz
linux-dev-ae2dc032773da914911f4e2a6075f31d1cbc9ca0.zip
Merge branch 'pcmcia-next' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux
Pull pcmcia updates from Dominik Brodowski: "Just a few odd fixes and improvements to the PCMCIA core" * 'pcmcia-next' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux: pcmcia: remove unused dprintk definition pcmcia: include <pcmcia/ds.h> for pcmcia_parse_tuple pcmcia: include cs_internal.h for missing declarations pcmcia: Use dev_get_drvdata where possible pcmcia: clean an indentation issues, remove extraneous spaces
Diffstat (limited to 'drivers/pcmcia/i82092.c')
-rw-r--r--drivers/pcmcia/i82092.c34
1 files changed, 16 insertions, 18 deletions
diff --git a/drivers/pcmcia/i82092.c b/drivers/pcmcia/i82092.c
index 245d60189375..aad8a46605be 100644
--- a/drivers/pcmcia/i82092.c
+++ b/drivers/pcmcia/i82092.c
@@ -431,27 +431,25 @@ static int i82092aa_get_status(struct pcmcia_socket *socket, u_int *value)
/* IO cards have a different meaning of bits 0,1 */
/* Also notice the inverse-logic on the bits */
- if (indirect_read(sock, I365_INTCTL) & I365_PC_IOCARD) {
- /* IO card */
- if (!(status & I365_CS_STSCHG))
- *value |= SS_STSCHG;
- } else { /* non I/O card */
- if (!(status & I365_CS_BVD1))
- *value |= SS_BATDEAD;
- if (!(status & I365_CS_BVD2))
- *value |= SS_BATWARN;
-
- }
+ if (indirect_read(sock, I365_INTCTL) & I365_PC_IOCARD) {
+ /* IO card */
+ if (!(status & I365_CS_STSCHG))
+ *value |= SS_STSCHG;
+ } else { /* non I/O card */
+ if (!(status & I365_CS_BVD1))
+ *value |= SS_BATDEAD;
+ if (!(status & I365_CS_BVD2))
+ *value |= SS_BATWARN;
+ }
- if (status & I365_CS_WRPROT)
- (*value) |= SS_WRPROT; /* card is write protected */
+ if (status & I365_CS_WRPROT)
+ (*value) |= SS_WRPROT; /* card is write protected */
- if (status & I365_CS_READY)
- (*value) |= SS_READY; /* card is not busy */
+ if (status & I365_CS_READY)
+ (*value) |= SS_READY; /* card is not busy */
- if (status & I365_CS_POWERON)
- (*value) |= SS_POWERON; /* power is applied to the card */
-
+ if (status & I365_CS_POWERON)
+ (*value) |= SS_POWERON; /* power is applied to the card */
leave("i82092aa_get_status");
return 0;