From patchwork Mon Sep 21 19:29:25 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 49097 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n8LJSloY009091 for ; Mon, 21 Sep 2009 19:29:27 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753364AbZIUT3W (ORCPT ); Mon, 21 Sep 2009 15:29:22 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753366AbZIUT3W (ORCPT ); Mon, 21 Sep 2009 15:29:22 -0400 Received: from g5t0007.atlanta.hp.com ([15.192.0.44]:45616 "EHLO g5t0007.atlanta.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753364AbZIUT3W (ORCPT ); Mon, 21 Sep 2009 15:29:22 -0400 Received: from g1t0038.austin.hp.com (g1t0038.austin.hp.com [16.236.32.44]) by g5t0007.atlanta.hp.com (Postfix) with ESMTP id 13D20141A3; Mon, 21 Sep 2009 19:29:25 +0000 (UTC) Received: from ldl (linux.corp.hp.com [15.11.146.101]) by g1t0038.austin.hp.com (Postfix) with ESMTP id A582F3014F; Mon, 21 Sep 2009 19:29:25 +0000 (UTC) Received: from localhost (ldl.fc.hp.com [127.0.0.1]) by ldl (Postfix) with ESMTP id AA9E1CF000E; Mon, 21 Sep 2009 13:29:25 -0600 (MDT) Received: from ldl ([127.0.0.1]) by localhost (ldl.fc.hp.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ES6HM4+NDI5M; Mon, 21 Sep 2009 13:29:25 -0600 (MDT) Received: from eh.fc.hp.com (eh.fc.hp.com [15.11.146.105]) by ldl (Postfix) with ESMTP id 95A81CF000D; Mon, 21 Sep 2009 13:29:25 -0600 (MDT) Received: from bob.kio (localhost [127.0.0.1]) by eh.fc.hp.com (Postfix) with ESMTP id 67BFB2615C; Mon, 21 Sep 2009 13:29:25 -0600 (MDT) Subject: [PATCH v3 08/17] ACPI: remove redundant "type" arguments To: Len Brown From: Bjorn Helgaas Cc: linux-acpi@vger.kernel.org Date: Mon, 21 Sep 2009 13:29:25 -0600 Message-ID: <20090921192925.21322.28072.stgit@bob.kio> In-Reply-To: <20090921192656.21322.23072.stgit@bob.kio> References: <20090921192656.21322.23072.stgit@bob.kio> User-Agent: StGit/0.14.3.386.gb02d MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org We now save the ACPI bus "device_type" in the acpi_device structure, so we don't need to pass it around explicitly anymore. Signed-off-by: Bjorn Helgaas --- drivers/acpi/scan.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 44383fe..6c83342 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -916,7 +916,7 @@ static int acpi_bus_get_flags(struct acpi_device *device) return 0; } -static void acpi_device_get_busid(struct acpi_device *device, int type) +static void acpi_device_get_busid(struct acpi_device *device) { char bus_id[5] = { '?', 0 }; struct acpi_buffer buffer = { sizeof(bus_id), bus_id }; @@ -928,7 +928,7 @@ static void acpi_device_get_busid(struct acpi_device *device, int type) * The device's Bus ID is simply the object name. * TBD: Shouldn't this value be unique (within the ACPI namespace)? */ - switch (type) { + switch (device->device_type) { case ACPI_BUS_TYPE_SYSTEM: strcpy(device->pnp.bus_id, "ACPI"); break; @@ -1055,7 +1055,7 @@ acpi_add_cid( return cid; } -static void acpi_device_set_id(struct acpi_device *device, int type) +static void acpi_device_set_id(struct acpi_device *device) { struct acpi_device_info *info = NULL; char *hid = NULL; @@ -1064,7 +1064,7 @@ static void acpi_device_set_id(struct acpi_device *device, int type) char *cid_add = NULL; acpi_status status; - switch (type) { + switch (device->device_type) { case ACPI_BUS_TYPE_DEVICE: status = acpi_get_object_info(device->handle, &info); if (ACPI_FAILURE(status)) { @@ -1122,7 +1122,7 @@ static void acpi_device_set_id(struct acpi_device *device, int type) * Fix for the system root bus device -- the only root-level device. */ if (((acpi_handle)device->parent == ACPI_ROOT_OBJECT) && - (type == ACPI_BUS_TYPE_DEVICE)) { + (device->device_type == ACPI_BUS_TYPE_DEVICE)) { hid = ACPI_BUS_HID; strcpy(device->pnp.device_name, ACPI_BUS_DEVICE_NAME); strcpy(device->pnp.device_class, ACPI_BUS_CLASS); @@ -1241,7 +1241,7 @@ acpi_add_single_object(struct acpi_device **child, device->parent = parent; device->bus_ops = *ops; /* workround for not call .start */ - acpi_device_get_busid(device, type); + acpi_device_get_busid(device); /* * Flags @@ -1304,7 +1304,7 @@ acpi_add_single_object(struct acpi_device **child, * Hardware ID, Unique ID, & Bus Address * ------------------------------------- */ - acpi_device_set_id(device, type); + acpi_device_set_id(device); /* * Power Management