Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
4977d1c6
Commit
4977d1c6
authored
Apr 20, 2003
by
Christoph Hellwig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] devfs: videodev
parent
e8095bf2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
12 deletions
+11
-12
drivers/media/video/videodev.c
drivers/media/video/videodev.c
+10
-11
include/linux/videodev.h
include/linux/videodev.h
+1
-1
No files found.
drivers/media/video/videodev.c
View file @
4977d1c6
...
@@ -375,7 +375,6 @@ int video_register_device(struct video_device *vfd, int type, int nr)
...
@@ -375,7 +375,6 @@ int video_register_device(struct video_device *vfd, int type, int nr)
int
base
;
int
base
;
int
end
;
int
end
;
char
*
name_base
;
char
*
name_base
;
char
name
[
16
];
switch
(
type
)
switch
(
type
)
{
{
...
@@ -426,19 +425,19 @@ int video_register_device(struct video_device *vfd, int type, int nr)
...
@@ -426,19 +425,19 @@ int video_register_device(struct video_device *vfd, int type, int nr)
vfd
->
minor
=
i
;
vfd
->
minor
=
i
;
up
(
&
videodev_lock
);
up
(
&
videodev_lock
);
sprintf
(
name
,
"v4l/%s%d"
,
name_base
,
i
-
base
);
sprintf
(
vfd
->
devfs_name
,
"v4l/%s%d"
,
name_base
,
i
-
base
);
vfd
->
devfs_handle
=
devfs_register
(
NULL
,
vfd
->
devfs_name
,
0
,
VIDEO_MAJOR
,
vfd
->
minor
,
devfs_register
(
NULL
,
name
,
DEVFS_FL_DEFAULT
,
S_IFCHR
|
S_IRUSR
|
S_IWUSR
,
&
video_fops
,
NULL
);
VIDEO_MAJOR
,
vfd
->
minor
,
S_IFCHR
|
S_IRUSR
|
S_IWUSR
,
&
video_fops
,
NULL
);
init_MUTEX
(
&
vfd
->
lock
);
init_MUTEX
(
&
vfd
->
lock
);
#ifdef CONFIG_VIDEO_PROC_FS
#ifdef CONFIG_VIDEO_PROC_FS
sprintf
(
name
,
"%s%d"
,
name_base
,
i
-
base
);
{
videodev_proc_create_dev
(
vfd
,
name
);
char
name
[
16
];
sprintf
(
name
,
"%s%d"
,
name_base
,
i
-
base
);
videodev_proc_create_dev
(
vfd
,
name
);
}
#endif
#endif
return
0
;
return
0
;
}
}
...
@@ -460,7 +459,7 @@ void video_unregister_device(struct video_device *vfd)
...
@@ -460,7 +459,7 @@ void video_unregister_device(struct video_device *vfd)
videodev_proc_destroy_dev
(
vfd
);
videodev_proc_destroy_dev
(
vfd
);
#endif
#endif
devfs_
unregister
(
vfd
->
devfs_handl
e
);
devfs_
remove
(
vfd
->
devfs_nam
e
);
video_device
[
vfd
->
minor
]
=
NULL
;
video_device
[
vfd
->
minor
]
=
NULL
;
up
(
&
videodev_lock
);
up
(
&
videodev_lock
);
}
}
...
...
include/linux/videodev.h
View file @
4977d1c6
...
@@ -39,7 +39,7 @@ struct video_device
...
@@ -39,7 +39,7 @@ struct video_device
/* for videodev.c intenal usage -- don't touch */
/* for videodev.c intenal usage -- don't touch */
int
users
;
int
users
;
struct
semaphore
lock
;
struct
semaphore
lock
;
devfs_handle_t
devfs_handle
;
char
devfs_name
[
64
];
/* devfs */
};
};
#define VIDEO_MAJOR 81
#define VIDEO_MAJOR 81
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment