From patchwork Mon May 13 16:08:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiang Liu X-Patchwork-Id: 243431 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id D3EFD2C00A9 for ; Tue, 14 May 2013 02:10:10 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755262Ab3EMQJe (ORCPT ); Mon, 13 May 2013 12:09:34 -0400 Received: from mail-da0-f44.google.com ([209.85.210.44]:53749 "EHLO mail-da0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755219Ab3EMQJd (ORCPT ); Mon, 13 May 2013 12:09:33 -0400 Received: by mail-da0-f44.google.com with SMTP id z8so1149459daj.31 for ; Mon, 13 May 2013 09:09:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=gS8B7/Z7YRED/IE6kXo4jTgURQEJOHV7j1SFL9bUfd0=; b=UHPVM62G/i6onjIhbX7KI2CP9FWRyVRyiFoSP3lVEAgATwrZS4aYqGqqb1FqdO0vTA 9/jU57cOcfyInx1bYrPm7e6vaBzDXtZEDexaoMHygwsfFQWiAjPYEXcOA12qAXCDUfrd pc0gL1cPvTGGLY3WYu96zs+Zl0hpTeK7/+lET1LGgLrA0PuBAx3bkietI5uK20/rp7ok X53UiLuQ0vLzijCZUmAe0qb0jcmWnp9KsCbT14w2BqtmAxeglW3MMSkIvRl6AoBhl/wC 8La1FoGxrrE1JAGncs1s7GyTxbafPE9jR7Vzxar3n3ksWA6+59IAyPA5JVfNe6D8z31a 7uoQ== X-Received: by 10.66.232.230 with SMTP id tr6mr31178553pac.83.1368461372572; Mon, 13 May 2013 09:09:32 -0700 (PDT) Received: from localhost.localdomain ([120.196.98.100]) by mx.google.com with ESMTPSA id nt2sm14580193pbc.17.2013.05.13.09.09.28 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 13 May 2013 09:09:32 -0700 (PDT) From: Jiang Liu To: Bjorn Helgaas , Yinghai Lu Cc: Jiang Liu , "Rafael J . Wysocki" , Greg Kroah-Hartman , Gu Zheng , Toshi Kani , Myron Stowe , Yijing Wang , Jiang Liu , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2, part 1 9/9] PCI, unicore, m68k: remove redundant call of pci_bus_add_devices() Date: Tue, 14 May 2013 00:08:33 +0800 Message-Id: <1368461313-4371-10-git-send-email-jiang.liu@huawei.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1368461313-4371-1-git-send-email-jiang.liu@huawei.com> References: <1368461313-4371-1-git-send-email-jiang.liu@huawei.com> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org pci_scan_bus() and pci_scan_root_bus() has called pci_bus_add_devices() once, so remove the redundant call of pci_bus_add_devices(). On the other handle, subsys_init() callbacks will be invoked before device_init() callbacks, so it should be safe to remove the redundant calls. Signed-off-by: Jiang Liu --- arch/m68k/platform/coldfire/pci.c | 2 +- arch/unicore32/kernel/pci.c | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/arch/m68k/platform/coldfire/pci.c b/arch/m68k/platform/coldfire/pci.c index 8572246..2345972 100644 --- a/arch/m68k/platform/coldfire/pci.c +++ b/arch/m68k/platform/coldfire/pci.c @@ -320,7 +320,7 @@ static int __init mcf_pci_init(void) pci_bus_size_bridges(rootbus); pci_bus_assign_resources(rootbus); pci_enable_bridges(rootbus); - pci_bus_add_devices(rootbus); + return 0; } diff --git a/arch/unicore32/kernel/pci.c b/arch/unicore32/kernel/pci.c index ef69c0c..374a055 100644 --- a/arch/unicore32/kernel/pci.c +++ b/arch/unicore32/kernel/pci.c @@ -277,11 +277,6 @@ static int __init pci_common_init(void) pci_bus_assign_resources(puv3_bus); } - /* - * Tell drivers about devices found. - */ - pci_bus_add_devices(puv3_bus); - return 0; } subsys_initcall(pci_common_init);