From patchwork Sat May 25 13:48:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiang Liu X-Patchwork-Id: 2613501 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 63E2C3FD4E for ; Sat, 25 May 2013 13:52:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756498Ab3EYNv4 (ORCPT ); Sat, 25 May 2013 09:51:56 -0400 Received: from mail-pd0-f182.google.com ([209.85.192.182]:40357 "EHLO mail-pd0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756735Ab3EYNvz (ORCPT ); Sat, 25 May 2013 09:51:55 -0400 Received: by mail-pd0-f182.google.com with SMTP id g10so5091545pdj.41 for ; Sat, 25 May 2013 06:51:54 -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=gS8B7/Z7YRED/IE6kXo4jTgURQEJOHV7j1SFL9bUfd0=; b=Pc7++kpic1J+THr/TI0mISbRYhrODi39pLvwmL1hD9JwgBlWJcD6YOTgRiMg7wIFkV oD+OiiU7NZJDdvX3/34ZZ7yGf4Sd7ROvFPr8UO8SbGFotwehn241SVVicS/86e2lam1n o7I7mQcQ4Q6k4iMFXqpS3pbOnxfsShDD5yJcf1jiSHqsEPDsKLPoa+ILKGdDQKeRkNAC +3ygxU+IxqbdKj+67X5C20PC8/RXhYE0BupMsNxkc+evGqM8Ik/kATd0qHGKTcgcA+Mw sCj2SMG4sPrs7kjvfdefr80KbnUYfHLyLVpBvx43ouEE0iOM2m2rmjNXoHr4c420BHh5 neNA== X-Received: by 10.68.189.105 with SMTP id gh9mr22044571pbc.77.1369489914450; Sat, 25 May 2013 06:51:54 -0700 (PDT) Received: from localhost.localdomain ([114.250.94.230]) by mx.google.com with ESMTPSA id b7sm20545858pba.39.2013.05.25.06.51.49 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 25 May 2013 06:51:53 -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 v3, part1 07/10] PCI, unicore, m68k: remove redundant call of pci_bus_add_devices() Date: Sat, 25 May 2013 21:48:35 +0800 Message-Id: <1369489718-25869-8-git-send-email-jiang.liu@huawei.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1369489718-25869-1-git-send-email-jiang.liu@huawei.com> References: <1369489718-25869-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 Acked-by: Greg Ungerer --- 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);