Skip to content

Commit

Permalink
[PATCH] MD: conditionalize some code
Browse files Browse the repository at this point in the history
The autorun code is only used if this module is built into the static
kernel image.  Adjust #ifdefs accordingly.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Acked-by: NeilBrown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Jeff Garzik authored and Linus Torvalds committed Dec 10, 2006
1 parent b875e53 commit fdee8ae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -3371,6 +3371,7 @@ static int do_md_stop(mddev_t * mddev, int mode)
return err;
}

#ifndef MODULE
static void autorun_array(mddev_t *mddev)
{
mdk_rdev_t *rdev;
Expand Down Expand Up @@ -3485,6 +3486,7 @@ static void autorun_devices(int part)
}
printk(KERN_INFO "md: ... autorun DONE.\n");
}
#endif /* !MODULE */

static int get_version(void __user * arg)
{
Expand Down Expand Up @@ -5593,7 +5595,7 @@ static void autostart_arrays(int part)
autorun_devices(part);
}

#endif
#endif /* !MODULE */

static __exit void md_exit(void)
{
Expand Down

0 comments on commit fdee8ae

Please sign in to comment.