Skip to content
Permalink
Browse files

teamd: kill unused ->state_ops

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
  • Loading branch information
jpirko committed May 3, 2013
1 parent 214afad commit 4b9892497d829fd8866100fb6db81e80fca06887
Showing with 1 addition and 16 deletions.
  1. +1 −15 teamd/teamd.c
  2. +0 −1 teamd/teamd.h
@@ -884,24 +884,13 @@ static int teamd_runner_init(struct teamd_context *ctx)
return -ENOMEM;
}

if (ctx->runner->state_ops) {
err = teamd_state_ops_register(ctx, ctx->runner->state_ops,
ctx->runner_priv);
if (err)
goto free_runner_priv;
}

if (ctx->runner->init) {
err = ctx->runner->init(ctx, ctx->runner_priv);
if (err)
goto runner_state_unreg;
goto free_runner_priv;
}
return 0;

runner_state_unreg:
if (ctx->runner->state_ops)
teamd_state_ops_unregister(ctx, ctx->runner->state_ops,
ctx->runner_priv);
free_runner_priv:
free(ctx->runner_priv);
return err;
@@ -911,9 +900,6 @@ static void teamd_runner_fini(struct teamd_context *ctx)
{
if (ctx->runner->fini)
ctx->runner->fini(ctx, ctx->runner_priv);
if (ctx->runner->state_ops)
teamd_state_ops_unregister(ctx, ctx->runner->state_ops,
ctx->runner_priv);
free(ctx->runner_priv);
ctx->runner = NULL;
}
@@ -128,7 +128,6 @@ struct teamd_runner {
size_t priv_size;
int (*init)(struct teamd_context *ctx, void *priv);
void (*fini)(struct teamd_context *ctx, void *priv);
const struct teamd_state_ops *state_ops;
};

struct teamd_event_watch_ops {

0 comments on commit 4b98924

Please sign in to comment.
You can’t perform that action at this time.