提交 9b9aaf60 编写于 作者: D dzzxzz

format the code in device.c,change the space to tab

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1885 bbd45198-f89e-11dd-88c7-29a3b14d5316
上级 3f0b614a
......@@ -153,22 +153,22 @@ rt_err_t rt_device_init(rt_device_t dev)
/* get device init handler */
init = dev->init;
if (init != RT_NULL)
{
if(!(dev->flag & RT_DEVICE_FLAG_ACTIVATED))
{
result = init(dev);
if (result != RT_EOK)
{
rt_kprintf("To initialize device:%s failed. The error code is %d\n",
dev->parent.name, result);
}
else
{
dev->flag |= RT_DEVICE_FLAG_ACTIVATED;
}
}
}
if (init != RT_NULL)
{
if(!(dev->flag & RT_DEVICE_FLAG_ACTIVATED))
{
result = init(dev);
if (result != RT_EOK)
{
rt_kprintf("To initialize device:%s failed. The error code is %d\n",
dev->parent.name, result);
}
else
{
dev->flag |= RT_DEVICE_FLAG_ACTIVATED;
}
}
}
else result = -RT_ENOSYS;
return result;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册