From patchwork Wed Nov 20 01:51:52 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yinghai Lu X-Patchwork-Id: 3205201 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@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 155DDC045B for ; Wed, 20 Nov 2013 01:52:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5F57C2030B for ; Wed, 20 Nov 2013 01:52:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 941F820254 for ; Wed, 20 Nov 2013 01:52:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753400Ab3KTBwX (ORCPT ); Tue, 19 Nov 2013 20:52:23 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:31623 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752355Ab3KTBwX (ORCPT ); Tue, 19 Nov 2013 20:52:23 -0500 Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id rAK1qCdg008701 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 20 Nov 2013 01:52:13 GMT Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rAK1qBrn021604 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 20 Nov 2013 01:52:12 GMT Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rAK1qB5l021589; Wed, 20 Nov 2013 01:52:11 GMT Received: from linux-siqj.site (/10.132.126.191) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 19 Nov 2013 17:52:11 -0800 From: Yinghai Lu To: Bjorn Helgaas Cc: Gu Zheng , Guo Chao , linux-pci@vger.kernel.org, Yinghai Lu Subject: [PATCH 1/6] PCI: move back pci_proc_attach_devices calling Date: Tue, 19 Nov 2013 17:51:52 -0800 Message-Id: <1384912317-3721-2-git-send-email-yinghai@kernel.org> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1384912317-3721-1-git-send-email-yinghai@kernel.org> References: <1384912317-3721-1-git-send-email-yinghai@kernel.org> X-Source-IP: ucsinet21.oracle.com [156.151.31.93] Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 We stop detach proc when pci_stop_device. So should attach that during pci_bus_add_device. Signed-off-by: Yinghai Lu --- drivers/pci/bus.c | 1 + drivers/pci/probe.c | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c index fc1b740..1ffd95b 100644 --- a/drivers/pci/bus.c +++ b/drivers/pci/bus.c @@ -175,6 +175,7 @@ int pci_bus_add_device(struct pci_dev *dev) * are not assigned yet for some devices. */ pci_fixup_device(pci_fixup_final, dev); + pci_proc_attach_device(dev); pci_create_sysfs_dev_files(dev); dev->match_driver = true; diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 38e403d..173a9cf 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -1381,8 +1381,6 @@ void pci_device_add(struct pci_dev *dev, struct pci_bus *bus) dev->match_driver = false; ret = device_add(&dev->dev); WARN_ON(ret < 0); - - pci_proc_attach_device(dev); } struct pci_dev *__ref pci_scan_single_device(struct pci_bus *bus, int devfn)