Skip to content

Commit

Permalink
pcmcia: CodingStyle fixes
Browse files Browse the repository at this point in the history
Fix several CodingStyle issues in drivers/pcmcia/ . checkpatch.pl no longer
reports errors in the PCMCIA core. The remaining warnings mostly relate to
wrong indent -- PCMCIA historically used 4 spaces --, to lines over 80
characters and to hundreds of typedefs. The cleanup of those will follow
in the future.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
  • Loading branch information
Dominik Brodowski committed Dec 7, 2009
1 parent e15c1c1 commit 9fea84f
Show file tree
Hide file tree
Showing 14 changed files with 485 additions and 387 deletions.
6 changes: 3 additions & 3 deletions drivers/pcmcia/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ config PCMCIA_IOCTL
If unsure, say Y.

config CARDBUS
bool "32-bit CardBus support"
bool "32-bit CardBus support"
depends on PCI
default y
---help---
Expand All @@ -87,8 +87,8 @@ config YENTA
select PCCARD_NONSTATIC
---help---
This option enables support for CardBus host bridges. Virtually
all modern PCMCIA bridges are CardBus compatible. A "bridge" is
the hardware inside your computer that PCMCIA cards are plugged
all modern PCMCIA bridges are CardBus compatible. A "bridge" is
the hardware inside your computer that PCMCIA cards are plugged
into.

To compile this driver as modules, choose M here: the
Expand Down
23 changes: 12 additions & 11 deletions drivers/pcmcia/cardbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
#include <linux/mm.h>
#include <linux/pci.h>
#include <linux/ioport.h>
#include <linux/io.h>
#include <asm/irq.h>
#include <asm/io.h>

#include <pcmcia/cs_types.h>
#include <pcmcia/ss.h>
Expand Down Expand Up @@ -58,7 +58,7 @@
image number and an offset within that image. xlate_rom_addr()
converts an image/offset address to an absolute offset from the
ROM's base address.
=====================================================================*/

static u_int xlate_rom_addr(void __iomem *b, u_int addr)
Expand All @@ -85,10 +85,10 @@ static u_int xlate_rom_addr(void __iomem *b, u_int addr)
These are similar to setup_cis_mem and release_cis_mem for 16-bit
cards. The "result" that is used externally is the cb_cis_virt
pointer in the struct pcmcia_socket structure.
=====================================================================*/

static void cb_release_cis_mem(struct pcmcia_socket * s)
static void cb_release_cis_mem(struct pcmcia_socket *s)
{
if (s->cb_cis_virt) {
dev_dbg(&s->dev, "cb_release_cis_mem()\n");
Expand All @@ -98,7 +98,7 @@ static void cb_release_cis_mem(struct pcmcia_socket * s)
}
}

static int cb_setup_cis_mem(struct pcmcia_socket * s, struct resource *res)
static int cb_setup_cis_mem(struct pcmcia_socket *s, struct resource *res)
{
unsigned int start, size;

Expand All @@ -124,10 +124,11 @@ static int cb_setup_cis_mem(struct pcmcia_socket * s, struct resource *res)
This is used by the CIS processing code to read CIS information
from a CardBus device.
=====================================================================*/

int read_cb_mem(struct pcmcia_socket * s, int space, u_int addr, u_int len, void *ptr)
int read_cb_mem(struct pcmcia_socket *s, int space, u_int addr, u_int len,
void *ptr)
{
struct pci_dev *dev;
struct resource *res;
Expand Down Expand Up @@ -181,7 +182,7 @@ int read_cb_mem(struct pcmcia_socket * s, int space, u_int addr, u_int len, void
cb_alloc() and cb_free() allocate and free the kernel data
structures for a Cardbus device, and handle the lowest level PCI
device setup issues.
=====================================================================*/

/*
Expand All @@ -207,14 +208,14 @@ static void cardbus_assign_irqs(struct pci_bus *bus, int irq)
}
}

int __ref cb_alloc(struct pcmcia_socket * s)
int __ref cb_alloc(struct pcmcia_socket *s)
{
struct pci_bus *bus = s->cb_dev->subordinate;
struct pci_dev *dev;
unsigned int max, pass;

s->functions = pci_scan_slot(bus, PCI_DEVFN(0, 0));
// pcibios_fixup_bus(bus);
/* pcibios_fixup_bus(bus); */

max = bus->secondary;
for (pass = 0; pass < 2; pass++)
Expand All @@ -241,7 +242,7 @@ int __ref cb_alloc(struct pcmcia_socket * s)
return 0;
}

void cb_free(struct pcmcia_socket * s)
void cb_free(struct pcmcia_socket *s)
{
struct pci_dev *bridge = s->cb_dev;

Expand Down
Loading

0 comments on commit 9fea84f

Please sign in to comment.