From 84182fc7c16f3e882977879c464fa14f2561bfad Mon Sep 17 00:00:00 2001 From: Colin Ian King Date: Wed, 31 Oct 2018 16:46:02 +0000 Subject: pcmcia: clean an indentation issues, remove extraneous spaces Trivial fix to clean up indentation issues, remove spaces Signed-off-by: Colin Ian King Signed-off-by: Dominik Brodowski --- drivers/pcmcia/i82092.c | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) (limited to 'drivers') 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; -- cgit v1.2.3 From e2c05675979707b337b7af6319a9053bd286ed50 Mon Sep 17 00:00:00 2001 From: Chuhong Yuan Date: Wed, 24 Jul 2019 20:23:08 +0800 Subject: pcmcia: Use dev_get_drvdata where possible Instead of using to_pci_dev + pci_get_drvdata, use dev_get_drvdata to make code simpler. Signed-off-by: Chuhong Yuan Signed-off-by: Dominik Brodowski --- drivers/pcmcia/yenta_socket.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/pcmcia/yenta_socket.c b/drivers/pcmcia/yenta_socket.c index 810761ab8e9d..49b1c6a1bdbe 100644 --- a/drivers/pcmcia/yenta_socket.c +++ b/drivers/pcmcia/yenta_socket.c @@ -173,8 +173,7 @@ static void exca_writew(struct yenta_socket *socket, unsigned reg, u16 val) static ssize_t show_yenta_registers(struct device *yentadev, struct device_attribute *attr, char *buf) { - struct pci_dev *dev = to_pci_dev(yentadev); - struct yenta_socket *socket = pci_get_drvdata(dev); + struct yenta_socket *socket = dev_get_drvdata(yentadev); int offset = 0, i; offset = snprintf(buf, PAGE_SIZE, "CB registers:"); -- cgit v1.2.3 From 990a1b506d3d3a0cb9a0e141d23e76b31b560288 Mon Sep 17 00:00:00 2001 From: "Ben Dooks (Codethink)" Date: Thu, 17 Oct 2019 12:40:59 +0100 Subject: pcmcia: include cs_internal.h for missing declarations Include cs_internal.h (and pcmcia/cistpl.h as required by cs_internal.h) for the declearions of cb_alloc and cb_free to silence the following sparse warnings: drivers/pcmcia/cardbus.c:64:11: warning: symbol 'cb_alloc' was not declared. Should it be static? drivers/pcmcia/cardbus.c:103:6: warning: symbol 'cb_free' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: Dominik Brodowski --- drivers/pcmcia/cardbus.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers') diff --git a/drivers/pcmcia/cardbus.c b/drivers/pcmcia/cardbus.c index c502dfbf66e3..45c8252c8edc 100644 --- a/drivers/pcmcia/cardbus.c +++ b/drivers/pcmcia/cardbus.c @@ -22,7 +22,9 @@ #include #include +#include +#include "cs_internal.h" static void cardbus_config_irq_and_cls(struct pci_bus *bus, int irq) { -- cgit v1.2.3 From e469edbb0613d4923836c3df3c14f9850fa548ae Mon Sep 17 00:00:00 2001 From: "Ben Dooks (Codethink)" Date: Thu, 17 Oct 2019 12:44:47 +0100 Subject: pcmcia: include for pcmcia_parse_tuple Include for pcmcia_parse_tuple declaration to fix the following sparse warning: drivers/pcmcia/cistpl.c:1287:5: warning: symbol 'pcmcia_parse_tuple' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: Dominik Brodowski --- drivers/pcmcia/cistpl.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers') diff --git a/drivers/pcmcia/cistpl.c b/drivers/pcmcia/cistpl.c index 629359fe3513..cf109d9a1112 100644 --- a/drivers/pcmcia/cistpl.c +++ b/drivers/pcmcia/cistpl.c @@ -28,6 +28,7 @@ #include #include #include +#include #include "cs_internal.h" static const u_char mantissa[] = { -- cgit v1.2.3 From bd9d6e0371d147b710f549b55d7b44008264aa06 Mon Sep 17 00:00:00 2001 From: Dominik Brodowski Date: Thu, 21 Nov 2019 07:54:28 +0100 Subject: pcmcia: remove unused dprintk definition A recent cleanup patch removed the remaining users of dprintk() in i82092.c, so get rid of the definition of dprintk() as well. Fixes: 836e9494f448 ("pcmcia/i82092: Refactored dprintk macro for dev_dbg().") Signed-off-by: Dominik Brodowski --- drivers/pcmcia/i82092aa.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'drivers') diff --git a/drivers/pcmcia/i82092aa.h b/drivers/pcmcia/i82092aa.h index fabe08c3e33d..4586c43c78e2 100644 --- a/drivers/pcmcia/i82092aa.h +++ b/drivers/pcmcia/i82092aa.h @@ -8,11 +8,9 @@ #ifdef NOTRACE #define enter(x) printk("Enter: %s, %s line %i\n",x,__FILE__,__LINE__) #define leave(x) printk("Leave: %s, %s line %i\n",x,__FILE__,__LINE__) -#define dprintk(fmt, args...) printk(fmt , ## args) #else #define enter(x) do {} while (0) #define leave(x) do {} while (0) -#define dprintk(fmt, args...) do {} while (0) #endif -- cgit v1.2.3