Squashfs: simplify CONFIG_SQUASHFS_LZO handling
authorPhillip Lougher <phillip@lougher.demon.co.uk>
Wed, 5 Jan 2011 18:23:53 +0000 (18:23 +0000)
committerPhillip Lougher <phillip@lougher.demon.co.uk>
Thu, 13 Jan 2011 21:38:46 +0000 (21:38 +0000)
Get rid of messy repeated #if(n)def CONFIG_SQUASHFS_LZO code
in decompressor.c

Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
fs/squashfs/decompressor.c
fs/squashfs/decompressor.h
fs/squashfs/squashfs.h

index 50b22d3..a5940e5 100644 (file)
@@ -40,7 +40,7 @@ static const struct squashfs_decompressor squashfs_lzma_unsupported_comp_ops = {
 };
 
 #ifndef CONFIG_SQUASHFS_LZO
-static const struct squashfs_decompressor squashfs_lzo_unsupported_comp_ops = {
+static const struct squashfs_decompressor squashfs_lzo_comp_ops = {
        NULL, NULL, NULL, LZO_COMPRESSION, "lzo", 0
 };
 #endif
@@ -57,13 +57,9 @@ static const struct squashfs_decompressor squashfs_unknown_comp_ops = {
 
 static const struct squashfs_decompressor *decompressor[] = {
        &squashfs_zlib_comp_ops,
-       &squashfs_lzma_unsupported_comp_ops,
-#ifdef CONFIG_SQUASHFS_LZO
        &squashfs_lzo_comp_ops,
-#else
-       &squashfs_lzo_unsupported_comp_ops,
-#endif
        &squashfs_xz_comp_ops,
+       &squashfs_lzma_unsupported_comp_ops,
        &squashfs_unknown_comp_ops
 };
 
index 57e1acb..3b305a7 100644 (file)
@@ -57,4 +57,8 @@ static inline int squashfs_decompress(struct squashfs_sb_info *msblk,
 extern const struct squashfs_decompressor squashfs_xz_comp_ops;
 #endif
 
+#ifdef CONFIG_SQUASHFS_LZO
+extern const struct squashfs_decompressor squashfs_lzo_comp_ops;
+#endif
+
 #endif
index 18f187f..ba729d8 100644 (file)
@@ -99,6 +99,3 @@ extern const struct xattr_handler *squashfs_xattr_handlers[];
 
 /* zlib_wrapper.c */
 extern const struct squashfs_decompressor squashfs_zlib_comp_ops;
-
-/* lzo_wrapper.c */
-extern const struct squashfs_decompressor squashfs_lzo_comp_ops;