aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/pci_link.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2009-02-17 16:00:45 -0500
committerLen Brown <len.brown@intel.com>2009-03-17 01:52:18 -0400
commitc9d6244329c8149312dba27e78dc4a83b35a6ae5 (patch)
tree89db171926e1aee3b6886d48a20fcc7bcd2e7fc8 /drivers/acpi/pci_link.c
parent1c9ca3a7d41b5db884033900b539b9aeb61a399e (diff)
ACPI: pci_link: remove unnecessary casts and initializations
Remove unnecessary casts and initializations. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/pci_link.c')
-rw-r--r--drivers/acpi/pci_link.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
index 19bc3bcda602..b59f59efb72f 100644
--- a/drivers/acpi/pci_link.c
+++ b/drivers/acpi/pci_link.c
@@ -109,7 +109,7 @@ static acpi_status acpi_pci_link_check_possible(struct acpi_resource *resource,
109 void *context) 109 void *context)
110{ 110{
111 struct acpi_pci_link *link = context; 111 struct acpi_pci_link *link = context;
112 u32 i = 0; 112 u32 i;
113 113
114 switch (resource->type) { 114 switch (resource->type) {
115 case ACPI_RESOURCE_TYPE_START_DEPENDENT: 115 case ACPI_RESOURCE_TYPE_START_DEPENDENT:
@@ -199,7 +199,7 @@ static int acpi_pci_link_get_possible(struct acpi_pci_link *link)
199static acpi_status acpi_pci_link_check_current(struct acpi_resource *resource, 199static acpi_status acpi_pci_link_check_current(struct acpi_resource *resource,
200 void *context) 200 void *context)
201{ 201{
202 int *irq = (int *)context; 202 int *irq = context;
203 203
204 switch (resource->type) { 204 switch (resource->type) {
205 case ACPI_RESOURCE_TYPE_START_DEPENDENT: 205 case ACPI_RESOURCE_TYPE_START_DEPENDENT:
@@ -256,7 +256,7 @@ static acpi_status acpi_pci_link_check_current(struct acpi_resource *resource,
256static int acpi_pci_link_get_current(struct acpi_pci_link *link) 256static int acpi_pci_link_get_current(struct acpi_pci_link *link)
257{ 257{
258 int result = 0; 258 int result = 0;
259 acpi_status status = AE_OK; 259 acpi_status status;
260 int irq = 0; 260 int irq = 0;
261 261
262 if (!link) 262 if (!link)
@@ -306,8 +306,8 @@ static int acpi_pci_link_get_current(struct acpi_pci_link *link)
306 306
307static int acpi_pci_link_set(struct acpi_pci_link *link, int irq) 307static int acpi_pci_link_set(struct acpi_pci_link *link, int irq)
308{ 308{
309 int result = 0; 309 int result;
310 acpi_status status = AE_OK; 310 acpi_status status;
311 struct { 311 struct {
312 struct acpi_resource res; 312 struct acpi_resource res;
313 struct acpi_resource end; 313 struct acpi_resource end;
@@ -485,9 +485,9 @@ static int acpi_irq_penalty[ACPI_MAX_IRQS] = {
485 485
486int __init acpi_irq_penalty_init(void) 486int __init acpi_irq_penalty_init(void)
487{ 487{
488 struct list_head *node = NULL; 488 struct list_head *node;
489 struct acpi_pci_link *link = NULL; 489 struct acpi_pci_link *link;
490 int i = 0; 490 int i;
491 491
492 /* 492 /*
493 * Update penalties to facilitate IRQ balancing. 493 * Update penalties to facilitate IRQ balancing.
@@ -602,9 +602,9 @@ static int acpi_pci_link_allocate(struct acpi_pci_link *link)
602int acpi_pci_link_allocate_irq(acpi_handle handle, int index, int *triggering, 602int acpi_pci_link_allocate_irq(acpi_handle handle, int index, int *triggering,
603 int *polarity, char **name) 603 int *polarity, char **name)
604{ 604{
605 int result = 0; 605 int result;
606 struct acpi_device *device = NULL; 606 struct acpi_device *device;
607 struct acpi_pci_link *link = NULL; 607 struct acpi_pci_link *link;
608 608
609 result = acpi_bus_get_device(handle, &device); 609 result = acpi_bus_get_device(handle, &device);
610 if (result) { 610 if (result) {
@@ -656,8 +656,8 @@ int acpi_pci_link_allocate_irq(acpi_handle handle, int index, int *triggering,
656 */ 656 */
657int acpi_pci_link_free_irq(acpi_handle handle) 657int acpi_pci_link_free_irq(acpi_handle handle)
658{ 658{
659 struct acpi_device *device = NULL; 659 struct acpi_device *device;
660 struct acpi_pci_link *link = NULL; 660 struct acpi_pci_link *link;
661 acpi_status result; 661 acpi_status result;
662 662
663 result = acpi_bus_get_device(handle, &device); 663 result = acpi_bus_get_device(handle, &device);
@@ -707,9 +707,9 @@ int acpi_pci_link_free_irq(acpi_handle handle)
707 707
708static int acpi_pci_link_add(struct acpi_device *device) 708static int acpi_pci_link_add(struct acpi_device *device)
709{ 709{
710 int result = 0; 710 int result;
711 struct acpi_pci_link *link = NULL; 711 struct acpi_pci_link *link;
712 int i = 0; 712 int i;
713 int found = 0; 713 int found = 0;
714 714
715 if (!device) 715 if (!device)
@@ -777,8 +777,8 @@ static int acpi_pci_link_resume(struct acpi_pci_link *link)
777 777
778static int irqrouter_resume(struct sys_device *dev) 778static int irqrouter_resume(struct sys_device *dev)
779{ 779{
780 struct list_head *node = NULL; 780 struct list_head *node;
781 struct acpi_pci_link *link = NULL; 781 struct acpi_pci_link *link;
782 782
783 list_for_each(node, &acpi_link.entries) { 783 list_for_each(node, &acpi_link.entries) {
784 link = list_entry(node, struct acpi_pci_link, node); 784 link = list_entry(node, struct acpi_pci_link, node);
@@ -793,7 +793,7 @@ static int irqrouter_resume(struct sys_device *dev)
793 793
794static int acpi_pci_link_remove(struct acpi_device *device, int type) 794static int acpi_pci_link_remove(struct acpi_device *device, int type)
795{ 795{
796 struct acpi_pci_link *link = NULL; 796 struct acpi_pci_link *link;
797 797
798 if (!device || !acpi_driver_data(device)) 798 if (!device || !acpi_driver_data(device))
799 return -EINVAL; 799 return -EINVAL;