spmi_bus
2015-11-24 00:00
633 查看
723 struct bus_type spmi_bus_type = { 724 .name = "spmi", 725 .match = spmi_device_match, 726 .pm = &spmi_pm_ops, 727 }; 632 static int spmi_device_match(struct device *dev, struct device_driver *drv) 633 { 634 struct spmi_device *spmi_dev; 635 struct spmi_driver *sdrv = to_spmi_driver(drv); 636 637 if (dev->type == &spmi_dev_type) 638 spmi_dev = to_spmi_device(dev); 639 else 640 return 0; 641 642 /* Attempt an OF style match */ 643 if (of_driver_match_device(dev, drv)) 644 return 1; 645 646 if (sdrv->id_table) 647 return spmi_match(sdrv->id_table, spmi_dev) != NULL; 648 649 if (drv->name) 650 return strncmp(spmi_dev->name, drv->name, SPMI_NAME_SIZE) == 0; 651 return 0; 652 } 653 17 /** 18 * of_driver_match_device - Tell if a driver's of_match_table matches a device. 19 * @drv: the device_driver structure to test 20 * @dev: the device structure to match against 21 */ 22 static inline int of_driver_match_device(struct device *dev, 23 const struct device_driver *drv) 24 { 25 return of_match_device(drv->of_match_table, dev) != NULL; 26 } 11 #include "of_private.h" 12 13 /** 14 * of_match_device - Tell if a struct device matches an of_device_id list 15 * @ids: array of of device match structures to search in 16 * @dev: the of device structure to match against 17 * 18 * Used by a driver to check whether an platform_device present in the 19 * system is in its list of supported devices. 20 */ 21 const struct of_device_id *of_match_device(const struct of_device_id *matches, 22 const struct device *dev) 23 { 24 if ((!matches) || (!dev->of_node)) 25 return NULL; 26 return of_match_node(matches, dev->of_node); 27 }
相关文章推荐
- RPM深入-系统安全方面的应用
- FtpManager类
- 【解决方案】MySQL-5.7.9 服务无法启动-“NET HELPMSG 3534”
- CCBPM对业务型SaaS客服领域的支持
- 如何使用yum来下载RPM包而不进行安装
- Ubuntu 下安装 apt-get install npm 失败的解决方案
- Cordy BPM Xpath 用法 (Xpath Edit for BPM)
- 在ubuntu上软件安装的几种格式dev,rpm,bin,tar.gz
- 建议PM注意任务的延时分发
- 《启示录》阅读笔记(四)——招聘产品经理+管理产品经理+管理上司
- .tar.gz文件和.rpm文件的区别
- yum_rpm(利用dvd建立本地yum库)
- 马化腾内部讲座:我们希望的产品经理是从技术晋升而来的
- Using Caliburn.Micro (version 2) for WPF development
- LTE中的CQI RI PMI参数
- 学习npm
- 20151121 yum,rpm系统软件包管理(yum源,扩展源,源码包安装)。
- Linxu笔记(5): rpm安装包安装与卸载
- ios播放视频文件一般使用 MPMoviePlayerViewController 和 MPMoviePlayerController
- TPM模拟器安装及使用说明