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
00c16378
Commit
00c16378
authored
Mar 02, 2004
by
Alexander Viro
Committed by
Linus Torvalds
Mar 02, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] parport: sysctl registration
Registration of sysctls turned into module_init().
parent
c17df7f9
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
35 deletions
+9
-35
drivers/parport/Makefile
drivers/parport/Makefile
+1
-1
drivers/parport/init.c
drivers/parport/init.c
+0
-25
drivers/parport/procfs.c
drivers/parport/procfs.c
+8
-7
include/linux/parport.h
include/linux/parport.h
+0
-2
No files found.
drivers/parport/Makefile
View file @
00c16378
...
...
@@ -2,7 +2,7 @@
# Makefile for the kernel Parallel port device drivers.
#
parport-objs
:=
share.o ieee1284.o ieee1284_ops.o
init.o procfs
.o
parport-objs
:=
share.o ieee1284.o ieee1284_ops.o
procfs.o init
.o
ifeq
($(CONFIG_PARPORT_1284),y)
parport-objs
+=
daisy.o probe.o
...
...
drivers/parport/init.c
View file @
00c16378
...
...
@@ -113,35 +113,10 @@ static int __init parport_setup (char *str)
__setup
(
"parport="
,
parport_setup
);
#endif
#ifdef MODULE
int
init_module
(
void
)
{
#ifdef CONFIG_SYSCTL
parport_default_proc_register
();
#endif
return
0
;
}
void
cleanup_module
(
void
)
{
#ifdef CONFIG_SYSCTL
parport_default_proc_unregister
();
#endif
}
#else
int
__init
parport_init
(
void
)
{
if
(
io
[
0
]
==
PARPORT_DISABLE
)
return
1
;
#ifdef CONFIG_SYSCTL
parport_default_proc_register
();
#endif
#ifdef CONFIG_PARPORT_PC
parport_pc_init
(
io
,
io_hi
,
irq
,
dma
);
#endif
...
...
drivers/parport/procfs.c
View file @
00c16378
...
...
@@ -14,6 +14,7 @@
#include <linux/string.h>
#include <linux/config.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/errno.h>
#include <linux/kernel.h>
...
...
@@ -480,21 +481,20 @@ int parport_device_proc_unregister(struct pardevice *device)
return
0
;
}
in
t
parport_default_proc_register
(
void
)
static
int
__ini
t
parport_default_proc_register
(
void
)
{
parport_default_sysctl_table
.
sysctl_header
=
register_sysctl_table
(
parport_default_sysctl_table
.
dev_dir
,
0
);
return
0
;
}
in
t
parport_default_proc_unregister
(
void
)
static
void
__exi
t
parport_default_proc_unregister
(
void
)
{
if
(
parport_default_sysctl_table
.
sysctl_header
)
{
unregister_sysctl_table
(
parport_default_sysctl_table
.
sysctl_header
);
parport_default_sysctl_table
.
sysctl_header
=
NULL
;
}
return
0
;
}
#else
/* no sysctl or no procfs*/
...
...
@@ -519,12 +519,12 @@ int parport_device_proc_unregister(struct pardevice *device)
return
0
;
}
in
t
parport_default_proc_register
(
void
)
static
int
__ini
t
parport_default_proc_register
(
void
)
{
return
0
;
}
in
t
parport_default_proc_unregister
(
void
)
static
void
__exi
t
parport_default_proc_unregister
(
void
)
{
return
0
;
}
...
...
@@ -534,5 +534,6 @@ EXPORT_SYMBOL(parport_proc_register);
EXPORT_SYMBOL
(
parport_proc_unregister
);
EXPORT_SYMBOL
(
parport_device_proc_register
);
EXPORT_SYMBOL
(
parport_device_proc_unregister
);
EXPORT_SYMBOL
(
parport_default_proc_register
);
EXPORT_SYMBOL
(
parport_default_proc_unregister
);
module_init
(
parport_default_proc_register
)
module_exit
(
parport_default_proc_unregister
)
include/linux/parport.h
View file @
00c16378
...
...
@@ -538,8 +538,6 @@ extern int parport_proc_register(struct parport *pp);
extern
int
parport_proc_unregister
(
struct
parport
*
pp
);
extern
int
parport_device_proc_register
(
struct
pardevice
*
device
);
extern
int
parport_device_proc_unregister
(
struct
pardevice
*
device
);
extern
int
parport_default_proc_register
(
void
);
extern
int
parport_default_proc_unregister
(
void
);
/* If PC hardware is the only type supported, we can optimise a bit. */
#if (defined(CONFIG_PARPORT_PC) || defined(CONFIG_PARPORT_PC_MODULE)) && !(defined(CONFIG_PARPORT_ARC) || defined(CONFIG_PARPORT_ARC_MODULE)) && !(defined(CONFIG_PARPORT_AMIGA) || defined(CONFIG_PARPORT_AMIGA_MODULE)) && !(defined(CONFIG_PARPORT_MFC3) || defined(CONFIG_PARPORT_MFC3_MODULE)) && !(defined(CONFIG_PARPORT_ATARI) || defined(CONFIG_PARPORT_ATARI_MODULE)) && !(defined(CONFIG_USB_USS720) || defined(CONFIG_USB_USS720_MODULE)) && !(defined(CONFIG_PARPORT_SUNBPP) || defined(CONFIG_PARPORT_SUNBPP_MODULE)) && !defined(CONFIG_PARPORT_OTHER)
...
...
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