mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 19:36:35 +08:00
drivers/video: Store device operations table
Fix a bug which the device operation structure is not stored in video_initialize().
This commit is contained in:
@@ -1499,6 +1499,8 @@ int video_initialize(FAR const char *devpath,
|
|||||||
|
|
||||||
video_handler = video_register(devpath);
|
video_handler = video_register(devpath);
|
||||||
|
|
||||||
|
g_video_devops = devops;
|
||||||
|
|
||||||
is_initialized = true;
|
is_initialized = true;
|
||||||
|
|
||||||
return OK;
|
return OK;
|
||||||
@@ -1513,6 +1515,8 @@ int video_uninitialize(void)
|
|||||||
|
|
||||||
video_unregister(video_handler);
|
video_unregister(video_handler);
|
||||||
|
|
||||||
|
g_video_devops = NULL;
|
||||||
|
|
||||||
is_initialized = false;
|
is_initialized = false;
|
||||||
|
|
||||||
return OK;
|
return OK;
|
||||||
|
|||||||
Reference in New Issue
Block a user