On Fri, Oct 28, 2016 at 03:59:47PM +0800, oulijun wrote: > total 0 > lrwxrwxrwx 1 root root 0 Oct 27 11:07 driver -> ../../../../bus/platform/drivers/hns_roce > > but I think it is the standard approach. because my device(hip06) is > only platform device and the other device(hip07/hip0x0 will be pcie > device, it will be distinguished separately. Hence, we adpot the > origin approach. You have to parse out 'hns_roce' at the end of the readlink result and compare against that, drop the 'bus/platform/drivers' stuff Your PCI and Platform device should both have the same driver name. Jason -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html