From patchwork Wed Oct 2 08:27:37 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhang Yanfei X-Patchwork-Id: 2973321 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 97512BFF0B for ; Wed, 2 Oct 2013 08:28:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 234AE20397 for ; Wed, 2 Oct 2013 08:28:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F1F6C20399 for ; Wed, 2 Oct 2013 08:28:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752938Ab3JBI2A (ORCPT ); Wed, 2 Oct 2013 04:28:00 -0400 Received: from mail-pd0-f171.google.com ([209.85.192.171]:52431 "EHLO mail-pd0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752902Ab3JBI16 (ORCPT ); Wed, 2 Oct 2013 04:27:58 -0400 Received: by mail-pd0-f171.google.com with SMTP id g10so571496pdj.2 for ; Wed, 02 Oct 2013 01:27:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :content-type:content-transfer-encoding; bh=U7BMCivh2nQ4Ib29ugt3ulmdWg7SwVL3Dx4Ad64DDEQ=; b=jYx/nXGU4ISlFNrysvEq4jICi2h2hX4APNFoyd3k/qjwOGVV9k58JQvClcchnkfM17 7SsEgTC3Z+gdmKInSFxa5WJB9xNz2mYRZp5FGBmJ2DiZD5v/2zEqWCKQUu/e2wuXRgmi KogmSkwCwsP3UJgaxpkQYAtKwZ1OIyCMe1qkR5kvOnVyIy8eMSjMW+47HYaLsEZbAxTN Mm3/HcIDz/CgAanWdm6ioQEms9cBUUWF/hnyzdMvSP3tifImAUVhZkoZzyj6LRpXopxI DaSy6fCrXvaCse733DpZkbyc4uI6lnQv/Wx43LBjXxz0BCI61dHCXaCkVTjlgzcT/g7B Lsiw== X-Received: by 10.66.155.102 with SMTP id vv6mr1804359pab.89.1380702478058; Wed, 02 Oct 2013 01:27:58 -0700 (PDT) Received: from localhost.localdomain ([222.94.133.24]) by mx.google.com with ESMTPSA id os4sm638927pbb.25.1969.12.31.16.00.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 02 Oct 2013 01:27:57 -0700 (PDT) Message-ID: <524BD8F9.2000304@gmail.com> Date: Wed, 02 Oct 2013 16:27:37 +0800 From: Zhang Yanfei User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.5) Gecko/20120607 Thunderbird/10.0.5 MIME-Version: 1.0 To: lenb@kernel.org, "Rafael J . Wysocki" CC: linux-acpi@vger.kernel.org, "linux-kernel@vger.kernel.org" Subject: [PATCH] acpi/mem_hotplug: Use defined marco METHOD_NAME__STA Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-7.4 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=ham 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: Zhang Yanfei We already have predefined marco for method name "_STA', so using the marco instead of directly using the string. Signed-off-by: Zhang Yanfei --- drivers/acpi/acpi_memhotplug.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c index 999adb5..dc0880d 100644 --- a/drivers/acpi/acpi_memhotplug.c +++ b/drivers/acpi/acpi_memhotplug.c @@ -152,8 +152,9 @@ static int acpi_memory_check_device(struct acpi_memory_device *mem_device) unsigned long long current_status; /* Get device present/absent information from the _STA */ - if (ACPI_FAILURE(acpi_evaluate_integer(mem_device->device->handle, "_STA", - NULL, ¤t_status))) + if (ACPI_FAILURE(acpi_evaluate_integer(mem_device->device->handle, + METHOD_NAME__STA, NULL, + ¤t_status))) return -ENODEV; /* * Check for device status. Device should be