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
c17df7f9
Commit
c17df7f9
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: use module_init()
Init of low-level drivers (except parport_pc) turned into module_init().
parent
8b78f3bd
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
60 deletions
+29
-60
drivers/parport/init.c
drivers/parport/init.c
+0
-19
drivers/parport/parport_amiga.c
drivers/parport/parport_amiga.c
+2
-2
drivers/parport/parport_arc.c
drivers/parport/parport_arc.c
+3
-1
drivers/parport/parport_atari.c
drivers/parport/parport_atari.c
+14
-22
drivers/parport/parport_mfc3.c
drivers/parport/parport_mfc3.c
+2
-3
drivers/parport/parport_sunbpp.c
drivers/parport/parport_sunbpp.c
+8
-13
No files found.
drivers/parport/init.c
View file @
c17df7f9
...
...
@@ -28,10 +28,6 @@ static int irq[PARPORT_MAX] __initdata = { [0 ... PARPORT_MAX-1] = PARPORT_IRQ_P
static
int
dma
[
PARPORT_MAX
]
__initdata
=
{
[
0
...
PARPORT_MAX
-
1
]
=
PARPORT_DMA_NONE
};
extern
int
parport_pc_init
(
int
*
io
,
int
*
io_hi
,
int
*
irq
,
int
*
dma
);
extern
int
parport_sunbpp_init
(
void
);
extern
int
parport_amiga_init
(
void
);
extern
int
parport_mfc3_init
(
void
);
extern
int
parport_atari_init
(
void
);
static
int
parport_setup_ptr
__initdata
=
0
;
...
...
@@ -148,21 +144,6 @@ int __init parport_init (void)
#ifdef CONFIG_PARPORT_PC
parport_pc_init
(
io
,
io_hi
,
irq
,
dma
);
#endif
#ifdef CONFIG_PARPORT_AMIGA
parport_amiga_init
();
#endif
#ifdef CONFIG_PARPORT_MFC3
parport_mfc3_init
();
#endif
#ifdef CONFIG_PARPORT_ATARI
parport_atari_init
();
#endif
#ifdef CONFIG_PARPORT_ARC
parport_arc_init
();
#endif
#ifdef CONFIG_PARPORT_SUNBPP
parport_sunbpp_init
();
#endif
return
0
;
}
...
...
drivers/parport/parport_amiga.c
View file @
c17df7f9
...
...
@@ -234,7 +234,7 @@ static struct parport_operations pp_amiga_ops = {
/* ----------- Initialisation code --------------------------------- */
int
__init
parport_amiga_init
(
void
)
static
int
__init
parport_amiga_init
(
void
)
{
struct
parport
*
p
;
int
err
;
...
...
@@ -276,7 +276,7 @@ int __init parport_amiga_init(void)
return
err
;
}
void
__exit
parport_amiga_exit
(
void
)
static
void
__exit
parport_amiga_exit
(
void
)
{
if
(
this_port
->
irq
!=
PARPORT_IRQ_NONE
)
free_irq
(
IRQ_AMIGA_CIAA_FLG
,
this_port
);
...
...
drivers/parport/parport_arc.c
View file @
c17df7f9
...
...
@@ -104,7 +104,7 @@ static struct parport_operations parport_arc_ops =
/* --- Initialisation code -------------------------------- */
int
parport_arc_init
(
void
)
static
int
parport_arc_init
(
void
)
{
/* Archimedes hardware provides only one port, at a fixed address */
struct
parport
*
p
;
...
...
@@ -136,3 +136,5 @@ int parport_arc_init(void)
return
1
;
}
module_init
(
parport_arc_init
)
drivers/parport/parport_atari.c
View file @
c17df7f9
...
...
@@ -185,8 +185,7 @@ static struct parport_operations parport_atari_ops = {
};
int
__init
parport_atari_init
(
void
)
static
int
__init
parport_atari_init
(
void
)
{
struct
parport
*
p
;
unsigned
long
flags
;
...
...
@@ -208,11 +207,11 @@ parport_atari_init(void)
IRQ_MFP_BUSY
,
PARPORT_DMA_NONE
,
&
parport_atari_ops
);
if
(
!
p
)
return
0
;
return
-
ENODEV
;
if
(
request_irq
(
IRQ_MFP_BUSY
,
parport_atari_interrupt
,
IRQ_TYPE_SLOW
,
p
->
name
,
p
))
{
parport_unregister_port
(
p
);
return
0
;
return
-
ENODEV
;
}
this_port
=
p
;
...
...
@@ -221,30 +220,23 @@ parport_atari_init(void)
parport_announce_port
(
p
);
return
1
;
}
return
0
;
}
return
-
ENODEV
;
}
#ifdef MODULE
MODULE_AUTHOR
(
"Andreas Schwab"
);
MODULE_DESCRIPTION
(
"Parport Driver for Atari builtin Port"
);
MODULE_SUPPORTED_DEVICE
(
"Atari builtin Parallel Port"
);
MODULE_LICENSE
(
"GPL"
);
int
init_module
(
void
)
{
return
parport_atari_init
()
?
0
:
-
ENODEV
;
}
void
cleanup_module
(
void
)
static
void
__exit
parport_atari_exit
(
void
)
{
if
(
this_port
->
irq
!=
PARPORT_IRQ_NONE
)
free_irq
(
IRQ_MFP_BUSY
,
this_port
);
parport_proc_unregister
(
this_port
);
parport_unregister_port
(
this_port
);
}
#endif
MODULE_AUTHOR
(
"Andreas Schwab"
);
MODULE_DESCRIPTION
(
"Parport Driver for Atari builtin Port"
);
MODULE_SUPPORTED_DEVICE
(
"Atari builtin Parallel Port"
);
MODULE_LICENSE
(
"GPL"
);
module_init
(
parport_atari_init
)
module_exit
(
parport_atari_exit
)
drivers/parport/parport_mfc3.c
View file @
c17df7f9
...
...
@@ -320,7 +320,7 @@ static struct parport_operations pp_mfc3_ops = {
/* ----------- Initialisation code --------------------------------- */
int
__init
parport_mfc3_init
(
void
)
static
int
__init
parport_mfc3_init
(
void
)
{
struct
parport
*
p
;
int
pias
=
0
;
...
...
@@ -378,7 +378,7 @@ int __init parport_mfc3_init(void)
return
pias
?
0
:
-
ENODEV
;
}
void
__exit
parport_mfc3_exit
(
void
)
static
void
__exit
parport_mfc3_exit
(
void
)
{
int
i
;
...
...
@@ -403,4 +403,3 @@ MODULE_LICENSE("GPL");
module_init
(
parport_mfc3_init
)
module_exit
(
parport_mfc3_exit
)
drivers/parport/parport_sunbpp.c
View file @
c17df7f9
...
...
@@ -349,11 +349,7 @@ static int __init init_one_port(struct sbus_dev *sdev)
return
1
;
}
#ifdef MODULE
int
init_module
(
void
)
#else
int
__init
parport_sunbpp_init
(
void
)
#endif
static
int
__init
parport_sunbpp_init
(
void
)
{
struct
sbus_bus
*
sbus
;
struct
sbus_dev
*
sdev
;
...
...
@@ -368,13 +364,7 @@ int __init parport_sunbpp_init(void)
return
count
?
0
:
-
ENODEV
;
}
#ifdef MODULE
MODULE_AUTHOR
(
"Derrick J Brashear"
);
MODULE_DESCRIPTION
(
"Parport Driver for Sparc bidirectional Port"
);
MODULE_SUPPORTED_DEVICE
(
"Sparc Bidirectional Parallel Port"
);
void
cleanup_module
(
void
)
static
void
__exit
parport_sunbpp_exit
(
void
)
{
struct
parport
*
p
=
parport_enumerate
();
...
...
@@ -396,6 +386,11 @@ cleanup_module(void)
p
=
next
;
}
}
#endif
MODULE_AUTHOR
(
"Derrick J Brashear"
);
MODULE_DESCRIPTION
(
"Parport Driver for Sparc bidirectional Port"
);
MODULE_SUPPORTED_DEVICE
(
"Sparc Bidirectional Parallel Port"
);
MODULE_LICENSE
(
"GPL"
);
module_init
(
parport_sunbpp_init
)
module_exit
(
parport_sunbpp_exit
)
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