From patchwork Mon Sep 21 19:35:24 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 49112 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 n8LJZNk1009935 for ; Mon, 21 Sep 2009 19:35:27 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753371AbZIUTfW (ORCPT ); Mon, 21 Sep 2009 15:35:22 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753379AbZIUTfW (ORCPT ); Mon, 21 Sep 2009 15:35:22 -0400 Received: from g4t0014.houston.hp.com ([15.201.24.17]:4696 "EHLO g4t0014.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753371AbZIUTfV (ORCPT ); Mon, 21 Sep 2009 15:35:21 -0400 Received: from g1t0039.austin.hp.com (g1t0039.austin.hp.com [16.236.32.45]) by g4t0014.houston.hp.com (Postfix) with ESMTP id 45F3C243ED; Mon, 21 Sep 2009 19:35:25 +0000 (UTC) Received: from ldl (linux.corp.hp.com [15.11.146.101]) by g1t0039.austin.hp.com (Postfix) with ESMTP id 0B1EA3402A; Mon, 21 Sep 2009 19:35:25 +0000 (UTC) Received: from localhost (ldl.fc.hp.com [127.0.0.1]) by ldl (Postfix) with ESMTP id EA721CF0015; Mon, 21 Sep 2009 13:35:24 -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 3ObhFH+GSWyd; Mon, 21 Sep 2009 13:35:24 -0600 (MDT) Received: from eh.fc.hp.com (eh.fc.hp.com [15.11.146.105]) by ldl (Postfix) with ESMTP id D3345CF0011; Mon, 21 Sep 2009 13:35:24 -0600 (MDT) Received: from bob.kio (localhost [127.0.0.1]) by eh.fc.hp.com (Postfix) with ESMTP id CD2CD2615C; Mon, 21 Sep 2009 13:35:24 -0600 (MDT) Subject: [PATCH v3 5/8] ACPI: remove acpi_device.flags.compatible_ids To: Len Brown From: Bjorn Helgaas Cc: linux-acpi@vger.kernel.org, Hugh Dickins , Valdis Kletnieks , Lin Ming , Bartlomiej Zolnierkiewicz Date: Mon, 21 Sep 2009 13:35:24 -0600 Message-ID: <20090921193524.21656.21804.stgit@bob.kio> In-Reply-To: <20090921193417.21656.32718.stgit@bob.kio> References: <20090921193417.21656.32718.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 keep a single list of IDs that includes both the _HID and any _CIDs. We no longer need to keep track of whether the device has a _CID. Signed-off-by: Bjorn Helgaas --- drivers/acpi/scan.c | 15 ++++----------- include/acpi/acpi_bus.h | 3 +-- 2 files changed, 5 insertions(+), 13 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 9c65244..954cb1d 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -47,7 +47,7 @@ static int create_modalias(struct acpi_device *acpi_dev, char *modalias, int count; struct acpi_hardware_id *id; - if (!acpi_dev->flags.hardware_id && !acpi_dev->flags.compatible_ids) + if (!acpi_dev->flags.hardware_id) return -ENODEV; len = snprintf(modalias, size, "acpi:"); @@ -209,7 +209,7 @@ static int acpi_device_setup_files(struct acpi_device *dev) goto end; } - if (dev->flags.hardware_id || dev->flags.compatible_ids) { + if (dev->flags.hardware_id) { result = device_create_file(&dev->dev, &dev_attr_modalias); if (result) goto end; @@ -239,7 +239,7 @@ static void acpi_device_remove_files(struct acpi_device *dev) if (ACPI_SUCCESS(status)) device_remove_file(&dev->dev, &dev_attr_eject); - if (dev->flags.hardware_id || dev->flags.compatible_ids) + if (dev->flags.hardware_id) device_remove_file(&dev->dev, &dev_attr_modalias); if (dev->flags.hardware_id) @@ -876,11 +876,6 @@ static int acpi_bus_get_flags(struct acpi_device *device) if (ACPI_SUCCESS(status)) device->flags.dynamic_status = 1; - /* Presence of _CID indicates 'compatible_ids' */ - status = acpi_get_handle(device->handle, "_CID", &temp); - if (ACPI_SUCCESS(status)) - device->flags.compatible_ids = 1; - /* Presence of _RMV indicates 'removable' */ status = acpi_get_handle(device->handle, "_RMV", &temp); if (ACPI_SUCCESS(status)) @@ -1124,10 +1119,8 @@ static void acpi_device_set_id(struct acpi_device *device) if (cid_list) for (i = 0; i < cid_list->count; i++) acpi_add_id(device, cid_list->ids[i].string); - if (cid_add) { + if (cid_add) acpi_add_id(device, cid_add); - device->flags.compatible_ids = 1; - } kfree(info); } diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 635e305..e422547 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h @@ -142,7 +142,6 @@ struct acpi_device_status { struct acpi_device_flags { u32 dynamic_status:1; u32 hardware_id:1; - u32 compatible_ids:1; u32 bus_address:1; u32 unique_id:1; u32 removable:1; @@ -153,7 +152,7 @@ struct acpi_device_flags { u32 performance_manageable:1; u32 wake_capable:1; /* Wakeup(_PRW) supported? */ u32 force_power_state:1; - u32 reserved:19; + u32 reserved:20; }; /* File System */