Re: [B.A.T.M.A.N.] [PATCH 2/3] batman-adv: convert batman iv algorithm to use dynamic infrastructure

Andrew Lunn
2011-11-28T19:02:45Z

> +static struct bat_algo bat_algo_iv __read_mostly = {
> .name = "BATMAN IV",
> + .bat_ogm_init = bat_ogm_init,
> + .bat_ogm_init_primary = bat_ogm_init_primary,
> + .bat_ogm_update_mac = bat_ogm_update_mac,
> + .bat_ogm_schedule = bat_ogm_schedule,
> + .bat_ogm_emit = bat_ogm_emit,
> + .bat_ogm_receive = bat_ogm_receive,
> };

This needs an .owner = THIS_MODULE,

so you can do reference counting on the module.

Andrew