From patchwork Wed Mar 25 10:39:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 1261303 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=R9LbvC/M; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 48nPlD29X6z9sR4 for ; Wed, 25 Mar 2020 21:40:08 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727417AbgCYKkH (ORCPT ); Wed, 25 Mar 2020 06:40:07 -0400 Received: from us-smtp-delivery-74.mimecast.com ([63.128.21.74]:54803 "EHLO us-smtp-delivery-74.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727392AbgCYKkH (ORCPT ); Wed, 25 Mar 2020 06:40:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585132806; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2/jKQY/v3TwgChoX1/mwdlEYnDrnQ21fmszGm2dRlcU=; b=R9LbvC/MvnRxyjqLuscUkK5zBT6z8oTPZkujsj0cslUhjUylX0HMRYfstVwEVN/f4Y3e/Y 6OMG7L/fewoL/N//Yosah8KR9bB9JeMWva7r/fMzRvDOq/x2w0cD9MF8M27H5gunqXq3Zb 1YtgjdG+luhvEeYxyCmep7Xue/NOZg8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-304-maCLJrR3NPaCbcypwcHXmA-1; Wed, 25 Mar 2020 06:40:02 -0400 X-MC-Unique: maCLJrR3NPaCbcypwcHXmA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 253138017DF; Wed, 25 Mar 2020 10:40:01 +0000 (UTC) Received: from x1.localdomain.com (ovpn-115-75.ams2.redhat.com [10.36.115.75]) by smtp.corp.redhat.com (Postfix) with ESMTP id 87BD1BBBE5; Wed, 25 Mar 2020 10:39:59 +0000 (UTC) From: Hans de Goede To: Mika Westerberg , Andy Shevchenko , Bartosz Golaszewski , Linus Walleij Cc: Hans de Goede , linux-gpio@vger.kernel.org, linux-acpi@vger.kernel.org Subject: [PATCH resend] gpiolib: acpi: Add missing __init(const) markers to initcall-s Date: Wed, 25 Mar 2020 11:39:56 +0100 Message-Id: <20200325103956.109284-2-hdegoede@redhat.com> In-Reply-To: <20200325103956.109284-1-hdegoede@redhat.com> References: <20200325103956.109284-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org The gpiolib ACPI code uses 2 initcall-s and the called function (and used DMI table) is missing __init(const) markers. This commit fixes this freeing up some extra memory once the kernel has completed booting. Acked-by: Mika Westerberg Signed-off-by: Hans de Goede --- drivers/gpio/gpiolib-acpi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c index 0017367e94ee..9276051663da 100644 --- a/drivers/gpio/gpiolib-acpi.c +++ b/drivers/gpio/gpiolib-acpi.c @@ -1353,7 +1353,7 @@ int acpi_gpio_count(struct device *dev, const char *con_id) } /* Run deferred acpi_gpiochip_request_irqs() */ -static int acpi_gpio_handle_deferred_request_irqs(void) +static int __init acpi_gpio_handle_deferred_request_irqs(void) { struct acpi_gpio_chip *acpi_gpio, *tmp; @@ -1371,7 +1371,7 @@ static int acpi_gpio_handle_deferred_request_irqs(void) /* We must use _sync so that this runs after the first deferred_probe run */ late_initcall_sync(acpi_gpio_handle_deferred_request_irqs); -static const struct dmi_system_id gpiolib_acpi_quirks[] = { +static const struct dmi_system_id gpiolib_acpi_quirks[] __initconst = { { /* * The Minix Neo Z83-4 has a micro-USB-B id-pin handler for @@ -1455,7 +1455,7 @@ static const struct dmi_system_id gpiolib_acpi_quirks[] = { {} /* Terminating entry */ }; -static int acpi_gpio_setup_params(void) +static int __init acpi_gpio_setup_params(void) { const struct acpi_gpiolib_dmi_quirk *quirk = NULL; const struct dmi_system_id *id;