summaryrefslogtreecommitdiff
path: root/drivers/pnp
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2008-06-27 16:57:13 -0600
committerAndi Kleen <andi@basil.nowhere.org>2008-07-16 23:27:07 +0200
commit2d29a7a794c5bae982955cd5dd0a76e766e57f39 (patch)
tree8ce750c1a8d2e0b8908bcbf24146216c8665b6bb /drivers/pnp
parentfe2cf598e6942abd8fb70fee230d74b1a1eae0d1 (diff)
downloadlinux-3.10-2d29a7a794c5bae982955cd5dd0a76e766e57f39.tar.gz
linux-3.10-2d29a7a794c5bae982955cd5dd0a76e766e57f39.tar.bz2
linux-3.10-2d29a7a794c5bae982955cd5dd0a76e766e57f39.zip
PNP: rename pnp_register_*_resource() local variables
No functional change; just rename "data" to something more descriptive. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Andi Kleen <ak@linux.intel.com> Acked-by: Rene Herman <rene.herman@gmail.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/pnp')
-rw-r--r--drivers/pnp/resource.c94
1 files changed, 47 insertions, 47 deletions
diff --git a/drivers/pnp/resource.c b/drivers/pnp/resource.c
index 61145491f36..a795864dc69 100644
--- a/drivers/pnp/resource.c
+++ b/drivers/pnp/resource.c
@@ -80,40 +80,40 @@ struct pnp_option *pnp_register_dependent_option(struct pnp_dev *dev,
int pnp_register_irq_resource(struct pnp_dev *dev, struct pnp_option *option,
pnp_irq_mask_t *map, unsigned char flags)
{
- struct pnp_irq *data, *ptr;
+ struct pnp_irq *irq, *ptr;
#ifdef DEBUG
char buf[PNP_IRQ_NR]; /* hex-encoded, so this is overkill but safe */
#endif
- data = kzalloc(sizeof(struct pnp_irq), GFP_KERNEL);
- if (!data)
+ irq = kzalloc(sizeof(struct pnp_irq), GFP_KERNEL);
+ if (!irq)
return -ENOMEM;
- data->map = *map;
- data->flags = flags;
+ irq->map = *map;
+ irq->flags = flags;
ptr = option->irq;
while (ptr && ptr->next)
ptr = ptr->next;
if (ptr)
- ptr->next = data;
+ ptr->next = irq;
else
- option->irq = data;
+ option->irq = irq;
#ifdef CONFIG_PCI
{
int i;
for (i = 0; i < 16; i++)
- if (test_bit(i, data->map.bits))
+ if (test_bit(i, irq->map.bits))
pcibios_penalize_isa_irq(i, 0);
}
#endif
#ifdef DEBUG
- bitmap_scnprintf(buf, sizeof(buf), data->map.bits, PNP_IRQ_NR);
+ bitmap_scnprintf(buf, sizeof(buf), irq->map.bits, PNP_IRQ_NR);
dev_dbg(&dev->dev, " irq bitmask %s flags %#x\n", buf,
- data->flags);
+ irq->flags);
#endif
return 0;
}
@@ -121,25 +121,25 @@ int pnp_register_irq_resource(struct pnp_dev *dev, struct pnp_option *option,
int pnp_register_dma_resource(struct pnp_dev *dev, struct pnp_option *option,
unsigned char map, unsigned char flags)
{
- struct pnp_dma *data, *ptr;
+ struct pnp_dma *dma, *ptr;
- data = kzalloc(sizeof(struct pnp_dma), GFP_KERNEL);
- if (!data)
+ dma = kzalloc(sizeof(struct pnp_dma), GFP_KERNEL);
+ if (!dma)
return -ENOMEM;
- data->map = map;
- data->flags = flags;
+ dma->map = map;
+ dma->flags = flags;
ptr = option->dma;
while (ptr && ptr->next)
ptr = ptr->next;
if (ptr)
- ptr->next = data;
+ ptr->next = dma;
else
- option->dma = data;
+ option->dma = dma;
- dev_dbg(&dev->dev, " dma bitmask %#x flags %#x\n", data->map,
- data->flags);
+ dev_dbg(&dev->dev, " dma bitmask %#x flags %#x\n", dma->map,
+ dma->flags);
return 0;
}
@@ -148,32 +148,32 @@ int pnp_register_port_resource(struct pnp_dev *dev, struct pnp_option *option,
resource_size_t align, resource_size_t size,
unsigned char flags)
{
- struct pnp_port *data, *ptr;
+ struct pnp_port *port, *ptr;
- data = kzalloc(sizeof(struct pnp_port), GFP_KERNEL);
- if (!data)
+ port = kzalloc(sizeof(struct pnp_port), GFP_KERNEL);
+ if (!port)
return -ENOMEM;
- data->min = min;
- data->max = max;
- data->align = align;
- data->size = size;
- data->flags = flags;
+ port->min = min;
+ port->max = max;
+ port->align = align;
+ port->size = size;
+ port->flags = flags;
ptr = option->port;
while (ptr && ptr->next)
ptr = ptr->next;
if (ptr)
- ptr->next = data;
+ ptr->next = port;
else
- option->port = data;
+ option->port = port;
dev_dbg(&dev->dev, " io "
"min %#llx max %#llx align %lld size %lld flags %#x\n",
- (unsigned long long) data->min,
- (unsigned long long) data->max,
- (unsigned long long) data->align,
- (unsigned long long) data->size, data->flags);
+ (unsigned long long) port->min,
+ (unsigned long long) port->max,
+ (unsigned long long) port->align,
+ (unsigned long long) port->size, port->flags);
return 0;
}
@@ -182,32 +182,32 @@ int pnp_register_mem_resource(struct pnp_dev *dev, struct pnp_option *option,
resource_size_t align, resource_size_t size,
unsigned char flags)
{
- struct pnp_mem *data, *ptr;
+ struct pnp_mem *mem, *ptr;
- data = kzalloc(sizeof(struct pnp_mem), GFP_KERNEL);
- if (!data)
+ mem = kzalloc(sizeof(struct pnp_mem), GFP_KERNEL);
+ if (!mem)
return -ENOMEM;
- data->min = min;
- data->max = max;
- data->align = align;
- data->size = size;
- data->flags = flags;
+ mem->min = min;
+ mem->max = max;
+ mem->align = align;
+ mem->size = size;
+ mem->flags = flags;
ptr = option->mem;
while (ptr && ptr->next)
ptr = ptr->next;
if (ptr)
- ptr->next = data;
+ ptr->next = mem;
else
- option->mem = data;
+ option->mem = mem;
dev_dbg(&dev->dev, " mem "
"min %#llx max %#llx align %lld size %lld flags %#x\n",
- (unsigned long long) data->min,
- (unsigned long long) data->max,
- (unsigned long long) data->align,
- (unsigned long long) data->size, data->flags);
+ (unsigned long long) mem->min,
+ (unsigned long long) mem->max,
+ (unsigned long long) mem->align,
+ (unsigned long long) mem->size, mem->flags);
return 0;
}