diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2005-12-27 20:57:40 -0800 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-01-03 13:11:23 -0800 |
commit | 17ba15fb6264f27374bc87f4c3f8519b80289d85 (patch) | |
tree | 3134abef98d88aa029aa7faa72d8a41686644e99 /drivers/net/pppox.c | |
parent | 8639a11e23d9eb0a6ceac2feed27acdfbb158f95 (diff) | |
download | lwn-17ba15fb6264f27374bc87f4c3f8519b80289d85.tar.gz lwn-17ba15fb6264f27374bc87f4c3f8519b80289d85.zip |
[PPPOX]: Fix assignment into const proto_ops.
And actually, with this, the whole pppox layer can basically
be removed and subsumed into pppoe.c, no other pppox sub-protocol
implementation exists and we've had this thing for at least 4
years.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/pppox.c')
-rw-r--r-- | drivers/net/pppox.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/net/pppox.c b/drivers/net/pppox.c index 0c1e114527fb..9315046b3f55 100644 --- a/drivers/net/pppox.c +++ b/drivers/net/pppox.c @@ -68,8 +68,7 @@ EXPORT_SYMBOL(register_pppox_proto); EXPORT_SYMBOL(unregister_pppox_proto); EXPORT_SYMBOL(pppox_unbind_sock); -static int pppox_ioctl(struct socket* sock, unsigned int cmd, - unsigned long arg) +int pppox_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) { struct sock *sk = sock->sk; struct pppox_sock *po = pppox_sk(sk); @@ -105,6 +104,7 @@ static int pppox_ioctl(struct socket* sock, unsigned int cmd, return rc; } +EXPORT_SYMBOL(pppox_ioctl); static int pppox_create(struct socket *sock, int protocol) { @@ -119,11 +119,7 @@ static int pppox_create(struct socket *sock, int protocol) goto out; rc = pppox_protos[protocol]->create(sock); - if (!rc) { - /* We get to set the ioctl handler. */ - /* For everything else, pppox is just a shell. */ - sock->ops->ioctl = pppox_ioctl; - } + module_put(pppox_protos[protocol]->owner); out: return rc; |