From patchwork Wed Sep 25 20:23:20 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 2944171 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 821B2BFF05 for ; Wed, 25 Sep 2013 20:23:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 870A120578 for ; Wed, 25 Sep 2013 20:23:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 60A3E20574 for ; Wed, 25 Sep 2013 20:23:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756103Ab3IYUXY (ORCPT ); Wed, 25 Sep 2013 16:23:24 -0400 Received: from mail-yh0-f50.google.com ([209.85.213.50]:40336 "EHLO mail-yh0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755403Ab3IYUXW (ORCPT ); Wed, 25 Sep 2013 16:23:22 -0400 Received: by mail-yh0-f50.google.com with SMTP id a41so104737yho.23 for ; Wed, 25 Sep 2013 13:23:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:to:from:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding; bh=dphYCzznWk6xq/W6wh4Re2lNMqhfJh37XY+b0zgtzps=; b=PMiUMIdUpTx6PjoTUYH7j7gL5q8zTBJSjVOHNUObGpv46i0wEHR8B1n6YsaYXLOnxj HfRe2F4qB6g86KqldLWg5Z9L6eeDUNXDiWSciZ1nBSwDrA5mF4frbSJv8tmq1C9Ybj+N vByTY4N2wg6/uVwScmmpT3aU4fdmk4NCyP33QxTPwHa5wxHtpH9RMMROsR5BR+3/S1Mr kQOqdAeQjmfZz+BKEp7WgWcH1Ao3PZCl/34WX4TpYKZJ6HVKb3NfstSb3c8l9dFhRSzW EOkPHj7OxMz+Viksgso6ig3SL7dDQkNaAIF7BY2BqbVoZwJXhcFMhROASWpot7O7A6us Iw1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:from:cc:date:message-id:in-reply-to :references:user-agent:mime-version:content-type :content-transfer-encoding; bh=dphYCzznWk6xq/W6wh4Re2lNMqhfJh37XY+b0zgtzps=; b=gB2ZR/CldhUUFi/xphd9d2Ni8WTyUnUgWJQ4NTaTBNfF2Gdhmv2e40hwZhacemskLI /8nbu5z4R7n5lGyDsoIqyJbhAYX0uiSaP0vzZ0t0sBlz4A7MdhpuPX4hs7oi06heoe0B JsuxIsQiuOna7Csc6q4PwR8XxPrc/2JrSq2MABQlUGJx2EoFbZTAKfO1eXhg9OvXhemW +qdruh+e6GNOpX2HPwUBi68yyxR6gARbpiE7rL/8Ey9qKcp+3GKiZU4qWhceCU1mC0py yfYZHYQG1wNZinkDlDUJsJH2laUumsFb4DhfXhjhPLHdqG8RycZF0n/5YPiTOtHloxWB OTMg== X-Gm-Message-State: ALoCoQm7uGQJpLC/Km7b5Ep4zca6yb05lioC7v8XQXQWH47zUgsOx9GgFb9NBIVF5LUuB6yZhDcZd9QWAZHLii5n50Qcn0AVAR53+H2etJvsRVb+MvKC9dJ3802ijYlpMe8JTOfXvHlGyfB874sOyxeW+YJZJywsGFcSN22rBFzav5NDZBFtTgC0pVz07A0TO3rjbVnaaWaASwHgPOVZULPAWW6j/Lv2Sg== X-Received: by 10.236.128.232 with SMTP id f68mr3415238yhi.70.1380140602299; Wed, 25 Sep 2013 13:23:22 -0700 (PDT) Received: from localhost ([172.16.50.208]) by mx.google.com with ESMTPSA id w8sm25880100yhg.8.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 25 Sep 2013 13:23:21 -0700 (PDT) Subject: [PATCH 3/3] ACPI / hotplug: Use kobject_init_and_add() instead of _init() and _add() To: "Rafael J. Wysocki" , Len Brown From: Bjorn Helgaas Cc: linux-acpi@vger.kernel.org Date: Wed, 25 Sep 2013 14:23:20 -0600 Message-ID: <20130925202319.18667.46523.stgit@bhelgaas-glaptop.roam.corp.google.com> In-Reply-To: <20130925202037.18667.31220.stgit@bhelgaas-glaptop.roam.corp.google.com> References: <20130925202037.18667.31220.stgit@bhelgaas-glaptop.roam.corp.google.com> User-Agent: StGit/0.16 MIME-Version: 1.0 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.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, 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 Use kobject_init_and_add() since we have nothing special to do between kobject_init() and kobject_add(). Signed-off-by: Bjorn Helgaas --- drivers/acpi/sysfs.c | 5 ++--- 1 file 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/sysfs.c b/drivers/acpi/sysfs.c index 7543281..bb6045c 100644 --- a/drivers/acpi/sysfs.c +++ b/drivers/acpi/sysfs.c @@ -762,9 +762,8 @@ void acpi_sysfs_add_hotplug_profile(struct acpi_hotplug_profile *hotplug, if (!hotplug_kobj) goto err_out; - kobject_init(&hotplug->kobj, &acpi_hotplug_profile_ktype); - - error = kobject_add(&hotplug->kobj, hotplug_kobj, "%s", name); + error = kobject_init_and_add(&hotplug->kobj, + &acpi_hotplug_profile_ktype, hotplug_kobj, "%s", name); if (error) goto err_out;