ACPI: sbs: remove dead code
[linux-3.10.git] / drivers / acpi / pci_link.c
index 415b262..c9f526e 100644 (file)
 #include <acpi/acpi_drivers.h>
 
 #define _COMPONENT             ACPI_PCI_COMPONENT
-ACPI_MODULE_NAME("pci_link")
+ACPI_MODULE_NAME("pci_link");
 #define ACPI_PCI_LINK_CLASS            "pci_irq_routing"
-#define ACPI_PCI_LINK_HID              "PNP0C0F"
-#define ACPI_PCI_LINK_DRIVER_NAME      "ACPI PCI Interrupt Link Driver"
 #define ACPI_PCI_LINK_DEVICE_NAME      "PCI Interrupt Link"
 #define ACPI_PCI_LINK_FILE_INFO                "info"
 #define ACPI_PCI_LINK_FILE_STATUS      "state"
@@ -55,10 +53,16 @@ ACPI_MODULE_NAME("pci_link")
 static int acpi_pci_link_add(struct acpi_device *device);
 static int acpi_pci_link_remove(struct acpi_device *device, int type);
 
+static struct acpi_device_id link_device_ids[] = {
+       {"PNP0C0F", 0},
+       {"", 0},
+};
+MODULE_DEVICE_TABLE(acpi, link_device_ids);
+
 static struct acpi_driver acpi_pci_link_driver = {
-       .name = ACPI_PCI_LINK_DRIVER_NAME,
+       .name = "pci_link",
        .class = ACPI_PCI_LINK_CLASS,
-       .ids = ACPI_PCI_LINK_HID,
+       .ids = link_device_ids,
        .ops = {
                .add = acpi_pci_link_add,
                .remove = acpi_pci_link_remove,
@@ -83,7 +87,6 @@ struct acpi_pci_link_irq {
 struct acpi_pci_link {
        struct list_head node;
        struct acpi_device *device;
-       acpi_handle handle;
        struct acpi_pci_link_irq irq;
        int refcnt;
 };
@@ -104,27 +107,26 @@ DEFINE_MUTEX(acpi_link_lock);
 static acpi_status
 acpi_pci_link_check_possible(struct acpi_resource *resource, void *context)
 {
-       struct acpi_pci_link *link = (struct acpi_pci_link *)context;
+       struct acpi_pci_link *link = context;
        u32 i = 0;
 
-       ACPI_FUNCTION_TRACE("acpi_pci_link_check_possible");
 
        switch (resource->type) {
        case ACPI_RESOURCE_TYPE_START_DEPENDENT:
-               return_ACPI_STATUS(AE_OK);
+               return AE_OK;
        case ACPI_RESOURCE_TYPE_IRQ:
                {
                        struct acpi_resource_irq *p = &resource->data.irq;
                        if (!p || !p->interrupt_count) {
-                               ACPI_WARNING((AE_INFO, "Blank IRQ resource"));
-                               return_ACPI_STATUS(AE_OK);
+                               printk(KERN_WARNING PREFIX "Blank IRQ resource\n");
+                               return AE_OK;
                        }
                        for (i = 0;
                             (i < p->interrupt_count
                              && i < ACPI_PCI_LINK_MAX_POSSIBLE); i++) {
                                if (!p->interrupts[i]) {
-                                       ACPI_WARNING((AE_INFO, "Invalid IRQ %d",
-                                                     p->interrupts[i]));
+                                       printk(KERN_WARNING PREFIX "Invalid IRQ %d\n",
+                                                     p->interrupts[i]);
                                        continue;
                                }
                                link->irq.possible[i] = p->interrupts[i];
@@ -140,16 +142,16 @@ acpi_pci_link_check_possible(struct acpi_resource *resource, void *context)
                        struct acpi_resource_extended_irq *p =
                            &resource->data.extended_irq;
                        if (!p || !p->interrupt_count) {
-                               ACPI_WARNING((AE_INFO,
-                                             "Blank EXT IRQ resource"));
-                               return_ACPI_STATUS(AE_OK);
+                               printk(KERN_WARNING PREFIX
+                                             "Blank EXT IRQ resource\n");
+                               return AE_OK;
                        }
                        for (i = 0;
                             (i < p->interrupt_count
                              && i < ACPI_PCI_LINK_MAX_POSSIBLE); i++) {
                                if (!p->interrupts[i]) {
-                                       ACPI_WARNING((AE_INFO, "Invalid IRQ %d",
-                                                     p->interrupts[i]));
+                                       printk(KERN_WARNING PREFIX "Invalid IRQ %d\n",
+                                                     p->interrupts[i]);
                                        continue;
                                }
                                link->irq.possible[i] = p->interrupts[i];
@@ -161,34 +163,33 @@ acpi_pci_link_check_possible(struct acpi_resource *resource, void *context)
                        break;
                }
        default:
-               ACPI_ERROR((AE_INFO, "Resource is not an IRQ entry\n"));
-               return_ACPI_STATUS(AE_OK);
+               printk(KERN_ERR PREFIX "Resource is not an IRQ entry\n");
+               return AE_OK;
        }
 
-       return_ACPI_STATUS(AE_CTRL_TERMINATE);
+       return AE_CTRL_TERMINATE;
 }
 
 static int acpi_pci_link_get_possible(struct acpi_pci_link *link)
 {
        acpi_status status;
 
-       ACPI_FUNCTION_TRACE("acpi_pci_link_get_possible");
 
        if (!link)
-               return_VALUE(-EINVAL);
+               return -EINVAL;
 
-       status = acpi_walk_resources(link->handle, METHOD_NAME__PRS,
+       status = acpi_walk_resources(link->device->handle, METHOD_NAME__PRS,
                                     acpi_pci_link_check_possible, link);
        if (ACPI_FAILURE(status)) {
                ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PRS"));
-               return_VALUE(-ENODEV);
+               return -ENODEV;
        }
 
        ACPI_DEBUG_PRINT((ACPI_DB_INFO,
                          "Found %d possible IRQs\n",
                          link->irq.possible_count));
 
-       return_VALUE(0);
+       return 0;
 }
 
 static acpi_status
@@ -196,7 +197,6 @@ acpi_pci_link_check_current(struct acpi_resource *resource, void *context)
 {
        int *irq = (int *)context;
 
-       ACPI_FUNCTION_TRACE("acpi_pci_link_check_current");
 
        switch (resource->type) {
        case ACPI_RESOURCE_TYPE_IRQ:
@@ -209,7 +209,7 @@ acpi_pci_link_check_current(struct acpi_resource *resource, void *context)
                                 */
                                ACPI_DEBUG_PRINT((ACPI_DB_INFO,
                                                  "Blank IRQ resource\n"));
-                               return_ACPI_STATUS(AE_OK);
+                               return AE_OK;
                        }
                        *irq = p->interrupts[0];
                        break;
@@ -223,20 +223,20 @@ acpi_pci_link_check_current(struct acpi_resource *resource, void *context)
                                 * extended IRQ descriptors must
                                 * return at least 1 IRQ
                                 */
-                               ACPI_WARNING((AE_INFO,
-                                             "Blank EXT IRQ resource"));
-                               return_ACPI_STATUS(AE_OK);
+                               printk(KERN_WARNING PREFIX
+                                             "Blank EXT IRQ resource\n");
+                               return AE_OK;
                        }
                        *irq = p->interrupts[0];
                        break;
                }
                break;
        default:
-               ACPI_ERROR((AE_INFO, "Resource %d isn't an IRQ", resource->type));
+               printk(KERN_ERR PREFIX "Resource %d isn't an IRQ\n", resource->type);
        case ACPI_RESOURCE_TYPE_END_TAG:
-               return_ACPI_STATUS(AE_OK);
+               return AE_OK;
        }
-       return_ACPI_STATUS(AE_CTRL_TERMINATE);
+       return AE_CTRL_TERMINATE;
 }
 
 /*
@@ -252,10 +252,8 @@ static int acpi_pci_link_get_current(struct acpi_pci_link *link)
        acpi_status status = AE_OK;
        int irq = 0;
 
-       ACPI_FUNCTION_TRACE("acpi_pci_link_get_current");
-
-       if (!link || !link->handle)
-               return_VALUE(-EINVAL);
+       if (!link)
+               return -EINVAL;
 
        link->irq.active = 0;
 
@@ -264,13 +262,13 @@ static int acpi_pci_link_get_current(struct acpi_pci_link *link)
                /* Query _STA, set link->device->status */
                result = acpi_bus_get_status(link->device);
                if (result) {
-                       ACPI_ERROR((AE_INFO, "Unable to read status"));
+                       printk(KERN_ERR PREFIX "Unable to read status\n");
                        goto end;
                }
 
                if (!link->device->status.enabled) {
                        ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Link disabled\n"));
-                       return_VALUE(0);
+                       return 0;
                }
        }
 
@@ -278,7 +276,7 @@ static int acpi_pci_link_get_current(struct acpi_pci_link *link)
         * Query and parse _CRS to get the current IRQ assignment. 
         */
 
-       status = acpi_walk_resources(link->handle, METHOD_NAME__CRS,
+       status = acpi_walk_resources(link->device->handle, METHOD_NAME__CRS,
                                     acpi_pci_link_check_current, &irq);
        if (ACPI_FAILURE(status)) {
                ACPI_EXCEPTION((AE_INFO, status, "Evaluating _CRS"));
@@ -287,7 +285,7 @@ static int acpi_pci_link_get_current(struct acpi_pci_link *link)
        }
 
        if (acpi_strict && !irq) {
-               ACPI_ERROR((AE_INFO, "_CRS returned 0"));
+               printk(KERN_ERR PREFIX "_CRS returned 0\n");
                result = -ENODEV;
        }
 
@@ -296,7 +294,7 @@ static int acpi_pci_link_get_current(struct acpi_pci_link *link)
        ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Link at IRQ %d \n", link->irq.active));
 
       end:
-       return_VALUE(result);
+       return result;
 }
 
 static int acpi_pci_link_set(struct acpi_pci_link *link, int irq)
@@ -309,16 +307,14 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq)
        } *resource;
        struct acpi_buffer buffer = { 0, NULL };
 
-       ACPI_FUNCTION_TRACE("acpi_pci_link_set");
 
        if (!link || !irq)
-               return_VALUE(-EINVAL);
+               return -EINVAL;
 
-       resource = kmalloc(sizeof(*resource) + 1, GFP_ATOMIC);
+       resource = kzalloc(sizeof(*resource) + 1, irqs_disabled() ? GFP_ATOMIC: GFP_KERNEL);
        if (!resource)
-               return_VALUE(-ENOMEM);
+               return -ENOMEM;
 
-       memset(resource, 0, sizeof(*resource) + 1);
        buffer.length = sizeof(*resource) + 1;
        buffer.pointer = resource;
 
@@ -357,7 +353,7 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq)
                /* ignore resource_source, it's optional */
                break;
        default:
-               ACPI_ERROR((AE_INFO, "Invalid Resource_type %d\n", link->irq.resource_type));
+               printk(KERN_ERR PREFIX "Invalid Resource_type %d\n", link->irq.resource_type);
                result = -EINVAL;
                goto end;
 
@@ -365,7 +361,7 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq)
        resource->end.type = ACPI_RESOURCE_TYPE_END_TAG;
 
        /* Attempt to set the resource */
-       status = acpi_set_current_resources(link->handle, &buffer);
+       status = acpi_set_current_resources(link->device->handle, &buffer);
 
        /* check for total failure */
        if (ACPI_FAILURE(status)) {
@@ -377,14 +373,14 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq)
        /* Query _STA, set device->status */
        result = acpi_bus_get_status(link->device);
        if (result) {
-               ACPI_ERROR((AE_INFO, "Unable to read status"));
+               printk(KERN_ERR PREFIX "Unable to read status\n");
                goto end;
        }
        if (!link->device->status.enabled) {
-               ACPI_WARNING((AE_INFO,
-                             "%s [%s] disabled and referenced, BIOS bug",
+               printk(KERN_WARNING PREFIX
+                             "%s [%s] disabled and referenced, BIOS bug\n",
                              acpi_device_name(link->device),
-                             acpi_device_bid(link->device)));
+                             acpi_device_bid(link->device));
        }
 
        /* Query _CRS, set link->irq.active */
@@ -402,10 +398,10 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq)
                 * policy: when _CRS doesn't return what we just _SRS
                 * assume _SRS worked and override _CRS value.
                 */
-               ACPI_WARNING((AE_INFO,
-                             "%s [%s] BIOS reported IRQ %d, using IRQ %d",
+               printk(KERN_WARNING PREFIX
+                             "%s [%s] BIOS reported IRQ %d, using IRQ %d\n",
                              acpi_device_name(link->device),
-                             acpi_device_bid(link->device), link->irq.active, irq));
+                             acpi_device_bid(link->device), link->irq.active, irq);
                link->irq.active = irq;
        }
 
@@ -413,7 +409,7 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq)
 
       end:
        kfree(resource);
-       return_VALUE(result);
+       return result;
 }
 
 /* --------------------------------------------------------------------------
@@ -487,7 +483,6 @@ int __init acpi_irq_penalty_init(void)
        struct acpi_pci_link *link = NULL;
        int i = 0;
 
-       ACPI_FUNCTION_TRACE("acpi_irq_penalty_init");
 
        /*
         * Update penalties to facilitate IRQ balancing.
@@ -496,7 +491,7 @@ int __init acpi_irq_penalty_init(void)
 
                link = list_entry(node, struct acpi_pci_link, node);
                if (!link) {
-                       ACPI_ERROR((AE_INFO, "Invalid link context"));
+                       printk(KERN_ERR PREFIX "Invalid link context\n");
                        continue;
                }
 
@@ -522,9 +517,9 @@ int __init acpi_irq_penalty_init(void)
                }
        }
        /* Add a penalty for the SCI */
-       acpi_irq_penalty[acpi_fadt.sci_int] += PIRQ_PENALTY_PCI_USING;
+       acpi_irq_penalty[acpi_gbl_FADT.sci_interrupt] += PIRQ_PENALTY_PCI_USING;
 
-       return_VALUE(0);
+       return 0;
 }
 
 static int acpi_irq_balance;   /* 0: static, 1: balance */
@@ -534,13 +529,12 @@ static int acpi_pci_link_allocate(struct acpi_pci_link *link)
        int irq;
        int i;
 
-       ACPI_FUNCTION_TRACE("acpi_pci_link_allocate");
 
        if (link->irq.initialized) {
                if (link->refcnt == 0)
                        /* This means the link is disabled but initialized */
                        acpi_pci_link_set(link, link->irq.active);
-               return_VALUE(0);
+               return 0;
        }
 
        /*
@@ -555,8 +549,8 @@ static int acpi_pci_link_allocate(struct acpi_pci_link *link)
         */
        if (i == link->irq.possible_count) {
                if (acpi_strict)
-                       ACPI_WARNING((AE_INFO, "_CRS %d not found"
-                                     " in _PRS", link->irq.active));
+                       printk(KERN_WARNING PREFIX "_CRS %d not found"
+                                     " in _PRS\n", link->irq.active);
                link->irq.active = 0;
        }
 
@@ -583,11 +577,11 @@ static int acpi_pci_link_allocate(struct acpi_pci_link *link)
 
        /* Attempt to enable the link device at this IRQ. */
        if (acpi_pci_link_set(link, irq)) {
-               ACPI_ERROR((AE_INFO, "Unable to set IRQ for %s [%s]. "
-                           "Try pci=noacpi or acpi=off",
+               printk(KERN_ERR PREFIX "Unable to set IRQ for %s [%s]. "
+                           "Try pci=noacpi or acpi=off\n",
                            acpi_device_name(link->device),
-                           acpi_device_bid(link->device)));
-               return_VALUE(-ENODEV);
+                           acpi_device_bid(link->device));
+               return -ENODEV;
        } else {
                acpi_irq_penalty[link->irq.active] += PIRQ_PENALTY_PCI_USING;
                printk(PREFIX "%s [%s] enabled at IRQ %d\n",
@@ -597,7 +591,7 @@ static int acpi_pci_link_allocate(struct acpi_pci_link *link)
 
        link->irq.initialized = 1;
 
-       return_VALUE(0);
+       return 0;
 }
 
 /*
@@ -615,36 +609,35 @@ acpi_pci_link_allocate_irq(acpi_handle handle,
        struct acpi_device *device = NULL;
        struct acpi_pci_link *link = NULL;
 
-       ACPI_FUNCTION_TRACE("acpi_pci_link_allocate_irq");
 
        result = acpi_bus_get_device(handle, &device);
        if (result) {
-               ACPI_ERROR((AE_INFO, "Invalid link device"));
-               return_VALUE(-1);
+               printk(KERN_ERR PREFIX "Invalid link device\n");
+               return -1;
        }
 
-       link = (struct acpi_pci_link *)acpi_driver_data(device);
+       link = acpi_driver_data(device);
        if (!link) {
-               ACPI_ERROR((AE_INFO, "Invalid link context"));
-               return_VALUE(-1);
+               printk(KERN_ERR PREFIX "Invalid link context\n");
+               return -1;
        }
 
        /* TBD: Support multiple index (IRQ) entries per Link Device */
        if (index) {
-               ACPI_ERROR((AE_INFO, "Invalid index %d", index));
-               return_VALUE(-1);
+               printk(KERN_ERR PREFIX "Invalid index %d\n", index);
+               return -1;
        }
 
        mutex_lock(&acpi_link_lock);
        if (acpi_pci_link_allocate(link)) {
                mutex_unlock(&acpi_link_lock);
-               return_VALUE(-1);
+               return -1;
        }
 
        if (!link->irq.active) {
                mutex_unlock(&acpi_link_lock);
-               ACPI_ERROR((AE_INFO, "Link active IRQ is 0!"));
-               return_VALUE(-1);
+               printk(KERN_ERR PREFIX "Link active IRQ is 0!\n");
+               return -1;
        }
        link->refcnt++;
        mutex_unlock(&acpi_link_lock);
@@ -658,7 +651,7 @@ acpi_pci_link_allocate_irq(acpi_handle handle,
        ACPI_DEBUG_PRINT((ACPI_DB_INFO,
                          "Link %s is referenced\n",
                          acpi_device_bid(link->device)));
-       return_VALUE(link->irq.active);
+       return (link->irq.active);
 }
 
 /*
@@ -671,25 +664,24 @@ int acpi_pci_link_free_irq(acpi_handle handle)
        struct acpi_pci_link *link = NULL;
        acpi_status result;
 
-       ACPI_FUNCTION_TRACE("acpi_pci_link_free_irq");
 
        result = acpi_bus_get_device(handle, &device);
        if (result) {
-               ACPI_ERROR((AE_INFO, "Invalid link device"));
-               return_VALUE(-1);
+               printk(KERN_ERR PREFIX "Invalid link device\n");
+               return -1;
        }
 
-       link = (struct acpi_pci_link *)acpi_driver_data(device);
+       link = acpi_driver_data(device);
        if (!link) {
-               ACPI_ERROR((AE_INFO, "Invalid link context"));
-               return_VALUE(-1);
+               printk(KERN_ERR PREFIX "Invalid link context\n");
+               return -1;
        }
 
        mutex_lock(&acpi_link_lock);
        if (!link->irq.initialized) {
                mutex_unlock(&acpi_link_lock);
-               ACPI_ERROR((AE_INFO, "Link isn't initialized"));
-               return_VALUE(-1);
+               printk(KERN_ERR PREFIX "Link isn't initialized\n");
+               return -1;
        }
 #ifdef FUTURE_USE
        /*
@@ -708,10 +700,10 @@ int acpi_pci_link_free_irq(acpi_handle handle)
                          acpi_device_bid(link->device)));
 
        if (link->refcnt == 0) {
-               acpi_ut_evaluate_object(link->handle, "_DIS", 0, NULL);
+               acpi_ut_evaluate_object(link->device->handle, "_DIS", 0, NULL);
        }
        mutex_unlock(&acpi_link_lock);
-       return_VALUE(link->irq.active);
+       return (link->irq.active);
 }
 
 /* --------------------------------------------------------------------------
@@ -725,18 +717,15 @@ static int acpi_pci_link_add(struct acpi_device *device)
        int i = 0;
        int found = 0;
 
-       ACPI_FUNCTION_TRACE("acpi_pci_link_add");
 
        if (!device)
-               return_VALUE(-EINVAL);
+               return -EINVAL;
 
-       link = kmalloc(sizeof(struct acpi_pci_link), GFP_KERNEL);
+       link = kzalloc(sizeof(struct acpi_pci_link), GFP_KERNEL);
        if (!link)
-               return_VALUE(-ENOMEM);
-       memset(link, 0, sizeof(struct acpi_pci_link));
+               return -ENOMEM;
 
        link->device = device;
-       link->handle = device->handle;
        strcpy(acpi_device_name(device), ACPI_PCI_LINK_DEVICE_NAME);
        strcpy(acpi_device_class(device), ACPI_PCI_LINK_CLASS);
        acpi_driver_data(device) = link;
@@ -749,7 +738,7 @@ static int acpi_pci_link_add(struct acpi_device *device)
        /* query and set link->irq.active */
        acpi_pci_link_get_current(link);
 
-       printk(PREFIX "%s [%s] (IRQs", acpi_device_name(device),
+       printk(KERN_INFO PREFIX "%s [%s] (IRQs", acpi_device_name(device),
               acpi_device_bid(device));
        for (i = 0; i < link->irq.possible_count; i++) {
                if (link->irq.active == link->irq.possible[i]) {
@@ -775,63 +764,53 @@ static int acpi_pci_link_add(struct acpi_device *device)
 
       end:
        /* disable all links -- to be activated on use */
-       acpi_ut_evaluate_object(link->handle, "_DIS", 0, NULL);
+       acpi_ut_evaluate_object(device->handle, "_DIS", 0, NULL);
        mutex_unlock(&acpi_link_lock);
 
        if (result)
                kfree(link);
 
-       return_VALUE(result);
+       return result;
 }
 
 static int acpi_pci_link_resume(struct acpi_pci_link *link)
 {
-       ACPI_FUNCTION_TRACE("acpi_pci_link_resume");
 
        if (link->refcnt && link->irq.active && link->irq.initialized)
-               return_VALUE(acpi_pci_link_set(link, link->irq.active));
+               return (acpi_pci_link_set(link, link->irq.active));
        else
-               return_VALUE(0);
+               return 0;
 }
 
-/*
- * FIXME: this is a workaround to avoid nasty warning.  It will be removed
- * after every device calls pci_disable_device in .resume.
- */
-int acpi_in_resume;
 static int irqrouter_resume(struct sys_device *dev)
 {
        struct list_head *node = NULL;
        struct acpi_pci_link *link = NULL;
 
-       ACPI_FUNCTION_TRACE("irqrouter_resume");
 
        /* Make sure SCI is enabled again (Apple firmware bug?) */
-       acpi_set_register(ACPI_BITREG_SCI_ENABLE, 1, ACPI_MTX_DO_NOT_LOCK);
+       acpi_set_register(ACPI_BITREG_SCI_ENABLE, 1);
 
-       acpi_in_resume = 1;
        list_for_each(node, &acpi_link.entries) {
                link = list_entry(node, struct acpi_pci_link, node);
                if (!link) {
-                       ACPI_ERROR((AE_INFO, "Invalid link context"));
+                       printk(KERN_ERR PREFIX "Invalid link context\n");
                        continue;
                }
                acpi_pci_link_resume(link);
        }
-       acpi_in_resume = 0;
-       return_VALUE(0);
+       return 0;
 }
 
 static int acpi_pci_link_remove(struct acpi_device *device, int type)
 {
        struct acpi_pci_link *link = NULL;
 
-       ACPI_FUNCTION_TRACE("acpi_pci_link_remove");
 
        if (!device || !acpi_driver_data(device))
-               return_VALUE(-EINVAL);
+               return -EINVAL;
 
-       link = (struct acpi_pci_link *)acpi_driver_data(device);
+       link = acpi_driver_data(device);
 
        mutex_lock(&acpi_link_lock);
        list_del(&link->node);
@@ -839,7 +818,7 @@ static int acpi_pci_link_remove(struct acpi_device *device, int type)
 
        kfree(link);
 
-       return_VALUE(0);
+       return 0;
 }
 
 /*
@@ -945,34 +924,32 @@ static int __init irqrouter_init_sysfs(void)
 {
        int error;
 
-       ACPI_FUNCTION_TRACE("irqrouter_init_sysfs");
 
        if (acpi_disabled || acpi_noirq)
-               return_VALUE(0);
+               return 0;
 
        error = sysdev_class_register(&irqrouter_sysdev_class);
        if (!error)
                error = sysdev_register(&device_irqrouter);
 
-       return_VALUE(error);
+       return error;
 }
 
 device_initcall(irqrouter_init_sysfs);
 
 static int __init acpi_pci_link_init(void)
 {
-       ACPI_FUNCTION_TRACE("acpi_pci_link_init");
 
        if (acpi_noirq)
-               return_VALUE(0);
+               return 0;
 
        acpi_link.count = 0;
        INIT_LIST_HEAD(&acpi_link.entries);
 
        if (acpi_bus_register_driver(&acpi_pci_link_driver) < 0)
-               return_VALUE(-ENODEV);
+               return -ENODEV;
 
-       return_VALUE(0);
+       return 0;
 }
 
 subsys_initcall(acpi_pci_link_init);