zoukankan      html  css  js  c++  java
  • 2.6内核中被废弃的pci_present()

    在pci驱动是使用pci_present()函数在init函数中,编译过程中报错。

    其中的源码为:



     



    error原因是:

    error: implicit declaration of function ‘pci_present’



    后来查阅了一些资料,发现下文:


    Linux Kernel Mailing List wrote: 
    > ChangeSet 1.1317, 2003/06/05 12:04:33-07:00, greg@kroah.com 

    > [PATCH] PCI: move pci_present() into drivers/pci/search.c 

    > This will let not have to export the pci_devices variable. 


    pci_present() should be killed. It's left over from 2.0 or 1.2 days, 
    and has no meaning anymore. 

    The old-kernel use was to determine if a PCI bus. Drivers had to check 
    if a PCI bus was present, before probing for a PCI device using the 
    old-old find-by-slot-and-busid method of PCI bus probing. As the 
    now-old method of PCI bus probing (pci_find_device) and the current PCI 
    API both provide correct behavior when no PCI bus is present, 
    pci_present() itself no longer has any meaning and is entirely redundant. 

    At the very least, we should use the gcc "deprecated" attribute on 
    pci_present definitions, both normal and no-op. 

    IMO pci_present should go before 2.6.0... it's lived long enough. 

            Jeff 


    或许我可以理解为,pci驱动已经被2.6内核默认支持,不存在甄别支持不支持的问题,在boot阶段,linux内核已经将PCI设备总线初始化并分配好了。

  • 相关阅读:
    测试WCF遇到的一些问题
    Webservices部署在IIS6.0上的一个小问题
    同程面试经历
    IIS6.0+win2003部署MVC网站的一些问题
    C++ 结构体初始化
    Sicily 1146:采药(dp)
    Sicily 10359:Valuable Jewellery(贪心+优先队列)
    Sicily 2503:最长字符串(贪心)
    MATLAB产生离散信号
    Sicily 1681: Matchsticks(贪心)
  • 原文地址:https://www.cnblogs.com/shaoguangleo/p/2805907.html
Copyright © 2011-2022 走看看