From patchwork Sat Nov 30 22:40:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yinghai Lu X-Patchwork-Id: 3260951 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 ECA50BEEAD for ; Sat, 30 Nov 2013 22:41:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E656920108 for ; Sat, 30 Nov 2013 22:41:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1C151200B4 for ; Sat, 30 Nov 2013 22:41:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751242Ab3K3Wkm (ORCPT ); Sat, 30 Nov 2013 17:40:42 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:21609 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751235Ab3K3Wkl (ORCPT ); Sat, 30 Nov 2013 17:40:41 -0500 Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id rAUMeYjG014873 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 30 Nov 2013 22:40:34 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 rAUMeXAn020408 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 30 Nov 2013 22:40:33 GMT Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rAUMeWp1020398; Sat, 30 Nov 2013 22:40:33 GMT Received: from linux-siqj.site.site (/75.36.243.161) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 30 Nov 2013 14:40:32 -0800 From: Yinghai Lu To: Bjorn Helgaas Cc: "Rafael J. Wysocki" , Gu Zheng , Guo Chao , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Yinghai Lu Subject: [PATCH v3 02/12] PCI: Move back pci_proc_attach_devices calling Date: Sat, 30 Nov 2013 14:40:28 -0800 Message-Id: <1385851238-21085-3-git-send-email-yinghai@kernel.org> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1385851238-21085-1-git-send-email-yinghai@kernel.org> References: <1385851238-21085-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=-6.9 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)