From patchwork Wed Jun 26 16:30:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiang Liu X-Patchwork-Id: 2787251 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A7DB1C0AB1 for ; Wed, 26 Jun 2013 16:36:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7F2C3205C1 for ; Wed, 26 Jun 2013 16:36:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4B9DB205AD for ; Wed, 26 Jun 2013 16:36:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752635Ab3FZQdv (ORCPT ); Wed, 26 Jun 2013 12:33:51 -0400 Received: from mail-pb0-f52.google.com ([209.85.160.52]:34069 "EHLO mail-pb0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752607Ab3FZQdu (ORCPT ); Wed, 26 Jun 2013 12:33:50 -0400 Received: by mail-pb0-f52.google.com with SMTP id xa12so14423973pbc.11 for ; Wed, 26 Jun 2013 09:33:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=aY1GpCqQTOSSz5sMmQzxgImIdQdR+YXKV6drgtczekI=; b=0u6k9SRtBU95D+ATokdA+TfSfZLQRgmqxcTW8AxkKVVCzxIjqmMb+PV8kGNY9RErD8 YsK332Pwf9mFKphUBzbLbpR7MrRoU3D7RZjvsxRiOQHjMzCEaZO1z6D690q8fYDSkZco PdVmSZBfk2MSjDTXjaz81y8rAmQiOxr6HTJJN4kRqgk1zdDtxuWEs3HPFO4alOgdsT9q dsPJVjYfT00/Rq2z8yrtCUvH8U8OZiAWHDrZbJr70f2+Ia91x4UKdypWYCJFhfzwmnZa yHFEZNQsEACKBUXyAz+YDgccwPzbfaTDC3Ob9nag7AO/xL2xrH1l4e7boZlGNVqoqPRL Erfw== X-Received: by 10.68.247.100 with SMTP id yd4mr1558483pbc.57.1372264429479; Wed, 26 Jun 2013 09:33:49 -0700 (PDT) Received: from localhost.localdomain ([114.250.101.234]) by mx.google.com with ESMTPSA id ib9sm28981911pbc.43.2013.06.26.09.33.46 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 26 Jun 2013 09:33:48 -0700 (PDT) From: Jiang Liu To: "Rafael J . Wysocki" Cc: liuj97@gmail.com, Jiang Liu , Yijing Wang , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, Len Brown Subject: [PATCH v2 3/9] ACPI, DOCK: mark initialization functions with __init Date: Thu, 27 Jun 2013 00:30:55 +0800 Message-Id: <1372264261-17442-4-git-send-email-liuj97@gmail.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1372264261-17442-1-git-send-email-liuj97@gmail.com> References: <1372264261-17442-1-git-send-email-liuj97@gmail.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 From: Jiang Liu Mark all initialization functions with __init to reduce runtime memory consumption. Signed-off-by: Jiang Liu Cc: Len Brown Cc: "Rafael J. Wysocki" Cc: linux-acpi@vger.kernel.org Cc: linux-kernel@vger.kernel.org --- drivers/acpi/dock.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c index a73571f..8c4214d 100644 --- a/drivers/acpi/dock.c +++ b/drivers/acpi/dock.c @@ -100,7 +100,7 @@ struct dock_dependent_device { * * Add the dependent device to the dock's dependent device list. */ -static int +static int __init add_dock_dependent_device(struct dock_station *ds, acpi_handle handle) { struct dock_dependent_device *dd; @@ -244,7 +244,7 @@ static int is_dock(acpi_handle handle) return 1; } -static int is_ejectable(acpi_handle handle) +static int __init is_ejectable(acpi_handle handle) { acpi_status status; acpi_handle tmp; @@ -255,7 +255,7 @@ static int is_ejectable(acpi_handle handle) return 1; } -static int is_ata(acpi_handle handle) +static int __init is_ata(acpi_handle handle) { acpi_handle tmp; @@ -268,7 +268,7 @@ static int is_ata(acpi_handle handle) return 0; } -static int is_battery(acpi_handle handle) +static int __init is_battery(acpi_handle handle) { struct acpi_device_info *info; int ret = 1; @@ -284,7 +284,7 @@ static int is_battery(acpi_handle handle) return ret; } -static int is_ejectable_bay(acpi_handle handle) +static int __init is_ejectable_bay(acpi_handle handle) { acpi_handle phandle; @@ -848,7 +848,7 @@ static struct notifier_block dock_acpi_notifier = { * check to see if an object has an _EJD method. If it does, then it * will see if it is dependent on the dock station. */ -static acpi_status +static acpi_status __init find_dock_devices(acpi_handle handle, u32 lvl, void *context, void **rv) { acpi_status status;