struct c_can_priv *priv = netdev_priv(dev);
/* enable automatic retransmission */
- priv->write_reg(priv, &priv->regs->control,
+ priv->write_reg(priv, C_CAN_CTRL_REG,
CONTROL_ENABLE_AR);
- if (priv->can.ctrlmode & (CAN_CTRLMODE_LISTENONLY &
- CAN_CTRLMODE_LOOPBACK)) {
+ if ((priv->can.ctrlmode & CAN_CTRLMODE_LISTENONLY) &&
+ (priv->can.ctrlmode & CAN_CTRLMODE_LOOPBACK)) {
/* loopback + silent mode : useful for hot self-test */
- priv->write_reg(priv, &priv->regs->control, CONTROL_EIE |
+ priv->write_reg(priv, C_CAN_CTRL_REG, CONTROL_EIE |
CONTROL_SIE | CONTROL_IE | CONTROL_TEST);
- priv->write_reg(priv, &priv->regs->test,
+ priv->write_reg(priv, C_CAN_TEST_REG,
TEST_LBACK | TEST_SILENT);
} else if (priv->can.ctrlmode & CAN_CTRLMODE_LOOPBACK) {
/* loopback mode : useful for self-test function */
if (ret)
goto out_dst_entries;
- ret = register_pernet_subsys(&ip6_route_net_ops);
+ ret = register_pernet_subsys(&ipv6_inetpeer_ops);
if (ret)
- goto out_register_subsys;
+ goto out_fib6_init;
+
++ ret = register_pernet_subsys(&ip6_route_net_ops);
++ if (ret)
++ goto out_register_inetpeer;
+
ip6_dst_blackhole_ops.kmem_cachep = ip6_dst_ops_template.kmem_cachep;
/* Registering of the loopback is done before this portion of code,
fib6_rules_cleanup();
xfrm6_init:
xfrm6_fini();
- out_fib6_init:
- fib6_gc_cleanup();
- out_register_inetpeer:
- unregister_pernet_subsys(&ipv6_inetpeer_ops);
+ out_fib6_init_late:
+ fib6_cleanup_late();
out_register_subsys:
unregister_pernet_subsys(&ip6_route_net_ops);
++out_register_inetpeer:
++ unregister_pernet_subsys(&ipv6_inetpeer_ops);
+ out_fib6_init:
+ fib6_gc_cleanup();
out_dst_entries:
dst_entries_destroy(&ip6_dst_blackhole_ops);
out_kmem_cache: