From: Mathieu Desnoyers Date: Fri, 3 Sep 2010 14:53:05 +0000 (-0400) Subject: Fix circular module deps. X-Git-Tag: v0.19~1 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=13c601172bb6ede4e4595c718d96410173f933af;p=lttng-modules.git Fix circular module deps. Also add .gitignore. Signed-off-by: Mathieu Desnoyers --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..8faa6c02 --- /dev/null +++ b/.gitignore @@ -0,0 +1,79 @@ +# +# NOTE! Don't add files that are generated in specific +# subdirectories here. Add them in the ".gitignore" file +# in that subdirectory instead. +# +# NOTE! Please use 'git ls-files -i --exclude-standard' +# command after changing this file, to see if there are +# any tracked files which get ignored after the change. +# +# Normal rules +# +.* +*.o +*.o.* +*.a +*.s +*.ko +*.so +*.so.dbg +*.mod.c +*.i +*.lst +*.symtypes +*.order +modules.builtin +*.elf +*.bin +*.gz +*.bz2 +*.lzma +*.lzo +*.patch +*.gcno + +# +# Top-level generic files +# +/tags +/TAGS +/linux +/vmlinux +/vmlinuz +/System.map +/Module.markers +/Module.symvers + +# +# git files that we don't want to ignore even it they are dot-files +# +!.gitignore +!.mailmap + +# +# Generated include files +# +include/config +include/linux/version.h +include/generated + +# stgit generated dirs +patches-* + +# quilt's files +patches +series + +# cscope files +cscope.* +ncscope.* + +# gnu global files +GPATH +GRTAGS +GSYMS +GTAGS + +*.orig +*~ +\#*# diff --git a/Makefile b/Makefile index b9f48ca9..befc98e0 100644 --- a/Makefile +++ b/Makefile @@ -11,17 +11,15 @@ obj-m += ltt-marker-control.o obj-m += ltt-relay.o ltt-relay-objs := ltt-relay-lockless.o ltt-relay-alloc.o ltt-relay-splice.o \ - ltt-relay-vfs.o ltt-event-header.o + ltt-relay-vfs.o ltt-event-header.o ltt-ascii.o \ + ltt-serialize.o ltt-type-serializer.o -obj-m += ltt-serialize.o obj-m += ltt-statedump.o -obj-m += ltt-type-serializer.o obj-m += ltt-trace-control.o obj-m += ltt-userspace-event.o obj-m += ltt-filter.o obj-m += ltt-kprobes.o obj-m += probes/ -obj-m += ltt-ascii.o endif diff --git a/ltt-ascii.c b/ltt-ascii.c index 975f94ad..ed3c20d5 100644 --- a/ltt-ascii.c +++ b/ltt-ascii.c @@ -565,7 +565,7 @@ void ltt_ascii_remove_dir(struct ltt_trace *trace) } EXPORT_SYMBOL_GPL(ltt_ascii_remove_dir); -static __init int ltt_ascii_init(void) +__init int ltt_ascii_init(void) { ltt_ascii_dir_dentry = debugfs_create_dir(LTT_ASCII, get_ltt_root()); put_ltt_root(); @@ -573,14 +573,11 @@ static __init int ltt_ascii_init(void) return ltt_ascii_dir_dentry ? 0 : -EFAULT; } -static __exit void ltt_ascii_exit(void) +__exit void ltt_ascii_exit(void) { debugfs_remove(ltt_ascii_dir_dentry); } -module_init(ltt_ascii_init); -module_exit(ltt_ascii_exit); - MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Lai Jiangshan@FNST and Mathieu Desnoyers"); MODULE_DESCRIPTION("Linux Trace Toolkit Next Generation Ascii Converter"); diff --git a/ltt-relay-alloc.c b/ltt-relay-alloc.c index a6697dec..6ff552ef 100644 --- a/ltt-relay-alloc.c +++ b/ltt-relay-alloc.c @@ -720,11 +720,13 @@ static __init int ltt_relay_alloc_init(void) { hotcpu_notifier(ltt_relay_hotcpu_callback, 5); ltt_relay_init(); + ltt_ascii_init(); return 0; } static void __exit ltt_relay_alloc_exit(void) { + ltt_ascii_exit(); ltt_relay_exit(); } diff --git a/ltt-relay.h b/ltt-relay.h index c79403bf..3c23a8eb 100644 --- a/ltt-relay.h +++ b/ltt-relay.h @@ -374,4 +374,7 @@ ssize_t ltt_relay_file_splice_read(struct file *in, loff_t *ppos, unsigned int flags); loff_t ltt_relay_no_llseek(struct file *file, loff_t offset, int origin); +extern int ltt_ascii_init(void); +extern void ltt_ascii_exit(void); + #endif /* _LINUX_LTT_RELAY_H */