Linux设备驱动程序注册错误

时间:2013-12-16 14:10:59

标签: linux linux-kernel linux-device-driver embedded-linux

我遇到了linux设备驱动程序的一些问题。

当我尝试使用

注册时
extern int platform_driver_probe(struct platform_driver *driver, int (*probe)(struct platform_device *));

它会返回错误。我目前正在使用Linux内核3.10,而且这个驱动程序在3.2中运行良好。我正在为嵌入式系统交叉编译这个内核。

这可能看起来很模糊,但我真的没有其他任何我认为有用的信息。

有没有人有任何想法帮我调试或解决这个错误?

编辑: 错误代码是-19。

1 个答案:

答案 0 :(得分:1)

19为ENODEV error code,我认为这是platform_driver_probe()失败的地方:

if (code == 0 && list_empty(&drv->driver.p->klist_devices.k_list))
        retval = -ENODEV;

希望这有帮助,

相关问题