Commit 2d29a7a7 authored by Bjorn Helgaas's avatar Bjorn Helgaas Committed by Andi Kleen

PNP: rename pnp_register_*_resource() local variables

No functional change; just rename "data" to something more
descriptive.
Signed-off-by: default avatarBjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
Acked-by: default avatarRene Herman <rene.herman@gmail.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent fe2cf598
...@@ -80,40 +80,40 @@ struct pnp_option *pnp_register_dependent_option(struct pnp_dev *dev, ...@@ -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, int pnp_register_irq_resource(struct pnp_dev *dev, struct pnp_option *option,
pnp_irq_mask_t *map, unsigned char flags) pnp_irq_mask_t *map, unsigned char flags)
{ {
struct pnp_irq *data, *ptr; struct pnp_irq *irq, *ptr;
#ifdef DEBUG #ifdef DEBUG
char buf[PNP_IRQ_NR]; /* hex-encoded, so this is overkill but safe */ char buf[PNP_IRQ_NR]; /* hex-encoded, so this is overkill but safe */
#endif #endif
data = kzalloc(sizeof(struct pnp_irq), GFP_KERNEL); irq = kzalloc(sizeof(struct pnp_irq), GFP_KERNEL);
if (!data) if (!irq)
return -ENOMEM; return -ENOMEM;
data->map = *map; irq->map = *map;
data->flags = flags; irq->flags = flags;
ptr = option->irq; ptr = option->irq;
while (ptr && ptr->next) while (ptr && ptr->next)
ptr = ptr->next; ptr = ptr->next;
if (ptr) if (ptr)
ptr->next = data; ptr->next = irq;
else else
option->irq = data; option->irq = irq;
#ifdef CONFIG_PCI #ifdef CONFIG_PCI
{ {
int i; int i;
for (i = 0; i < 16; 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); pcibios_penalize_isa_irq(i, 0);
} }
#endif #endif
#ifdef DEBUG #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, dev_dbg(&dev->dev, " irq bitmask %s flags %#x\n", buf,
data->flags); irq->flags);
#endif #endif
return 0; return 0;
} }
...@@ -121,25 +121,25 @@ int pnp_register_irq_resource(struct pnp_dev *dev, struct pnp_option *option, ...@@ -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, int pnp_register_dma_resource(struct pnp_dev *dev, struct pnp_option *option,
unsigned char map, unsigned char flags) unsigned char map, unsigned char flags)
{ {
struct pnp_dma *data, *ptr; struct pnp_dma *dma, *ptr;
data = kzalloc(sizeof(struct pnp_dma), GFP_KERNEL); dma = kzalloc(sizeof(struct pnp_dma), GFP_KERNEL);
if (!data) if (!dma)
return -ENOMEM; return -ENOMEM;
data->map = map; dma->map = map;
data->flags = flags; dma->flags = flags;
ptr = option->dma; ptr = option->dma;
while (ptr && ptr->next) while (ptr && ptr->next)
ptr = ptr->next; ptr = ptr->next;
if (ptr) if (ptr)
ptr->next = data; ptr->next = dma;
else else
option->dma = data; option->dma = dma;
dev_dbg(&dev->dev, " dma bitmask %#x flags %#x\n", data->map, dev_dbg(&dev->dev, " dma bitmask %#x flags %#x\n", dma->map,
data->flags); dma->flags);
return 0; return 0;
} }
...@@ -148,32 +148,32 @@ int pnp_register_port_resource(struct pnp_dev *dev, struct pnp_option *option, ...@@ -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, resource_size_t align, resource_size_t size,
unsigned char flags) unsigned char flags)
{ {
struct pnp_port *data, *ptr; struct pnp_port *port, *ptr;
data = kzalloc(sizeof(struct pnp_port), GFP_KERNEL); port = kzalloc(sizeof(struct pnp_port), GFP_KERNEL);
if (!data) if (!port)
return -ENOMEM; return -ENOMEM;
data->min = min; port->min = min;
data->max = max; port->max = max;
data->align = align; port->align = align;
data->size = size; port->size = size;
data->flags = flags; port->flags = flags;
ptr = option->port; ptr = option->port;
while (ptr && ptr->next) while (ptr && ptr->next)
ptr = ptr->next; ptr = ptr->next;
if (ptr) if (ptr)
ptr->next = data; ptr->next = port;
else else
option->port = data; option->port = port;
dev_dbg(&dev->dev, " io " dev_dbg(&dev->dev, " io "
"min %#llx max %#llx align %lld size %lld flags %#x\n", "min %#llx max %#llx align %lld size %lld flags %#x\n",
(unsigned long long) data->min, (unsigned long long) port->min,
(unsigned long long) data->max, (unsigned long long) port->max,
(unsigned long long) data->align, (unsigned long long) port->align,
(unsigned long long) data->size, data->flags); (unsigned long long) port->size, port->flags);
return 0; return 0;
} }
...@@ -182,32 +182,32 @@ int pnp_register_mem_resource(struct pnp_dev *dev, struct pnp_option *option, ...@@ -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, resource_size_t align, resource_size_t size,
unsigned char flags) unsigned char flags)
{ {
struct pnp_mem *data, *ptr; struct pnp_mem *mem, *ptr;
data = kzalloc(sizeof(struct pnp_mem), GFP_KERNEL); mem = kzalloc(sizeof(struct pnp_mem), GFP_KERNEL);
if (!data) if (!mem)
return -ENOMEM; return -ENOMEM;
data->min = min; mem->min = min;
data->max = max; mem->max = max;
data->align = align; mem->align = align;
data->size = size; mem->size = size;
data->flags = flags; mem->flags = flags;
ptr = option->mem; ptr = option->mem;
while (ptr && ptr->next) while (ptr && ptr->next)
ptr = ptr->next; ptr = ptr->next;
if (ptr) if (ptr)
ptr->next = data; ptr->next = mem;
else else
option->mem = data; option->mem = mem;
dev_dbg(&dev->dev, " mem " dev_dbg(&dev->dev, " mem "
"min %#llx max %#llx align %lld size %lld flags %#x\n", "min %#llx max %#llx align %lld size %lld flags %#x\n",
(unsigned long long) data->min, (unsigned long long) mem->min,
(unsigned long long) data->max, (unsigned long long) mem->max,
(unsigned long long) data->align, (unsigned long long) mem->align,
(unsigned long long) data->size, data->flags); (unsigned long long) mem->size, mem->flags);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment