aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2006-01-15 10:26:00 -0500
committerDominik Brodowski <linux@dominikbrodowski.net>2006-03-31 10:15:56 -0500
commita78f4dd331a4f6a396eb5849656a4a72a70a56d7 (patch)
tree6dbd9cc08ec80ace397d69ddd6e6f59b575639b4
parent70294b468302fd7a0a99dad935c7ba5322989345 (diff)
[PATCH] pcmcia: rename pcmcia_device.state
Rename pcmcia_device.state (which is used in very few places) to p_state in order to avoid a namespace collision when moving the deprecated dev_link_t into struct pcmcia_device Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
-rw-r--r--drivers/pcmcia/ds.c12
-rw-r--r--drivers/pcmcia/pcmcia_resource.c24
-rw-r--r--include/pcmcia/ds.h2
3 files changed, 19 insertions, 19 deletions
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c
index ec2d4166a2e3..488448a12b2f 100644
--- a/drivers/pcmcia/ds.c
+++ b/drivers/pcmcia/ds.c
@@ -390,7 +390,7 @@ static int pcmcia_device_probe(struct device * dev)
390 goto put_dev; 390 goto put_dev;
391 } 391 }
392 392
393 p_dev->state &= ~CLIENT_UNBOUND; 393 p_dev->p_state &= ~CLIENT_UNBOUND;
394 394
395 ret = p_drv->probe(p_dev); 395 ret = p_drv->probe(p_dev);
396 if (ret) 396 if (ret)
@@ -433,17 +433,17 @@ static int pcmcia_device_remove(struct device * dev)
433 p_drv->remove(p_dev); 433 p_drv->remove(p_dev);
434 434
435 /* check for proper unloading */ 435 /* check for proper unloading */
436 if (p_dev->state & (CLIENT_IRQ_REQ|CLIENT_IO_REQ|CLIENT_CONFIG_LOCKED)) 436 if (p_dev->p_state & (CLIENT_IRQ_REQ|CLIENT_IO_REQ|CLIENT_CONFIG_LOCKED))
437 printk(KERN_INFO "pcmcia: driver %s did not release config properly\n", 437 printk(KERN_INFO "pcmcia: driver %s did not release config properly\n",
438 p_drv->drv.name); 438 p_drv->drv.name);
439 439
440 for (i = 0; i < MAX_WIN; i++) 440 for (i = 0; i < MAX_WIN; i++)
441 if (p_dev->state & CLIENT_WIN_REQ(i)) 441 if (p_dev->p_state & CLIENT_WIN_REQ(i))
442 printk(KERN_INFO "pcmcia: driver %s did not release windows properly\n", 442 printk(KERN_INFO "pcmcia: driver %s did not release windows properly\n",
443 p_drv->drv.name); 443 p_drv->drv.name);
444 444
445 /* references from pcmcia_probe_device */ 445 /* references from pcmcia_probe_device */
446 p_dev->state = CLIENT_UNBOUND; 446 p_dev->p_state = CLIENT_UNBOUND;
447 pcmcia_put_dev(p_dev); 447 pcmcia_put_dev(p_dev);
448 module_put(p_drv->owner); 448 module_put(p_drv->owner);
449 449
@@ -472,7 +472,7 @@ static void pcmcia_card_remove(struct pcmcia_socket *s)
472 } 472 }
473 p_dev = list_entry((&s->devices_list)->next, struct pcmcia_device, socket_device_list); 473 p_dev = list_entry((&s->devices_list)->next, struct pcmcia_device, socket_device_list);
474 list_del(&p_dev->socket_device_list); 474 list_del(&p_dev->socket_device_list);
475 p_dev->state |= CLIENT_STALE; 475 p_dev->p_state |= CLIENT_STALE;
476 spin_unlock_irqrestore(&pcmcia_dev_list_lock, flags); 476 spin_unlock_irqrestore(&pcmcia_dev_list_lock, flags);
477 477
478 device_unregister(&p_dev->dev); 478 device_unregister(&p_dev->dev);
@@ -602,7 +602,7 @@ struct pcmcia_device * pcmcia_device_add(struct pcmcia_socket *s, unsigned int f
602 sprintf (p_dev->devname, "pcmcia%s", p_dev->dev.bus_id); 602 sprintf (p_dev->devname, "pcmcia%s", p_dev->dev.bus_id);
603 603
604 /* compat */ 604 /* compat */
605 p_dev->state = CLIENT_UNBOUND; 605 p_dev->p_state = CLIENT_UNBOUND;
606 606
607 607
608 spin_lock_irqsave(&pcmcia_dev_list_lock, flags); 608 spin_lock_irqsave(&pcmcia_dev_list_lock, flags);
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c
index 17e2fbf26e14..ab0bbb6207b2 100644
--- a/drivers/pcmcia/pcmcia_resource.c
+++ b/drivers/pcmcia/pcmcia_resource.c
@@ -476,8 +476,8 @@ int pcmcia_release_configuration(struct pcmcia_device *p_dev)
476 config_t *c = p_dev->function_config; 476 config_t *c = p_dev->function_config;
477 int i; 477 int i;
478 478
479 if (p_dev->state & CLIENT_CONFIG_LOCKED) { 479 if (p_dev->p_state & CLIENT_CONFIG_LOCKED) {
480 p_dev->state &= ~CLIENT_CONFIG_LOCKED; 480 p_dev->p_state &= ~CLIENT_CONFIG_LOCKED;
481 if (--(s->lock_count) == 0) { 481 if (--(s->lock_count) == 0) {
482 s->socket.flags = SS_OUTPUT_ENA; /* Is this correct? */ 482 s->socket.flags = SS_OUTPUT_ENA; /* Is this correct? */
483 s->socket.Vpp = 0; 483 s->socket.Vpp = 0;
@@ -516,10 +516,10 @@ int pcmcia_release_io(struct pcmcia_device *p_dev, io_req_t *req)
516 struct pcmcia_socket *s = p_dev->socket; 516 struct pcmcia_socket *s = p_dev->socket;
517 config_t *c = p_dev->function_config; 517 config_t *c = p_dev->function_config;
518 518
519 if (!(p_dev->state & CLIENT_IO_REQ)) 519 if (!(p_dev->p_state & CLIENT_IO_REQ))
520 return CS_BAD_HANDLE; 520 return CS_BAD_HANDLE;
521 521
522 p_dev->state &= ~CLIENT_IO_REQ; 522 p_dev->p_state &= ~CLIENT_IO_REQ;
523 523
524 if ((c->io.BasePort1 != req->BasePort1) || 524 if ((c->io.BasePort1 != req->BasePort1) ||
525 (c->io.NumPorts1 != req->NumPorts1) || 525 (c->io.NumPorts1 != req->NumPorts1) ||
@@ -542,9 +542,9 @@ int pcmcia_release_irq(struct pcmcia_device *p_dev, irq_req_t *req)
542 struct pcmcia_socket *s = p_dev->socket; 542 struct pcmcia_socket *s = p_dev->socket;
543 config_t *c= p_dev->function_config; 543 config_t *c= p_dev->function_config;
544 544
545 if (!(p_dev->state & CLIENT_IRQ_REQ)) 545 if (!(p_dev->p_state & CLIENT_IRQ_REQ))
546 return CS_BAD_HANDLE; 546 return CS_BAD_HANDLE;
547 p_dev->state &= ~CLIENT_IRQ_REQ; 547 p_dev->p_state &= ~CLIENT_IRQ_REQ;
548 548
549 if (c->state & CONFIG_LOCKED) 549 if (c->state & CONFIG_LOCKED)
550 return CS_CONFIGURATION_LOCKED; 550 return CS_CONFIGURATION_LOCKED;
@@ -576,7 +576,7 @@ int pcmcia_release_window(window_handle_t win)
576 if ((win == NULL) || (win->magic != WINDOW_MAGIC)) 576 if ((win == NULL) || (win->magic != WINDOW_MAGIC))
577 return CS_BAD_HANDLE; 577 return CS_BAD_HANDLE;
578 s = win->sock; 578 s = win->sock;
579 if (!(win->handle->state & CLIENT_WIN_REQ(win->index))) 579 if (!(win->handle->p_state & CLIENT_WIN_REQ(win->index)))
580 return CS_BAD_HANDLE; 580 return CS_BAD_HANDLE;
581 581
582 /* Shut down memory window */ 582 /* Shut down memory window */
@@ -590,7 +590,7 @@ int pcmcia_release_window(window_handle_t win)
590 kfree(win->ctl.res); 590 kfree(win->ctl.res);
591 win->ctl.res = NULL; 591 win->ctl.res = NULL;
592 } 592 }
593 win->handle->state &= ~CLIENT_WIN_REQ(win->index); 593 win->handle->p_state &= ~CLIENT_WIN_REQ(win->index);
594 594
595 win->magic = 0; 595 win->magic = 0;
596 596
@@ -708,7 +708,7 @@ int pcmcia_request_configuration(struct pcmcia_device *p_dev,
708 } 708 }
709 709
710 c->state |= CONFIG_LOCKED; 710 c->state |= CONFIG_LOCKED;
711 p_dev->state |= CLIENT_CONFIG_LOCKED; 711 p_dev->p_state |= CLIENT_CONFIG_LOCKED;
712 return CS_SUCCESS; 712 return CS_SUCCESS;
713} /* pcmcia_request_configuration */ 713} /* pcmcia_request_configuration */
714EXPORT_SYMBOL(pcmcia_request_configuration); 714EXPORT_SYMBOL(pcmcia_request_configuration);
@@ -754,7 +754,7 @@ int pcmcia_request_io(struct pcmcia_device *p_dev, io_req_t *req)
754 754
755 c->io = *req; 755 c->io = *req;
756 c->state |= CONFIG_IO_REQ; 756 c->state |= CONFIG_IO_REQ;
757 p_dev->state |= CLIENT_IO_REQ; 757 p_dev->p_state |= CLIENT_IO_REQ;
758 return CS_SUCCESS; 758 return CS_SUCCESS;
759} /* pcmcia_request_io */ 759} /* pcmcia_request_io */
760EXPORT_SYMBOL(pcmcia_request_io); 760EXPORT_SYMBOL(pcmcia_request_io);
@@ -850,7 +850,7 @@ int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req)
850 s->irq.Config++; 850 s->irq.Config++;
851 851
852 c->state |= CONFIG_IRQ_REQ; 852 c->state |= CONFIG_IRQ_REQ;
853 p_dev->state |= CLIENT_IRQ_REQ; 853 p_dev->p_state |= CLIENT_IRQ_REQ;
854 854
855#ifdef CONFIG_PCMCIA_PROBE 855#ifdef CONFIG_PCMCIA_PROBE
856 pcmcia_used_irq[irq]++; 856 pcmcia_used_irq[irq]++;
@@ -910,7 +910,7 @@ int pcmcia_request_window(struct pcmcia_device **p_dev, win_req_t *req, window_h
910 if (!win->ctl.res) 910 if (!win->ctl.res)
911 return CS_IN_USE; 911 return CS_IN_USE;
912 } 912 }
913 (*p_dev)->state |= CLIENT_WIN_REQ(w); 913 (*p_dev)->p_state |= CLIENT_WIN_REQ(w);
914 914
915 /* Configure the socket controller */ 915 /* Configure the socket controller */
916 win->ctl.map = w+1; 916 win->ctl.map = w+1;
diff --git a/include/pcmcia/ds.h b/include/pcmcia/ds.h
index 8a6a95ea26ec..7f712df3e297 100644
--- a/include/pcmcia/ds.h
+++ b/include/pcmcia/ds.h
@@ -166,7 +166,7 @@ struct pcmcia_device {
166 /* deprecated, a cleaned up version will be moved into this 166 /* deprecated, a cleaned up version will be moved into this
167 struct soon */ 167 struct soon */
168 dev_link_t *instance; 168 dev_link_t *instance;
169 u_int state; 169 u_int p_state;
170 170
171 /* information about this device */ 171 /* information about this device */
172 u8 has_manf_id:1; 172 u8 has_manf_id:1;