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
This commit is contained in:
dzzxzz 2011-12-28 02:49:11 +00:00
parent 3f0b614ad3
commit 9b9aaf6032
1 changed files with 16 additions and 16 deletions

View File

@ -153,22 +153,22 @@ rt_err_t rt_device_init(rt_device_t dev)
/* get device init handler */ /* get device init handler */
init = dev->init; init = dev->init;
if (init != RT_NULL) if (init != RT_NULL)
{ {
if(!(dev->flag & RT_DEVICE_FLAG_ACTIVATED)) if(!(dev->flag & RT_DEVICE_FLAG_ACTIVATED))
{ {
result = init(dev); result = init(dev);
if (result != RT_EOK) if (result != RT_EOK)
{ {
rt_kprintf("To initialize device:%s failed. The error code is %d\n", rt_kprintf("To initialize device:%s failed. The error code is %d\n",
dev->parent.name, result); dev->parent.name, result);
} }
else else
{ {
dev->flag |= RT_DEVICE_FLAG_ACTIVATED; dev->flag |= RT_DEVICE_FLAG_ACTIVATED;
} }
} }
} }
else result = -RT_ENOSYS; else result = -RT_ENOSYS;
return result; return result;