From patchwork Thu May 14 14:31:32 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Chiang X-Patchwork-Id: 23831 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 n4EKXFUU031801 for ; Thu, 14 May 2009 20:33:15 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757036AbZENUbg (ORCPT ); Thu, 14 May 2009 16:31:36 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757058AbZENUbf (ORCPT ); Thu, 14 May 2009 16:31:35 -0400 Received: from g5t0006.atlanta.hp.com ([15.192.0.43]:3571 "EHLO g5t0006.atlanta.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756983AbZENUbe (ORCPT ); Thu, 14 May 2009 16:31:34 -0400 Received: from smtp2.fc.hp.com (smtp2.fc.hp.com [15.11.136.114]) by g5t0006.atlanta.hp.com (Postfix) with ESMTP id C48B2C537; Thu, 14 May 2009 20:31:35 +0000 (UTC) Received: from localhost.localdomain (lart.fc.hp.com [15.11.146.31]) by smtp2.fc.hp.com (Postfix) with ESMTP id 7BE7B2CB761; Thu, 14 May 2009 20:04:17 +0000 (UTC) Received: from bob.kio (localhost [127.0.0.1]) by localhost.localdomain (Postfix) with ESMTP id 3BA7D26162; Thu, 14 May 2009 08:31:32 -0600 (MDT) Subject: [PATCH 1/2] ACPI: acpi_device_register() should call device_register() To: lenb@kernel.org From: Alex Chiang Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Date: Thu, 14 May 2009 08:31:32 -0600 Message-ID: <20090514143132.18569.36441.stgit@bob.kio> In-Reply-To: <20090514142941.18569.75813.stgit@bob.kio> References: <20090514142941.18569.75813.stgit@bob.kio> User-Agent: StGit/0.14.3.347.g594a MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org There is no apparent reason for acpi_device_register() to manually register a new device in two steps (initialize then add). Just call device_register() directly. Signed-off-by: Alex Chiang --- drivers/acpi/scan.c | 5 ++--- 1 files changed, 2 insertions(+), 3 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 8ff510b..b8f5c00 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -530,11 +530,10 @@ static int acpi_device_register(struct acpi_device *device, if (device->parent) device->dev.parent = &parent->dev; device->dev.bus = &acpi_bus_type; - device_initialize(&device->dev); device->dev.release = &acpi_device_release; - result = device_add(&device->dev); + result = device_register(&device->dev); if(result) { - dev_err(&device->dev, "Error adding device\n"); + dev_err(&device->dev, "Error registering device\n"); goto end; }