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
741ee7d1
Commit
741ee7d1
authored
Sep 19, 2002
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drivers/ieee1394/dv1394.c: Protect devfs stuff properly.
parent
5ae92892
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
drivers/ieee1394/dv1394.c
drivers/ieee1394/dv1394.c
+5
-1
No files found.
drivers/ieee1394/dv1394.c
View file @
741ee7d1
...
@@ -2564,6 +2564,7 @@ static struct file_operations dv1394_fops=
...
@@ -2564,6 +2564,7 @@ static struct file_operations dv1394_fops=
/*** DEVFS HELPERS *********************************************************/
/*** DEVFS HELPERS *********************************************************/
#ifdef CONFIG_DEVFS_FS
struct
dv1394_devfs_entry
*
struct
dv1394_devfs_entry
*
dv1394_devfs_find
(
char
*
name
)
dv1394_devfs_find
(
char
*
name
)
{
{
...
@@ -2680,6 +2681,7 @@ dv1394_devfs_add_dir( char *name,
...
@@ -2680,6 +2681,7 @@ dv1394_devfs_add_dir( char *name,
err:
err:
return
-
ENOMEM
;
return
-
ENOMEM
;
}
}
#endif
/* CONFIG_DEVFS */
void
dv1394_devfs_del
(
char
*
name
)
void
dv1394_devfs_del
(
char
*
name
)
{
{
...
@@ -2851,7 +2853,6 @@ static void dv1394_add_host (struct hpsb_host *host)
...
@@ -2851,7 +2853,6 @@ static void dv1394_add_host (struct hpsb_host *host)
{
{
struct
ti_ohci
*
ohci
;
struct
ti_ohci
*
ohci
;
char
buf
[
16
];
char
buf
[
16
];
struct
dv1394_devfs_entry
*
devfs_entry
;
/* We only work with the OHCI-1394 driver */
/* We only work with the OHCI-1394 driver */
if
(
strcmp
(
host
->
driver
->
name
,
OHCI1394_DRIVER_NAME
))
if
(
strcmp
(
host
->
driver
->
name
,
OHCI1394_DRIVER_NAME
))
...
@@ -2873,6 +2874,8 @@ static void dv1394_add_host (struct hpsb_host *host)
...
@@ -2873,6 +2874,8 @@ static void dv1394_add_host (struct hpsb_host *host)
#endif
#endif
#ifdef CONFIG_DEVFS_FS
#ifdef CONFIG_DEVFS_FS
{
struct
dv1394_devfs_entry
*
devfs_entry
;
devfs_entry
=
dv1394_devfs_find
(
"dv"
);
devfs_entry
=
dv1394_devfs_find
(
"dv"
);
if
(
devfs_entry
!=
NULL
)
{
if
(
devfs_entry
!=
NULL
)
{
snprintf
(
buf
,
sizeof
(
buf
),
"host%d"
,
ohci
->
id
);
snprintf
(
buf
,
sizeof
(
buf
),
"host%d"
,
ohci
->
id
);
...
@@ -2880,6 +2883,7 @@ static void dv1394_add_host (struct hpsb_host *host)
...
@@ -2880,6 +2883,7 @@ static void dv1394_add_host (struct hpsb_host *host)
dv1394_devfs_add_dir
(
"NTSC"
,
devfs_entry
,
NULL
);
dv1394_devfs_add_dir
(
"NTSC"
,
devfs_entry
,
NULL
);
dv1394_devfs_add_dir
(
"PAL"
,
devfs_entry
,
NULL
);
dv1394_devfs_add_dir
(
"PAL"
,
devfs_entry
,
NULL
);
}
}
}
#endif
#endif
dv1394_init
(
ohci
,
DV1394_NTSC
,
MODE_RECEIVE
);
dv1394_init
(
ohci
,
DV1394_NTSC
,
MODE_RECEIVE
);
...
...
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