From patchwork Wed Sep 9 21:59:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 7149451 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 98B309F1D3 for ; Wed, 9 Sep 2015 22:01:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C6C632057E for ; Wed, 9 Sep 2015 22:01:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BA34A2069A for ; Wed, 9 Sep 2015 22:01:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753100AbbIIWBH (ORCPT ); Wed, 9 Sep 2015 18:01:07 -0400 Received: from mail-lb0-f174.google.com ([209.85.217.174]:36245 "EHLO mail-lb0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752307AbbIIV75 (ORCPT ); Wed, 9 Sep 2015 17:59:57 -0400 Received: by lbcao8 with SMTP id ao8so13409971lbc.3 for ; Wed, 09 Sep 2015 14:59:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=J2E5NXPoCc4qR3xnzbGkety+Tusi9aIUwjUxuilE9LA=; b=VodWuPDEBFGvzvio8ATfA2YwXWqrMi5UamG4vZIhZSHaTMrjcKY3L3RTPeGcw+UIsY seN5UuzikUi2kIY6hAsN97Qszbp0v6R2WjWJwGGWbrlZUcaiPAPhChuPseTxKjZ4E+b0 YCsj+Ew/uZFu6Flqe7lzw9wkgXMQ8nHG4CW2U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=J2E5NXPoCc4qR3xnzbGkety+Tusi9aIUwjUxuilE9LA=; b=k8Pq7NzS+n3Bo4BAzvsiuZ9zbe9h1rthMWXPMlnUcMn/9lrwdUwfidAUm7cWQPa+eN 7i9RKw2y6gxGugrl5jCRnewtDB20VWha1sDdnY1bTKhudh0ZLgxRM/HUJUg2A8hSw+z5 YqHOs8uttIBaV1pMz0cJBvQ2SK6JpSKrhviAOEgCpG6cfQY3jKHKrc0/kqILzTZso/Fq csK0L3AooVWzn0GJecHemCl2ypulUYaEm2tqoGhdPjeHYwFOlLd92jUW9qc+iEM4Q3pl Lx+WP0vkV0ZmPCFFuFf7dhRgyeUicaw+0ptXI2nHK+zOMY1N2WJPrjveJF4g7R7Xhg/j Gbew== X-Gm-Message-State: ALoCoQmA8vwlyv30rnlQ+0K7P3ByDopw9BjCB75b0aQysdYGcxCbRzw/Hc10GD1bd2PuEbqJh91d X-Received: by 10.112.91.196 with SMTP id cg4mr31445451lbb.10.1441835995836; Wed, 09 Sep 2015 14:59:55 -0700 (PDT) Received: from spencer.imf.au.dk ([130.225.20.51]) by smtp.gmail.com with ESMTPSA id f10sm2123029lae.23.2015.09.09.14.59.55 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Sep 2015 14:59:55 -0700 (PDT) From: Rasmus Villemoes To: "Rafael J. Wysocki" , Len Brown , Robert Moore , Lv Zheng Cc: Rasmus Villemoes , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, devel@acpica.org Subject: [PATCH 2/3] ACPI: constify struct acpi_hardware_id::id Date: Wed, 9 Sep 2015 23:59:42 +0200 Message-Id: <1441835983-15197-2-git-send-email-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.1.3 In-Reply-To: <1441835983-15197-1-git-send-email-linux@rasmusvillemoes.dk> References: <1441835983-15197-1-git-send-email-linux@rasmusvillemoes.dk> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This is preparation for using kstrdup_const to initialize that member. Signed-off-by: Rasmus Villemoes --- drivers/acpi/scan.c | 4 ++-- drivers/pnp/pnpacpi/core.c | 4 ++-- include/acpi/acpi_bus.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 01136b879038..a3eaf2080707 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -1472,7 +1472,7 @@ bool acpi_device_is_present(struct acpi_device *adev) } static bool acpi_scan_handler_matching(struct acpi_scan_handler *handler, - char *idstr, + const char *idstr, const struct acpi_device_id **matchid) { const struct acpi_device_id *devid; @@ -1491,7 +1491,7 @@ static bool acpi_scan_handler_matching(struct acpi_scan_handler *handler, return false; } -static struct acpi_scan_handler *acpi_scan_match_handler(char *idstr, +static struct acpi_scan_handler *acpi_scan_match_handler(const char *idstr, const struct acpi_device_id **matchid) { struct acpi_scan_handler *handler; diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c index 5153d1d69aee..9113876487ed 100644 --- a/drivers/pnp/pnpacpi/core.c +++ b/drivers/pnp/pnpacpi/core.c @@ -207,7 +207,7 @@ struct pnp_protocol pnpacpi_protocol = { }; EXPORT_SYMBOL(pnpacpi_protocol); -static char *__init pnpacpi_get_id(struct acpi_device *device) +static const char *__init pnpacpi_get_id(struct acpi_device *device) { struct acpi_hardware_id *id; @@ -222,7 +222,7 @@ static char *__init pnpacpi_get_id(struct acpi_device *device) static int __init pnpacpi_add_device(struct acpi_device *device) { struct pnp_dev *dev; - char *pnpid; + const char *pnpid; struct acpi_hardware_id *id; int error; diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 9a1b46c64fc1..fec002919b65 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h @@ -227,7 +227,7 @@ typedef char acpi_device_class[20]; struct acpi_hardware_id { struct list_head list; - char *id; + const char *id; }; struct acpi_pnp_type {