File tree Expand file tree Collapse file tree 2 files changed +16
-16
lines changed Expand file tree Collapse file tree 2 files changed +16
-16
lines changed Original file line number Diff line number Diff line change @@ -150,20 +150,20 @@ RTM_EXPORT(rt_device_find);
150150 */
151151rt_device_t rt_device_create (int type , int attach_size )
152152{
153- int size ;
154- rt_device_t device ;
153+ int size ;
154+ rt_device_t device ;
155155
156- size = RT_ALIGN (sizeof (struct rt_device ), RT_ALIGN_SIZE );
157- size += attach_size ;
156+ size = RT_ALIGN (sizeof (struct rt_device ), RT_ALIGN_SIZE );
157+ size += attach_size ;
158158
159- device = (rt_device_t )rt_malloc (size );
160- if (device )
161- {
162- rt_memset (device , 0x0 , sizeof (struct rt_device ));
163- device -> type = type ;
164- }
159+ device = (rt_device_t )rt_malloc (size );
160+ if (device )
161+ {
162+ rt_memset (device , 0x0 , sizeof (struct rt_device ));
163+ device -> type = ( enum rt_device_class_type ) type ;
164+ }
165165
166- return device ;
166+ return device ;
167167}
168168RTM_EXPORT (rt_device_create );
169169
@@ -174,11 +174,11 @@ RTM_EXPORT(rt_device_create);
174174 */
175175void rt_device_destroy (rt_device_t device )
176176{
177- /* unregister device firstly */
178- rt_device_unregister (device );
177+ /* unregister device firstly */
178+ rt_device_unregister (device );
179179
180- /* release this device object */
181- rt_free (device );
180+ /* release this device object */
181+ rt_free (device );
182182}
183183RTM_EXPORT (rt_device_destroy );
184184#endif
Original file line number Diff line number Diff line change @@ -522,7 +522,7 @@ rt_object_t rt_object_find(const char *name, rt_uint8_t type)
522522 /* try to find object */
523523 if (information == RT_NULL )
524524 {
525- information = rt_object_get_information (type );
525+ information = rt_object_get_information (( enum rt_object_class_type ) type );
526526 RT_ASSERT (information != RT_NULL );
527527 }
528528 for (node = information -> object_list .next ;
You can’t perform that action at this time.
0 commit comments