关于linux 内核源码中static struct pci_driver vortex_driver的定义的问题

michaeldg 2009-09-13 09:53:09
以下是linux内核源码中关于static struct pci_driver vortex_driver的定义:

static struct pci_driver vortex_driver = {
.name = "3c59x",
.probe = vortex_init_one,
.remove = __devexit_p(vortex_remove_one),
.id_table = vortex_pci_tbl,
#ifdef CONFIG_PM
.suspend = vortex_suspend,
.resume = vortex_resume,
#endif
};

其中vortex_init_one,vortex_suspend,vortex_resume是函数名字,__devexit_p是宏定义,vortex_pci_tbl是另一个结构体
请各位大牛解释下这个结构体的定义,第一次见这么个用法……
...全文
98 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
zkuang82 2009-09-14
  • 打赏
  • 举报
回复
你问的是vortex_driver还是vortex_pci_tbl?
楼上已经说了vortex_pci_tbl。

vortex_driver的话
.xxxx = xxxxx是Gcc的C语言扩展,用来初始化结构体。
pottichu 2009-09-13
  • 打赏
  • 举报
回复
vortex_pci_tbl

表示此驱动支持的设备 id .

4,468

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 内核源代码研究区
社区管理员
  • 内核源代码研究区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧