Skip to content

Commit a78f4dd

Browse files
author
Dominik Brodowski
committed
[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 <[email protected]>
1 parent 70294b4 commit a78f4dd

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

drivers/pcmcia/ds.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ static int pcmcia_device_probe(struct device * dev)
390390
goto put_dev;
391391
}
392392

393-
p_dev->state &= ~CLIENT_UNBOUND;
393+
p_dev->p_state &= ~CLIENT_UNBOUND;
394394

395395
ret = p_drv->probe(p_dev);
396396
if (ret)
@@ -433,17 +433,17 @@ static int pcmcia_device_remove(struct device * dev)
433433
p_drv->remove(p_dev);
434434

435435
/* 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))
437437
printk(KERN_INFO "pcmcia: driver %s did not release config properly\n",
438438
p_drv->drv.name);
439439

440440
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))
442442
printk(KERN_INFO "pcmcia: driver %s did not release windows properly\n",
443443
p_drv->drv.name);
444444

445445
/* references from pcmcia_probe_device */
446-
p_dev->state = CLIENT_UNBOUND;
446+
p_dev->p_state = CLIENT_UNBOUND;
447447
pcmcia_put_dev(p_dev);
448448
module_put(p_drv->owner);
449449

@@ -472,7 +472,7 @@ static void pcmcia_card_remove(struct pcmcia_socket *s)
472472
}
473473
p_dev = list_entry((&s->devices_list)->next, struct pcmcia_device, socket_device_list);
474474
list_del(&p_dev->socket_device_list);
475-
p_dev->state |= CLIENT_STALE;
475+
p_dev->p_state |= CLIENT_STALE;
476476
spin_unlock_irqrestore(&pcmcia_dev_list_lock, flags);
477477

478478
device_unregister(&p_dev->dev);
@@ -602,7 +602,7 @@ struct pcmcia_device * pcmcia_device_add(struct pcmcia_socket *s, unsigned int f
602602
sprintf (p_dev->devname, "pcmcia%s", p_dev->dev.bus_id);
603603

604604
/* compat */
605-
p_dev->state = CLIENT_UNBOUND;
605+
p_dev->p_state = CLIENT_UNBOUND;
606606

607607

608608
spin_lock_irqsave(&pcmcia_dev_list_lock, flags);

drivers/pcmcia/pcmcia_resource.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -476,8 +476,8 @@ int pcmcia_release_configuration(struct pcmcia_device *p_dev)
476476
config_t *c = p_dev->function_config;
477477
int i;
478478

479-
if (p_dev->state & CLIENT_CONFIG_LOCKED) {
480-
p_dev->state &= ~CLIENT_CONFIG_LOCKED;
479+
if (p_dev->p_state & CLIENT_CONFIG_LOCKED) {
480+
p_dev->p_state &= ~CLIENT_CONFIG_LOCKED;
481481
if (--(s->lock_count) == 0) {
482482
s->socket.flags = SS_OUTPUT_ENA; /* Is this correct? */
483483
s->socket.Vpp = 0;
@@ -516,10 +516,10 @@ int pcmcia_release_io(struct pcmcia_device *p_dev, io_req_t *req)
516516
struct pcmcia_socket *s = p_dev->socket;
517517
config_t *c = p_dev->function_config;
518518

519-
if (!(p_dev->state & CLIENT_IO_REQ))
519+
if (!(p_dev->p_state & CLIENT_IO_REQ))
520520
return CS_BAD_HANDLE;
521521

522-
p_dev->state &= ~CLIENT_IO_REQ;
522+
p_dev->p_state &= ~CLIENT_IO_REQ;
523523

524524
if ((c->io.BasePort1 != req->BasePort1) ||
525525
(c->io.NumPorts1 != req->NumPorts1) ||
@@ -542,9 +542,9 @@ int pcmcia_release_irq(struct pcmcia_device *p_dev, irq_req_t *req)
542542
struct pcmcia_socket *s = p_dev->socket;
543543
config_t *c= p_dev->function_config;
544544

545-
if (!(p_dev->state & CLIENT_IRQ_REQ))
545+
if (!(p_dev->p_state & CLIENT_IRQ_REQ))
546546
return CS_BAD_HANDLE;
547-
p_dev->state &= ~CLIENT_IRQ_REQ;
547+
p_dev->p_state &= ~CLIENT_IRQ_REQ;
548548

549549
if (c->state & CONFIG_LOCKED)
550550
return CS_CONFIGURATION_LOCKED;
@@ -576,7 +576,7 @@ int pcmcia_release_window(window_handle_t win)
576576
if ((win == NULL) || (win->magic != WINDOW_MAGIC))
577577
return CS_BAD_HANDLE;
578578
s = win->sock;
579-
if (!(win->handle->state & CLIENT_WIN_REQ(win->index)))
579+
if (!(win->handle->p_state & CLIENT_WIN_REQ(win->index)))
580580
return CS_BAD_HANDLE;
581581

582582
/* Shut down memory window */
@@ -590,7 +590,7 @@ int pcmcia_release_window(window_handle_t win)
590590
kfree(win->ctl.res);
591591
win->ctl.res = NULL;
592592
}
593-
win->handle->state &= ~CLIENT_WIN_REQ(win->index);
593+
win->handle->p_state &= ~CLIENT_WIN_REQ(win->index);
594594

595595
win->magic = 0;
596596

@@ -708,7 +708,7 @@ int pcmcia_request_configuration(struct pcmcia_device *p_dev,
708708
}
709709

710710
c->state |= CONFIG_LOCKED;
711-
p_dev->state |= CLIENT_CONFIG_LOCKED;
711+
p_dev->p_state |= CLIENT_CONFIG_LOCKED;
712712
return CS_SUCCESS;
713713
} /* pcmcia_request_configuration */
714714
EXPORT_SYMBOL(pcmcia_request_configuration);
@@ -754,7 +754,7 @@ int pcmcia_request_io(struct pcmcia_device *p_dev, io_req_t *req)
754754

755755
c->io = *req;
756756
c->state |= CONFIG_IO_REQ;
757-
p_dev->state |= CLIENT_IO_REQ;
757+
p_dev->p_state |= CLIENT_IO_REQ;
758758
return CS_SUCCESS;
759759
} /* pcmcia_request_io */
760760
EXPORT_SYMBOL(pcmcia_request_io);
@@ -850,7 +850,7 @@ int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req)
850850
s->irq.Config++;
851851

852852
c->state |= CONFIG_IRQ_REQ;
853-
p_dev->state |= CLIENT_IRQ_REQ;
853+
p_dev->p_state |= CLIENT_IRQ_REQ;
854854

855855
#ifdef CONFIG_PCMCIA_PROBE
856856
pcmcia_used_irq[irq]++;
@@ -910,7 +910,7 @@ int pcmcia_request_window(struct pcmcia_device **p_dev, win_req_t *req, window_h
910910
if (!win->ctl.res)
911911
return CS_IN_USE;
912912
}
913-
(*p_dev)->state |= CLIENT_WIN_REQ(w);
913+
(*p_dev)->p_state |= CLIENT_WIN_REQ(w);
914914

915915
/* Configure the socket controller */
916916
win->ctl.map = w+1;

include/pcmcia/ds.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ struct pcmcia_device {
166166
/* deprecated, a cleaned up version will be moved into this
167167
struct soon */
168168
dev_link_t *instance;
169-
u_int state;
169+
u_int p_state;
170170

171171
/* information about this device */
172172
u8 has_manf_id:1;

0 commit comments

Comments
 (0)