Skip to content

Commit ae2dc03

Browse files
committed
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
2 parents a86f69d + bd9d6e0 commit ae2dc03

File tree

5 files changed

+20
-22
lines changed

5 files changed

+20
-22
lines changed

drivers/pcmcia/cardbus.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
#include <linux/pci.h>
2323

2424
#include <pcmcia/ss.h>
25+
#include <pcmcia/cistpl.h>
2526

27+
#include "cs_internal.h"
2628

2729
static void cardbus_config_irq_and_cls(struct pci_bus *bus, int irq)
2830
{

drivers/pcmcia/cistpl.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include <pcmcia/ss.h>
2929
#include <pcmcia/cisreg.h>
3030
#include <pcmcia/cistpl.h>
31+
#include <pcmcia/ds.h>
3132
#include "cs_internal.h"
3233

3334
static const u_char mantissa[] = {

drivers/pcmcia/i82092.c

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -431,27 +431,25 @@ static int i82092aa_get_status(struct pcmcia_socket *socket, u_int *value)
431431

432432
/* IO cards have a different meaning of bits 0,1 */
433433
/* Also notice the inverse-logic on the bits */
434-
if (indirect_read(sock, I365_INTCTL) & I365_PC_IOCARD) {
435-
/* IO card */
436-
if (!(status & I365_CS_STSCHG))
437-
*value |= SS_STSCHG;
438-
} else { /* non I/O card */
439-
if (!(status & I365_CS_BVD1))
440-
*value |= SS_BATDEAD;
441-
if (!(status & I365_CS_BVD2))
442-
*value |= SS_BATWARN;
443-
444-
}
434+
if (indirect_read(sock, I365_INTCTL) & I365_PC_IOCARD) {
435+
/* IO card */
436+
if (!(status & I365_CS_STSCHG))
437+
*value |= SS_STSCHG;
438+
} else { /* non I/O card */
439+
if (!(status & I365_CS_BVD1))
440+
*value |= SS_BATDEAD;
441+
if (!(status & I365_CS_BVD2))
442+
*value |= SS_BATWARN;
443+
}
445444

446-
if (status & I365_CS_WRPROT)
447-
(*value) |= SS_WRPROT; /* card is write protected */
445+
if (status & I365_CS_WRPROT)
446+
(*value) |= SS_WRPROT; /* card is write protected */
448447

449-
if (status & I365_CS_READY)
450-
(*value) |= SS_READY; /* card is not busy */
448+
if (status & I365_CS_READY)
449+
(*value) |= SS_READY; /* card is not busy */
451450

452-
if (status & I365_CS_POWERON)
453-
(*value) |= SS_POWERON; /* power is applied to the card */
454-
451+
if (status & I365_CS_POWERON)
452+
(*value) |= SS_POWERON; /* power is applied to the card */
455453

456454
leave("i82092aa_get_status");
457455
return 0;

drivers/pcmcia/i82092aa.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,9 @@
88
#ifdef NOTRACE
99
#define enter(x) printk("Enter: %s, %s line %i\n",x,__FILE__,__LINE__)
1010
#define leave(x) printk("Leave: %s, %s line %i\n",x,__FILE__,__LINE__)
11-
#define dprintk(fmt, args...) printk(fmt , ## args)
1211
#else
1312
#define enter(x) do {} while (0)
1413
#define leave(x) do {} while (0)
15-
#define dprintk(fmt, args...) do {} while (0)
1614
#endif
1715

1816

drivers/pcmcia/yenta_socket.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,7 @@ static void exca_writew(struct yenta_socket *socket, unsigned reg, u16 val)
173173

174174
static ssize_t show_yenta_registers(struct device *yentadev, struct device_attribute *attr, char *buf)
175175
{
176-
struct pci_dev *dev = to_pci_dev(yentadev);
177-
struct yenta_socket *socket = pci_get_drvdata(dev);
176+
struct yenta_socket *socket = dev_get_drvdata(yentadev);
178177
int offset = 0, i;
179178

180179
offset = snprintf(buf, PAGE_SIZE, "CB registers:");

0 commit comments

Comments
 (0)