现在的位置: 首页 > 综合 > 正文

struct device 中的dev_id哪里去了?

2013年10月08日 ⁄ 综合 ⁄ 共 309字 ⁄ 字号 评论关闭

struct device - replace bus_id with dev_name(),

以后只要使用 dev -> bus_id 的时候,改成 dev_name()就可以了。

参看http://blog.chinaunix.net/u3/108840/showart_2270330.html

http://kerneltrap.org/mailarchive/git-commits-head/2009/1/7/4620424

如果要设置bus_id,也就是设备的名字,不再使用strncpy(dev->bus_id,"**",len)

转使用dev_set_name(dev,"%s","name");

来设置device的名字为name,

抱歉!评论已关闭.