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
af3d7b0a
Commit
af3d7b0a
authored
May 07, 2003
by
Christoph Hellwig
Committed by
David S. Miller
May 07, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SLIP]: Move over to initcalls.
parent
a09a624a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
45 deletions
+22
-45
drivers/net/setup.c
drivers/net/setup.c
+0
-4
drivers/net/slip.c
drivers/net/slip.c
+22
-37
drivers/net/slip.h
drivers/net/slip.h
+0
-4
No files found.
drivers/net/setup.c
View file @
af3d7b0a
...
@@ -9,7 +9,6 @@
...
@@ -9,7 +9,6 @@
#include <linux/init.h>
#include <linux/init.h>
#include <linux/netlink.h>
#include <linux/netlink.h>
extern
int
slip_init_ctrl_dev
(
void
);
extern
int
x25_asy_init_ctrl_dev
(
void
);
extern
int
x25_asy_init_ctrl_dev
(
void
);
extern
int
dmascc_init
(
void
);
extern
int
dmascc_init
(
void
);
...
@@ -109,9 +108,6 @@ static void __init network_probe(void)
...
@@ -109,9 +108,6 @@ static void __init network_probe(void)
static
void
__init
network_ldisc_init
(
void
)
static
void
__init
network_ldisc_init
(
void
)
{
{
#if defined(CONFIG_SLIP)
slip_init_ctrl_dev
();
#endif
#if defined(CONFIG_X25_ASY)
#if defined(CONFIG_X25_ASY)
x25_asy_init_ctrl_dev
();
x25_asy_init_ctrl_dev
();
#endif
#endif
...
...
drivers/net/slip.c
View file @
af3d7b0a
...
@@ -81,11 +81,7 @@
...
@@ -81,11 +81,7 @@
#include <net/slhc_vj.h>
#include <net/slhc_vj.h>
#endif
#endif
#ifdef MODULE
#define SLIP_VERSION "0.8.4-NET3.019-NEWTTY-MODULAR"
#else
#define SLIP_VERSION "0.8.4-NET3.019-NEWTTY"
#define SLIP_VERSION "0.8.4-NET3.019-NEWTTY"
#endif
typedef
struct
slip_ctrl
{
typedef
struct
slip_ctrl
{
...
@@ -98,8 +94,6 @@ int slip_maxdev = SL_NRUNIT; /* Can be overridden with insmod! */
...
@@ -98,8 +94,6 @@ int slip_maxdev = SL_NRUNIT; /* Can be overridden with insmod! */
MODULE_PARM
(
slip_maxdev
,
"i"
);
MODULE_PARM
(
slip_maxdev
,
"i"
);
MODULE_PARM_DESC
(
slip_maxdev
,
"Maximum number of slip devices"
);
MODULE_PARM_DESC
(
slip_maxdev
,
"Maximum number of slip devices"
);
static
struct
tty_ldisc
sl_ldisc
;
static
int
slip_esc
(
unsigned
char
*
p
,
unsigned
char
*
d
,
int
len
);
static
int
slip_esc
(
unsigned
char
*
p
,
unsigned
char
*
d
,
int
len
);
static
void
slip_unesc
(
struct
slip
*
sl
,
unsigned
char
c
);
static
void
slip_unesc
(
struct
slip
*
sl
,
unsigned
char
c
);
#ifdef CONFIG_SLIP_MODE_SLIP6
#ifdef CONFIG_SLIP_MODE_SLIP6
...
@@ -1309,13 +1303,24 @@ static int sl_ioctl(struct net_device *dev,struct ifreq *rq,int cmd)
...
@@ -1309,13 +1303,24 @@ static int sl_ioctl(struct net_device *dev,struct ifreq *rq,int cmd)
#endif
#endif
/* VSV changes end */
/* VSV changes end */
/* Initialize SLIP control device -- register SLIP line discipline */
static
struct
tty_ldisc
sl_ldisc
=
{
.
owner
=
THIS_MODULE
,
.
magic
=
TTY_LDISC_MAGIC
,
.
name
=
"slip"
,
.
open
=
slip_open
,
.
close
=
slip_close
,
.
ioctl
=
slip_ioctl
,
.
receive_buf
=
slip_receive_buf
,
.
receive_room
=
slip_receive_room
,
.
write_wakeup
=
slip_write_wakeup
,
};
int
__init
slip_init_ctrl_dev
(
void
)
static
int
__init
slip_init
(
void
)
{
{
int
status
;
int
status
;
if
(
slip_maxdev
<
4
)
slip_maxdev
=
4
;
/* Sanity */
if
(
slip_maxdev
<
4
)
slip_maxdev
=
4
;
/* Sanity */
printk
(
KERN_INFO
"SLIP: version %s (dynamic channels, max=%d)"
printk
(
KERN_INFO
"SLIP: version %s (dynamic channels, max=%d)"
#ifdef CONFIG_SLIP_MODE_SLIP6
#ifdef CONFIG_SLIP_MODE_SLIP6
...
@@ -1323,16 +1328,15 @@ int __init slip_init_ctrl_dev(void)
...
@@ -1323,16 +1328,15 @@ int __init slip_init_ctrl_dev(void)
#endif
#endif
".
\n
"
,
".
\n
"
,
SLIP_VERSION
,
slip_maxdev
);
SLIP_VERSION
,
slip_maxdev
);
#if defined(SL_INCLUDE_CSLIP)
&& !defined(MODULE)
#if defined(SL_INCLUDE_CSLIP)
printk
(
KERN_INFO
"CSLIP: code copyright 1989 Regents of the University of California.
\n
"
);
printk
(
KERN_INFO
"CSLIP: code copyright 1989 Regents of the University of California.
\n
"
);
#endif
#endif
#ifdef CONFIG_SLIP_SMART
#ifdef CONFIG_SLIP_SMART
printk
(
KERN_INFO
"SLIP linefill/keepalive option.
\n
"
);
printk
(
KERN_INFO
"SLIP linefill/keepalive option.
\n
"
);
#endif
#endif
slip_ctrls
=
(
slip_ctrl_t
**
)
kmalloc
(
sizeof
(
void
*
)
*
slip_maxdev
,
GFP_KERNEL
);
slip_ctrls
=
kmalloc
(
sizeof
(
void
*
)
*
slip_maxdev
,
GFP_KERNEL
);
if
(
slip_ctrls
==
NULL
)
if
(
!
slip_ctrls
)
{
{
printk
(
KERN_ERR
"SLIP: Can't allocate slip_ctrls[] array! Uaargh! (-> No SLIP available)
\n
"
);
printk
(
KERN_ERR
"SLIP: Can't allocate slip_ctrls[] array! Uaargh! (-> No SLIP available)
\n
"
);
return
-
ENOMEM
;
return
-
ENOMEM
;
}
}
...
@@ -1347,28 +1351,7 @@ int __init slip_init_ctrl_dev(void)
...
@@ -1347,28 +1351,7 @@ int __init slip_init_ctrl_dev(void)
return
status
;
return
status
;
}
}
static
struct
tty_ldisc
sl_ldisc
=
static
void
__exit
slip_exit
(
void
)
{
.
owner
=
THIS_MODULE
,
.
magic
=
TTY_LDISC_MAGIC
,
.
name
=
"slip"
,
.
open
=
slip_open
,
.
close
=
slip_close
,
.
ioctl
=
slip_ioctl
,
.
receive_buf
=
slip_receive_buf
,
.
receive_room
=
slip_receive_room
,
.
write_wakeup
=
slip_write_wakeup
,
};
#ifdef MODULE
int
init_module
(
void
)
{
return
slip_init_ctrl_dev
();
}
void
cleanup_module
(
void
)
{
{
int
i
;
int
i
;
...
@@ -1425,7 +1408,9 @@ cleanup_module(void)
...
@@ -1425,7 +1408,9 @@ cleanup_module(void)
printk
(
KERN_ERR
"SLIP: can't unregister line discipline (err = %d)
\n
"
,
i
);
printk
(
KERN_ERR
"SLIP: can't unregister line discipline (err = %d)
\n
"
,
i
);
}
}
}
}
#endif
/* MODULE */
module_init
(
slip_init
);
module_exit
(
slip_exit
);
#ifdef CONFIG_SLIP_SMART
#ifdef CONFIG_SLIP_SMART
/*
/*
...
...
drivers/net/slip.h
View file @
af3d7b0a
...
@@ -116,10 +116,6 @@ struct slip {
...
@@ -116,10 +116,6 @@ struct slip {
#endif
#endif
};
};
#define SLIP_MAGIC 0x5302
#define SLIP_MAGIC 0x5302
extern
int
slip_init
(
struct
net_device
*
dev
);
#endif
/* _LINUX_SLIP.H */
#endif
/* _LINUX_SLIP.H */
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