[patch 20/21] pcmcia: remove typedef
Dominik Brodowski
linux at dominikbrodowski.de
Fri Dec 17 05:12:00 EST 2004
Remove the typedef'ing of struct resource_map.
Signed-off-by: Dominik Brodowski <linux at brodo.de>
---
drivers/pcmcia/rsrc_nonstatic.c | 28 +++++++++++++---------------
1 files changed, 13 insertions(+), 15 deletions(-)
Index: 2.6.10-rc3/drivers/pcmcia/rsrc_nonstatic.c
===================================================================
--- 2.6.10-rc3.orig/drivers/pcmcia/rsrc_nonstatic.c 2004-12-05 10:26:08.582299496 +0100
+++ 2.6.10-rc3/drivers/pcmcia/rsrc_nonstatic.c 2004-12-05 10:26:08.773270464 +0100
@@ -53,8 +53,6 @@
struct resource_map_t *next;
};
-typedef struct resource_map_t resource_map_t;
-
struct socket_data {
struct resource_map_t mem_db;
struct resource_map_t io_db;
@@ -123,9 +121,9 @@
======================================================================*/
-static int add_interval(resource_map_t *map, u_long base, u_long num)
+static int add_interval(struct resource_map_t *map, u_long base, u_long num)
{
- resource_map_t *p, *q;
+ struct resource_map_t *p, *q;
for (p = map; ; p = p->next) {
if ((p != map) && (p->base+p->num-1 >= base))
@@ -133,7 +131,7 @@
if ((p->next == map) || (p->next->base > base+num-1))
break;
}
- q = kmalloc(sizeof(resource_map_t), GFP_KERNEL);
+ q = kmalloc(sizeof(struct resource_map_t), GFP_KERNEL);
if (!q) return CS_OUT_OF_RESOURCE;
q->base = base; q->num = num;
q->next = p->next; p->next = q;
@@ -142,9 +140,9 @@
/*====================================================================*/
-static int sub_interval(resource_map_t *map, u_long base, u_long num)
+static int sub_interval(struct resource_map_t *map, u_long base, u_long num)
{
- resource_map_t *p, *q;
+ struct resource_map_t *p, *q;
for (p = map; ; p = q) {
q = p->next;
@@ -168,7 +166,7 @@
q->num = base - q->base;
} else {
/* Split the block into two pieces */
- p = kmalloc(sizeof(resource_map_t), GFP_KERNEL);
+ p = kmalloc(sizeof(struct resource_map_t), GFP_KERNEL);
if (!p) return CS_OUT_OF_RESOURCE;
p->base = base+num;
p->num = q->base+q->num - p->base;
@@ -401,7 +399,7 @@
#ifdef CONFIG_PCMCIA_PROBE
-static u_long inv_probe(resource_map_t *m, struct pcmcia_socket *s)
+static u_long inv_probe(struct resource_map_t *m, struct pcmcia_socket *s)
{
struct socket_data *s_data = s->resource_data;
u_long ok;
@@ -420,7 +418,7 @@
static void validate_mem(struct pcmcia_socket *s, unsigned int probe_mask)
{
- resource_map_t *m, mm;
+ struct resource_map_t *m, mm;
static u_char order[] = { 0xd0, 0xe0, 0xc0, 0xf0 };
u_long b, i, ok = 0;
struct socket_data *s_data = s->resource_data;
@@ -459,7 +457,7 @@
static void validate_mem(struct pcmcia_socket *s, unsigned int probe_mask)
{
- resource_map_t *m, mm;
+ struct resource_map_t *m, mm;
struct socket_data *s_data = s->resource_data;
for (m = s_data->mem_db.next; m != &s_data->mem_db; m = mm.next) {
@@ -506,7 +504,7 @@
struct pcmcia_align_data {
unsigned long mask;
unsigned long offset;
- resource_map_t *map;
+ struct resource_map_t *map;
};
static void
@@ -529,7 +527,7 @@
unsigned long size, unsigned long align)
{
struct pcmcia_align_data *data = align_data;
- resource_map_t *m;
+ struct resource_map_t *m;
pcmcia_common_align(data, res, size, align);
@@ -572,7 +570,7 @@
static int nonstatic_adjust_io_region(struct resource *res, unsigned long r_start,
unsigned long r_end, struct pcmcia_socket *s)
{
- resource_map_t *m;
+ struct resource_map_t *m;
struct socket_data *s_data = s->resource_data;
int ret = -ENOMEM;
@@ -791,7 +789,7 @@
static void nonstatic_release_resource_db(struct pcmcia_socket *s)
{
struct socket_data *data = s->resource_data;
- resource_map_t *p, *q;
+ struct resource_map_t *p, *q;
for (p = data->mem_db.next; p != &data->mem_db; p = q) {
q = p->next;
More information about the linux-pcmcia
mailing list