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
Kirill Smelkov
linux
Commits
26deacb3
Commit
26deacb3
authored
Apr 20, 2003
by
Christoph Hellwig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] devfs: ipmi
parent
20389e3d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
10 deletions
+6
-10
drivers/char/ipmi/ipmi_devintf.c
drivers/char/ipmi/ipmi_devintf.c
+6
-10
No files found.
drivers/char/ipmi/ipmi_devintf.c
View file @
26deacb3
...
...
@@ -437,10 +437,7 @@ static struct file_operations ipmi_fops = {
static
int
ipmi_major
=
0
;
MODULE_PARM
(
ipmi_major
,
"i"
);
static
devfs_handle_t
devfs_handle
;
#define MAX_DEVICES 10
static
devfs_handle_t
handles
[
MAX_DEVICES
];
static
void
ipmi_new_smi
(
int
if_num
)
{
...
...
@@ -451,10 +448,9 @@ static void ipmi_new_smi(int if_num)
snprintf
(
name
,
sizeof
(
name
),
"ipmidev/%d"
,
if_num
);
handles
[
if_num
]
=
devfs_register
(
NULL
,
name
,
DEVFS_FL_NONE
,
ipmi_major
,
if_num
,
S_IFCHR
|
S_IRUSR
|
S_IWUSR
,
&
ipmi_fops
,
NULL
);
devfs_register
(
NULL
,
name
,
0
,
ipmi_major
,
if_num
,
S_IFCHR
|
S_IRUSR
|
S_IWUSR
,
&
ipmi_fops
,
NULL
);
}
static
void
ipmi_smi_gone
(
int
if_num
)
...
...
@@ -462,7 +458,7 @@ static void ipmi_smi_gone(int if_num)
if
(
if_num
>
MAX_DEVICES
)
return
;
devfs_
unregister
(
handles
[
if_num
]
);
devfs_
remove
(
"ipmidev/%d"
,
if_num
);
}
static
struct
ipmi_smi_watcher
smi_watcher
=
...
...
@@ -488,7 +484,7 @@ static __init int init_ipmi_devintf(void)
ipmi_major
=
rv
;
}
devfs_
handle
=
devfs_
mk_dir
(
DEVICE_NAME
);
devfs_mk_dir
(
DEVICE_NAME
);
rv
=
ipmi_smi_watcher_register
(
&
smi_watcher
);
if
(
rv
)
{
...
...
@@ -507,7 +503,7 @@ module_init(init_ipmi_devintf);
static
__exit
void
cleanup_ipmi
(
void
)
{
ipmi_smi_watcher_unregister
(
&
smi_watcher
);
devfs_
unregister
(
devfs_handle
);
devfs_
remove
(
DEVICE_NAME
);
unregister_chrdev
(
ipmi_major
,
DEVICE_NAME
);
}
module_exit
(
cleanup_ipmi
);
...
...
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