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
24cade1f
Commit
24cade1f
authored
Dec 03, 2002
by
Alexander Viro
Committed by
Linus Torvalds
Dec 03, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] vfc cleanup
switched to devfs_remove(), killed gratitious devfs_handle_t field.
parent
436d67c6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
9 deletions
+6
-9
drivers/sbus/char/vfc.h
drivers/sbus/char/vfc.h
+0
-1
drivers/sbus/char/vfc_dev.c
drivers/sbus/char/vfc_dev.c
+6
-8
No files found.
drivers/sbus/char/vfc.h
View file @
24cade1f
...
@@ -128,7 +128,6 @@ struct vfc_dev {
...
@@ -128,7 +128,6 @@ struct vfc_dev {
volatile
struct
vfc_regs
*
regs
;
volatile
struct
vfc_regs
*
regs
;
struct
vfc_regs
*
phys_regs
;
struct
vfc_regs
*
phys_regs
;
unsigned
int
control_reg
;
unsigned
int
control_reg
;
devfs_handle_t
de
;
struct
semaphore
device_lock_sem
;
struct
semaphore
device_lock_sem
;
struct
timer_list
poll_timer
;
struct
timer_list
poll_timer
;
wait_queue_head_t
poll_wait
;
wait_queue_head_t
poll_wait
;
...
...
drivers/sbus/char/vfc_dev.c
View file @
24cade1f
...
@@ -44,7 +44,6 @@
...
@@ -44,7 +44,6 @@
#include <asm/vfc_ioctls.h>
#include <asm/vfc_ioctls.h>
static
struct
file_operations
vfc_fops
;
static
struct
file_operations
vfc_fops
;
static
devfs_handle_t
devfs_handle
;
/* For the directory */
struct
vfc_dev
**
vfc_dev_lst
;
struct
vfc_dev
**
vfc_dev_lst
;
static
char
vfcstr
[]
=
"vfc"
;
static
char
vfcstr
[]
=
"vfc"
;
static
unsigned
char
saa9051_init_array
[
VFC_SAA9051_NR
]
=
{
static
unsigned
char
saa9051_init_array
[
VFC_SAA9051_NR
]
=
{
...
@@ -144,7 +143,7 @@ int init_vfc_devstruct(struct vfc_dev *dev, int instance)
...
@@ -144,7 +143,7 @@ int init_vfc_devstruct(struct vfc_dev *dev, int instance)
int
init_vfc_device
(
struct
sbus_dev
*
sdev
,
struct
vfc_dev
*
dev
,
int
instance
)
int
init_vfc_device
(
struct
sbus_dev
*
sdev
,
struct
vfc_dev
*
dev
,
int
instance
)
{
{
char
devname
[
8
];
char
devname
[
16
];
if
(
dev
==
NULL
)
{
if
(
dev
==
NULL
)
{
printk
(
KERN_ERR
"VFC: Bogus pointer passed
\n
"
);
printk
(
KERN_ERR
"VFC: Bogus pointer passed
\n
"
);
...
@@ -168,8 +167,8 @@ int init_vfc_device(struct sbus_dev *sdev,struct vfc_dev *dev, int instance)
...
@@ -168,8 +167,8 @@ int init_vfc_device(struct sbus_dev *sdev,struct vfc_dev *dev, int instance)
if
(
init_vfc_hw
(
dev
))
if
(
init_vfc_hw
(
dev
))
return
-
EIO
;
return
-
EIO
;
sprintf
(
devname
,
"%d"
,
instance
);
sprintf
(
devname
,
"
vfc/
%d"
,
instance
);
dev
->
de
=
devfs_register
(
devfs_handle
,
devname
,
DEVFS_FL_DEFAULT
,
dev
->
de
=
devfs_register
(
NULL
,
devname
,
DEVFS_FL_DEFAULT
,
VFC_MAJOR
,
instance
,
VFC_MAJOR
,
instance
,
S_IFCHR
|
S_IRUSR
|
S_IWUSR
,
S_IFCHR
|
S_IRUSR
|
S_IWUSR
,
&
vfc_fops
,
NULL
);
&
vfc_fops
,
NULL
);
...
@@ -682,8 +681,7 @@ static int vfc_probe(void)
...
@@ -682,8 +681,7 @@ static int vfc_probe(void)
kfree
(
vfc_dev_lst
);
kfree
(
vfc_dev_lst
);
return
-
EIO
;
return
-
EIO
;
}
}
devfs_handle
=
devfs_mk_dir
(
NULL
,
"vfc"
,
NULL
);
devfs_mk_dir
(
NULL
,
"vfc"
,
NULL
);
instance
=
0
;
instance
=
0
;
for_all_sbusdev
(
sdev
,
sbus
)
{
for_all_sbusdev
(
sdev
,
sbus
)
{
if
(
strcmp
(
sdev
->
prom_name
,
"vfc"
)
==
0
)
{
if
(
strcmp
(
sdev
->
prom_name
,
"vfc"
)
==
0
)
{
...
@@ -723,7 +721,7 @@ static void deinit_vfc_device(struct vfc_dev *dev)
...
@@ -723,7 +721,7 @@ static void deinit_vfc_device(struct vfc_dev *dev)
{
{
if
(
dev
==
NULL
)
if
(
dev
==
NULL
)
return
;
return
;
devfs_
unregister
(
dev
->
d
e
);
devfs_
remove
(
"vfc/%d"
,
dev
->
instanc
e
);
sbus_iounmap
((
unsigned
long
)
dev
->
regs
,
sizeof
(
struct
vfc_regs
));
sbus_iounmap
((
unsigned
long
)
dev
->
regs
,
sizeof
(
struct
vfc_regs
));
kfree
(
dev
);
kfree
(
dev
);
}
}
...
@@ -737,7 +735,7 @@ void cleanup_module(void)
...
@@ -737,7 +735,7 @@ void cleanup_module(void)
for
(
devp
=
vfc_dev_lst
;
*
devp
;
devp
++
)
for
(
devp
=
vfc_dev_lst
;
*
devp
;
devp
++
)
deinit_vfc_device
(
*
devp
);
deinit_vfc_device
(
*
devp
);
devfs_
unregister
(
devfs_handle
);
devfs_
remove
(
"vfc"
);
kfree
(
vfc_dev_lst
);
kfree
(
vfc_dev_lst
);
return
;
return
;
}
}
...
...
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