diff options
Diffstat (limited to 'drivers/net/pppoe.c')
-rw-r--r-- | drivers/net/pppoe.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/net/pppoe.c b/drivers/net/pppoe.c index 5f2090233d7b..7cbf6f9b51de 100644 --- a/drivers/net/pppoe.c +++ b/drivers/net/pppoe.c | |||
@@ -1185,17 +1185,17 @@ static int __init pppoe_init(void) | |||
1185 | { | 1185 | { |
1186 | int err; | 1186 | int err; |
1187 | 1187 | ||
1188 | err = proto_register(&pppoe_sk_proto, 0); | 1188 | err = register_pernet_gen_device(&pppoe_net_id, &pppoe_net_ops); |
1189 | if (err) | 1189 | if (err) |
1190 | goto out; | 1190 | goto out; |
1191 | 1191 | ||
1192 | err = register_pppox_proto(PX_PROTO_OE, &pppoe_proto); | 1192 | err = proto_register(&pppoe_sk_proto, 0); |
1193 | if (err) | 1193 | if (err) |
1194 | goto out_unregister_pppoe_proto; | 1194 | goto out_unregister_net_ops; |
1195 | 1195 | ||
1196 | err = register_pernet_gen_device(&pppoe_net_id, &pppoe_net_ops); | 1196 | err = register_pppox_proto(PX_PROTO_OE, &pppoe_proto); |
1197 | if (err) | 1197 | if (err) |
1198 | goto out_unregister_pppox_proto; | 1198 | goto out_unregister_pppoe_proto; |
1199 | 1199 | ||
1200 | dev_add_pack(&pppoes_ptype); | 1200 | dev_add_pack(&pppoes_ptype); |
1201 | dev_add_pack(&pppoed_ptype); | 1201 | dev_add_pack(&pppoed_ptype); |
@@ -1203,22 +1203,22 @@ static int __init pppoe_init(void) | |||
1203 | 1203 | ||
1204 | return 0; | 1204 | return 0; |
1205 | 1205 | ||
1206 | out_unregister_pppox_proto: | ||
1207 | unregister_pppox_proto(PX_PROTO_OE); | ||
1208 | out_unregister_pppoe_proto: | 1206 | out_unregister_pppoe_proto: |
1209 | proto_unregister(&pppoe_sk_proto); | 1207 | proto_unregister(&pppoe_sk_proto); |
1208 | out_unregister_net_ops: | ||
1209 | unregister_pernet_gen_device(pppoe_net_id, &pppoe_net_ops); | ||
1210 | out: | 1210 | out: |
1211 | return err; | 1211 | return err; |
1212 | } | 1212 | } |
1213 | 1213 | ||
1214 | static void __exit pppoe_exit(void) | 1214 | static void __exit pppoe_exit(void) |
1215 | { | 1215 | { |
1216 | unregister_pppox_proto(PX_PROTO_OE); | ||
1217 | dev_remove_pack(&pppoes_ptype); | ||
1218 | dev_remove_pack(&pppoed_ptype); | ||
1219 | unregister_netdevice_notifier(&pppoe_notifier); | 1216 | unregister_netdevice_notifier(&pppoe_notifier); |
1220 | unregister_pernet_gen_device(pppoe_net_id, &pppoe_net_ops); | 1217 | dev_remove_pack(&pppoed_ptype); |
1218 | dev_remove_pack(&pppoes_ptype); | ||
1219 | unregister_pppox_proto(PX_PROTO_OE); | ||
1221 | proto_unregister(&pppoe_sk_proto); | 1220 | proto_unregister(&pppoe_sk_proto); |
1221 | unregister_pernet_gen_device(pppoe_net_id, &pppoe_net_ops); | ||
1222 | } | 1222 | } |
1223 | 1223 | ||
1224 | module_init(pppoe_init); | 1224 | module_init(pppoe_init); |