summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordzzxzz <[email protected]>2011-12-28 02:49:11 +0000
committerdzzxzz <[email protected]>2011-12-28 02:49:11 +0000
commit9b9aaf6032518c7fc60f60d38d116a1e11e25299 (patch)
tree223cdffc1028d15b496ef1853c5ffc72405ccf31 /src
parent3f0b614ad36d548952707dd93e0318decec7266e (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/device.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/device.c b/src/device.c
index 7f44227af0..2571e9132e 100644
--- a/src/device.c
+++ b/src/device.c
@@ -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;