Skip to content

Commit

Permalink
Merge branch 'pcmcia-next' of git://git.kernel.org/pub/scm/linux/kern…
Browse files Browse the repository at this point in the history
…el/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
  • Loading branch information
Linus Torvalds committed Nov 26, 2019
2 parents a86f69d + bd9d6e0 commit ae2dc03
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 22 deletions.
2 changes: 2 additions & 0 deletions drivers/pcmcia/cardbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
#include <linux/pci.h>

#include <pcmcia/ss.h>
#include <pcmcia/cistpl.h>

#include "cs_internal.h"

static void cardbus_config_irq_and_cls(struct pci_bus *bus, int irq)
{
Expand Down
1 change: 1 addition & 0 deletions drivers/pcmcia/cistpl.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <pcmcia/ss.h>
#include <pcmcia/cisreg.h>
#include <pcmcia/cistpl.h>
#include <pcmcia/ds.h>
#include "cs_internal.h"

static const u_char mantissa[] = {
Expand Down
34 changes: 16 additions & 18 deletions drivers/pcmcia/i82092.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions drivers/pcmcia/i82092aa.h
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
3 changes: 1 addition & 2 deletions drivers/pcmcia/yenta_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:");
Expand Down

0 comments on commit ae2dc03

Please sign in to comment.