aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia
diff options
context:
space:
mode:
authorHimangi Saraogi <himangi774@gmail.com>2014-08-06 12:36:25 -0400
committerDominik Brodowski <linux@dominikbrodowski.net>2015-05-30 09:55:36 -0400
commit3ce3c1c4fefa48f429a4379f729e44a9e6ba657a (patch)
treeb50d422e76fa0e6f51a01bc580a902505b7a27ff /drivers/pcmcia
parent8b0eb8377d3a2cbe242bb4d0a499d21cffe4c8b6 (diff)
pcmcia/vrc4171: Remove typedefs for enums and struct
The Linux kernel coding style guidelines suggest not using typedefs for structure and enum types. This patch gets rid of the typedefs for vrc4171_slot_t, vrc4171_slotb_t and vrc4171_socket_t. Also, the names of the enums and the struct are changed to drop the _t, to make the name look less typedef-like. The following Coccinelle semantic patch detects the cases for struct type: @tn@ identifier i; type td; @@ -typedef struct i { ... } -td ; @@ type tn.td; identifier tn.i; @@ -td + struct i Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r--drivers/pcmcia/vrc4171_card.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/pcmcia/vrc4171_card.c b/drivers/pcmcia/vrc4171_card.c
index 21973d55a055..1e5fa211fb70 100644
--- a/drivers/pcmcia/vrc4171_card.c
+++ b/drivers/pcmcia/vrc4171_card.c
@@ -84,32 +84,32 @@ MODULE_LICENSE("GPL");
84#define IO_MAX_MAPS 2 84#define IO_MAX_MAPS 2
85#define MEM_MAX_MAPS 5 85#define MEM_MAX_MAPS 5
86 86
87typedef enum { 87enum vrc4171_slot {
88 SLOT_PROBE = 0, 88 SLOT_PROBE = 0,
89 SLOT_NOPROBE_IO, 89 SLOT_NOPROBE_IO,
90 SLOT_NOPROBE_MEM, 90 SLOT_NOPROBE_MEM,
91 SLOT_NOPROBE_ALL, 91 SLOT_NOPROBE_ALL,
92 SLOT_INITIALIZED, 92 SLOT_INITIALIZED,
93} vrc4171_slot_t; 93};
94 94
95typedef enum { 95enum vrc4171_slotb {
96 SLOTB_IS_NONE, 96 SLOTB_IS_NONE,
97 SLOTB_IS_PCCARD, 97 SLOTB_IS_PCCARD,
98 SLOTB_IS_CF, 98 SLOTB_IS_CF,
99 SLOTB_IS_FLASHROM, 99 SLOTB_IS_FLASHROM,
100} vrc4171_slotb_t; 100};
101 101
102typedef struct vrc4171_socket { 102struct vrc4171_socket {
103 vrc4171_slot_t slot; 103 enum vrc4171_slot slot;
104 struct pcmcia_socket pcmcia_socket; 104 struct pcmcia_socket pcmcia_socket;
105 char name[24]; 105 char name[24];
106 int csc_irq; 106 int csc_irq;
107 int io_irq; 107 int io_irq;
108 spinlock_t lock; 108 spinlock_t lock;
109} vrc4171_socket_t; 109};
110 110
111static vrc4171_socket_t vrc4171_sockets[CARD_MAX_SLOTS]; 111static struct vrc4171_socket vrc4171_sockets[CARD_MAX_SLOTS];
112static vrc4171_slotb_t vrc4171_slotb = SLOTB_IS_NONE; 112static enum vrc4171_slotb vrc4171_slotb = SLOTB_IS_NONE;
113static char vrc4171_card_name[] = "NEC VRC4171 Card Controller"; 113static char vrc4171_card_name[] = "NEC VRC4171 Card Controller";
114static unsigned int vrc4171_irq; 114static unsigned int vrc4171_irq;
115static uint16_t vrc4171_irq_mask = 0xdeb8; 115static uint16_t vrc4171_irq_mask = 0xdeb8;
@@ -141,7 +141,7 @@ static inline uint16_t vrc4171_get_irq_status(void)
141 return inw(INTERRUPT_STATUS); 141 return inw(INTERRUPT_STATUS);
142} 142}
143 143
144static inline void vrc4171_set_multifunction_pin(vrc4171_slotb_t config) 144static inline void vrc4171_set_multifunction_pin(enum vrc4171_slotb config)
145{ 145{
146 uint16_t config1; 146 uint16_t config1;
147 147
@@ -234,7 +234,7 @@ static inline int search_nonuse_irq(void)
234 234
235static int pccard_init(struct pcmcia_socket *sock) 235static int pccard_init(struct pcmcia_socket *sock)
236{ 236{
237 vrc4171_socket_t *socket; 237 struct vrc4171_socket *socket;
238 unsigned int slot; 238 unsigned int slot;
239 239
240 sock->features |= SS_CAP_PCCARD | SS_CAP_PAGE_REGS; 240 sock->features |= SS_CAP_PCCARD | SS_CAP_PAGE_REGS;
@@ -317,7 +317,7 @@ static inline uint8_t set_Vcc_value(u_char Vcc)
317 317
318static int pccard_set_socket(struct pcmcia_socket *sock, socket_state_t *state) 318static int pccard_set_socket(struct pcmcia_socket *sock, socket_state_t *state)
319{ 319{
320 vrc4171_socket_t *socket; 320 struct vrc4171_socket *socket;
321 unsigned int slot; 321 unsigned int slot;
322 uint8_t voltage, power, control, cscint; 322 uint8_t voltage, power, control, cscint;
323 323
@@ -517,7 +517,7 @@ static inline unsigned int get_events(int slot)
517 517
518static irqreturn_t pccard_interrupt(int irq, void *dev_id) 518static irqreturn_t pccard_interrupt(int irq, void *dev_id)
519{ 519{
520 vrc4171_socket_t *socket; 520 struct vrc4171_socket *socket;
521 unsigned int events; 521 unsigned int events;
522 irqreturn_t retval = IRQ_NONE; 522 irqreturn_t retval = IRQ_NONE;
523 uint16_t status; 523 uint16_t status;
@@ -567,7 +567,7 @@ static inline void reserve_using_irq(int slot)
567 567
568static int vrc4171_add_sockets(void) 568static int vrc4171_add_sockets(void)
569{ 569{
570 vrc4171_socket_t *socket; 570 struct vrc4171_socket *socket;
571 int slot, retval; 571 int slot, retval;
572 572
573 for (slot = 0; slot < CARD_MAX_SLOTS; slot++) { 573 for (slot = 0; slot < CARD_MAX_SLOTS; slot++) {
@@ -617,7 +617,7 @@ static int vrc4171_add_sockets(void)
617 617
618static void vrc4171_remove_sockets(void) 618static void vrc4171_remove_sockets(void)
619{ 619{
620 vrc4171_socket_t *socket; 620 struct vrc4171_socket *socket;
621 int slot; 621 int slot;
622 622
623 for (slot = 0; slot < CARD_MAX_SLOTS; slot++) { 623 for (slot = 0; slot < CARD_MAX_SLOTS; slot++) {