[patch 12/19] pcmcia: rename some functions
Dominik Brodowski
linux at dominikbrodowski.net
Sun Mar 20 05:43:58 EST 2005
Rename some functions in drivers/pcmcia/ to show they belong to the PCMCIA
subsystem.
Signed-off-by: Dominik Brodowski <linux at dominikbrodowski.net>
Index: 2.6.11+/drivers/pcmcia/cistpl.c
===================================================================
--- 2.6.11+.orig/drivers/pcmcia/cistpl.c 2005-03-10 08:50:41.000000000 +0100
+++ 2.6.11+/drivers/pcmcia/cistpl.c 2005-03-10 09:05:27.000000000 +0100
@@ -90,7 +90,7 @@
{
pccard_mem_map *mem = &s->cis_mem;
if (!(s->features & SS_CAP_STATIC_MAP) && mem->res == NULL) {
- mem->res = find_mem_region(0, s->map_size, s->map_size, 0, s);
+ mem->res = pcmcia_find_mem_region(0, s->map_size, s->map_size, 0, s);
if (mem->res == NULL) {
printk(KERN_NOTICE "cs: unable to map card memory!\n");
return NULL;
@@ -119,13 +119,13 @@
#define IS_ATTR 1
#define IS_INDIRECT 8
-int read_cis_mem(struct pcmcia_socket *s, int attr, u_int addr,
+int pcmcia_read_cis_mem(struct pcmcia_socket *s, int attr, u_int addr,
u_int len, void *ptr)
{
void __iomem *sys, *end;
unsigned char *buf = ptr;
- cs_dbg(s, 3, "read_cis_mem(%d, %#x, %u)\n", attr, addr, len);
+ cs_dbg(s, 3, "pcmcia_read_cis_mem(%d, %#x, %u)\n", attr, addr, len);
if (attr & IS_INDIRECT) {
/* Indirect accesses use a bunch of special registers at fixed
@@ -183,13 +183,13 @@
return 0;
}
-void write_cis_mem(struct pcmcia_socket *s, int attr, u_int addr,
+void pcmcia_write_cis_mem(struct pcmcia_socket *s, int attr, u_int addr,
u_int len, void *ptr)
{
void __iomem *sys, *end;
unsigned char *buf = ptr;
- cs_dbg(s, 3, "write_cis_mem(%d, %#x, %u)\n", attr, addr, len);
+ cs_dbg(s, 3, "pcmcia_write_cis_mem(%d, %#x, %u)\n", attr, addr, len);
if (attr & IS_INDIRECT) {
/* Indirect accesses use a bunch of special registers at fixed
@@ -274,7 +274,7 @@
ret = read_cb_mem(s, attr, addr, len, ptr);
else
#endif
- ret = read_cis_mem(s, attr, addr, len, ptr);
+ ret = pcmcia_read_cis_mem(s, attr, addr, len, ptr);
if (ret == 0) {
/* Copy data into the cache */
@@ -348,7 +348,7 @@
read_cb_mem(s, cis->attr, cis->addr, len, buf);
else
#endif
- read_cis_mem(s, cis->attr, cis->addr, len, buf);
+ pcmcia_read_cis_mem(s, cis->attr, cis->addr, len, buf);
if (memcmp(buf, cis->cache, len) != 0) {
kfree(buf);
Index: 2.6.11+/drivers/pcmcia/cs.c
===================================================================
--- 2.6.11+.orig/drivers/pcmcia/cs.c 2005-03-09 22:37:34.000000000 +0100
+++ 2.6.11+/drivers/pcmcia/cs.c 2005-03-10 09:05:51.000000000 +0100
@@ -771,7 +771,7 @@
return 1;
for (i = 0; i < MAX_IO_WIN; i++) {
if (s->io[i].NumPorts == 0) {
- s->io[i].res = find_io_region(*base, num, align, s);
+ s->io[i].res = pcmcia_find_io_region(*base, num, align, s);
if (s->io[i].res) {
s->io[i].Attributes = attr;
s->io[i].BasePort = *base = s->io[i].res->start;
@@ -784,7 +784,7 @@
/* Try to extend top of window */
try = s->io[i].BasePort + s->io[i].NumPorts;
if ((*base == 0) || (*base == try))
- if (adjust_io_region(s->io[i].res, s->io[i].res->start,
+ if (pcmcia_adjust_io_region(s->io[i].res, s->io[i].res->start,
s->io[i].res->end + num, s) == 0) {
*base = try;
s->io[i].NumPorts += num;
@@ -794,7 +794,7 @@
/* Try to extend bottom of window */
try = s->io[i].BasePort - num;
if ((*base == 0) || (*base == try))
- if (adjust_io_region(s->io[i].res, s->io[i].res->start - num,
+ if (pcmcia_adjust_io_region(s->io[i].res, s->io[i].res->start - num,
s->io[i].res->end, s) == 0) {
s->io[i].BasePort = *base = try;
s->io[i].NumPorts += num;
@@ -856,12 +856,12 @@
switch (reg->Action) {
case CS_READ:
- read_cis_mem(s, 1, addr, 1, &val);
+ pcmcia_read_cis_mem(s, 1, addr, 1, &val);
reg->Value = val;
break;
case CS_WRITE:
val = reg->Value;
- write_cis_mem(s, 1, addr, 1, &val);
+ pcmcia_write_cis_mem(s, 1, addr, 1, &val);
break;
default:
return CS_BAD_ARGS;
@@ -1034,7 +1034,7 @@
(c->IntType & (INT_MEMORY_AND_IO | INT_ZOOMED_VIDEO))) {
u_char reg;
if (c->Present & PRESENT_PIN_REPLACE) {
- read_cis_mem(s, 1, (c->ConfigBase+CISREG_PRR)>>1, 1, ®);
+ pcmcia_read_cis_mem(s, 1, (c->ConfigBase+CISREG_PRR)>>1, 1, ®);
status->CardState |=
(reg & PRR_WP_STATUS) ? CS_EVENT_WRITE_PROTECT : 0;
status->CardState |=
@@ -1048,7 +1048,7 @@
status->CardState |= CS_EVENT_READY_CHANGE;
}
if (c->Present & PRESENT_EXT_STATUS) {
- read_cis_mem(s, 1, (c->ConfigBase+CISREG_ESR)>>1, 1, ®);
+ pcmcia_read_cis_mem(s, 1, (c->ConfigBase+CISREG_ESR)>>1, 1, ®);
status->CardState |=
(reg & ESR_REQ_ATTN) ? CS_EVENT_REQUEST_ATTENTION : 0;
}
@@ -1385,7 +1385,7 @@
c->Present = c->CardValues = req->Present;
if (req->Present & PRESENT_COPY) {
c->Copy = req->Copy;
- write_cis_mem(s, 1, (base + CISREG_SCR)>>1, 1, &c->Copy);
+ pcmcia_write_cis_mem(s, 1, (base + CISREG_SCR)>>1, 1, &c->Copy);
}
if (req->Present & PRESENT_OPTION) {
if (s->functions == 1) {
@@ -1399,30 +1399,30 @@
if (c->state & CONFIG_IRQ_REQ)
if (!(c->irq.Attributes & IRQ_FORCED_PULSE))
c->Option |= COR_LEVEL_REQ;
- write_cis_mem(s, 1, (base + CISREG_COR)>>1, 1, &c->Option);
+ pcmcia_write_cis_mem(s, 1, (base + CISREG_COR)>>1, 1, &c->Option);
mdelay(40);
}
if (req->Present & PRESENT_STATUS) {
c->Status = req->Status;
- write_cis_mem(s, 1, (base + CISREG_CCSR)>>1, 1, &c->Status);
+ pcmcia_write_cis_mem(s, 1, (base + CISREG_CCSR)>>1, 1, &c->Status);
}
if (req->Present & PRESENT_PIN_REPLACE) {
c->Pin = req->Pin;
- write_cis_mem(s, 1, (base + CISREG_PRR)>>1, 1, &c->Pin);
+ pcmcia_write_cis_mem(s, 1, (base + CISREG_PRR)>>1, 1, &c->Pin);
}
if (req->Present & PRESENT_EXT_STATUS) {
c->ExtStatus = req->ExtStatus;
- write_cis_mem(s, 1, (base + CISREG_ESR)>>1, 1, &c->ExtStatus);
+ pcmcia_write_cis_mem(s, 1, (base + CISREG_ESR)>>1, 1, &c->ExtStatus);
}
if (req->Present & PRESENT_IOBASE_0) {
u_char b = c->io.BasePort1 & 0xff;
- write_cis_mem(s, 1, (base + CISREG_IOBASE_0)>>1, 1, &b);
+ pcmcia_write_cis_mem(s, 1, (base + CISREG_IOBASE_0)>>1, 1, &b);
b = (c->io.BasePort1 >> 8) & 0xff;
- write_cis_mem(s, 1, (base + CISREG_IOBASE_1)>>1, 1, &b);
+ pcmcia_write_cis_mem(s, 1, (base + CISREG_IOBASE_1)>>1, 1, &b);
}
if (req->Present & PRESENT_IOSIZE) {
u_char b = c->io.NumPorts1 + c->io.NumPorts2 - 1;
- write_cis_mem(s, 1, (base + CISREG_IOSIZE)>>1, 1, &b);
+ pcmcia_write_cis_mem(s, 1, (base + CISREG_IOSIZE)>>1, 1, &b);
}
/* Configure I/O windows */
@@ -1662,7 +1662,7 @@
win->sock = s;
if (!(s->features & SS_CAP_STATIC_MAP)) {
- win->ctl.res = find_mem_region(req->Base, req->Size, align,
+ win->ctl.res = pcmcia_find_mem_region(req->Base, req->Size, align,
(req->Attributes & WIN_MAP_BELOW_1MB), s);
if (!win->ctl.res)
return CS_IN_USE;
Index: 2.6.11+/drivers/pcmcia/cs_internal.h
===================================================================
--- 2.6.11+.orig/drivers/pcmcia/cs_internal.h 2005-03-09 22:38:21.000000000 +0100
+++ 2.6.11+/drivers/pcmcia/cs_internal.h 2005-03-10 09:07:10.000000000 +0100
@@ -123,9 +123,9 @@
int read_cb_mem(struct pcmcia_socket *s, int space, u_int addr, u_int len, void *ptr);
/* In cistpl.c */
-int read_cis_mem(struct pcmcia_socket *s, int attr,
+int pcmcia_read_cis_mem(struct pcmcia_socket *s, int attr,
u_int addr, u_int len, void *ptr);
-void write_cis_mem(struct pcmcia_socket *s, int attr,
+void pcmcia_write_cis_mem(struct pcmcia_socket *s, int attr,
u_int addr, u_int len, void *ptr);
void release_cis_mem(struct pcmcia_socket *s);
void destroy_cis_cache(struct pcmcia_socket *s);
@@ -134,13 +134,12 @@
/* In rsrc_mgr */
void pcmcia_validate_mem(struct pcmcia_socket *s);
-struct resource *find_io_region(unsigned long base, int num, unsigned long align,
+struct resource *pcmcia_find_io_region(unsigned long base, int num, unsigned long align,
struct pcmcia_socket *s);
-int adjust_io_region(struct resource *res, unsigned long r_start,
+int pcmcia_adjust_io_region(struct resource *res, unsigned long r_start,
unsigned long r_end, struct pcmcia_socket *s);
-struct resource *find_mem_region(u_long base, u_long num, u_long align,
+struct resource *pcmcia_find_mem_region(u_long base, u_long num, u_long align,
int low, struct pcmcia_socket *s);
-int adjust_resource_info(client_handle_t handle, adjust_t *adj);
void release_resource_db(struct pcmcia_socket *s);
/* In socket_sysfs.c */
Index: 2.6.11+/drivers/pcmcia/rsrc_mgr.c
===================================================================
--- 2.6.11+.orig/drivers/pcmcia/rsrc_mgr.c 2005-03-10 09:04:31.000000000 +0100
+++ 2.6.11+/drivers/pcmcia/rsrc_mgr.c 2005-03-10 09:04:53.000000000 +0100
@@ -105,7 +105,7 @@
}
EXPORT_SYMBOL(pcmcia_validate_mem);
-int adjust_io_region(struct resource *res, unsigned long r_start,
+int pcmcia_adjust_io_region(struct resource *res, unsigned long r_start,
unsigned long r_end, struct pcmcia_socket *s)
{
if (s->resource_ops->adjust_io_region)
@@ -113,7 +113,7 @@
return -ENOMEM;
}
-struct resource *find_io_region(unsigned long base, int num,
+struct resource *pcmcia_find_io_region(unsigned long base, int num,
unsigned long align, struct pcmcia_socket *s)
{
if (s->resource_ops->find_io)
@@ -121,7 +121,7 @@
return NULL;
}
-struct resource *find_mem_region(u_long base, u_long num, u_long align,
+struct resource *pcmcia_find_mem_region(u_long base, u_long num, u_long align,
int low, struct pcmcia_socket *s)
{
if (s->resource_ops->find_mem)
More information about the linux-pcmcia
mailing list