aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic-2.6/patches-2.6.26/403-ds1672_detect.patch
blob: 86c26346a8d1e5125a0fb5e1b2c91252561d52c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--- a/drivers/rtc/rtc-ds1672.c
+++ b/drivers/rtc/rtc-ds1672.c
@@ -13,10 +13,10 @@
 #include <linux/i2c.h>
 #include <linux/rtc.h>
 
-#define DRV_VERSION "0.3"
+#define DRV_VERSION "0.4"
 
-/* Addresses to scan: none. This chip cannot be detected. */
-static const unsigned short normal_i2c[] = { I2C_CLIENT_END };
+/* Addresses to scan: 0x68 */
+static const unsigned short normal_i2c[] = { 0x68, I2C_CLIENT_END };
 
 /* Insmod parameters */
 I2C_CLIENT_INSMOD;
r.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
--- a/fs/squashfs/inode.c
+++ b/fs/squashfs/inode.c
@@ -4,6 +4,9 @@
  * Copyright (c) 2002, 2003, 2004, 2005, 2006
  * Phillip Lougher <phillip@lougher.org.uk>
  *
+ * LZMA decompressor support added by Oleg I. Vdovikin
+ * Copyright (c) 2005 Oleg I.Vdovikin <oleg@cs.msu.su>
+ *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
  * as published by the Free Software Foundation; either version 2,
@@ -21,6 +24,7 @@
  * inode.c
  */
 
+#define SQUASHFS_LZMA
 #include <linux/types.h>
 #include <linux/squashfs_fs.h>
 #include <linux/module.h>
@@ -44,6 +48,19 @@
 
 #include "squashfs.h"
 
+#ifdef SQUASHFS_LZMA
+#include <linux/LzmaDecode.h>
+
+/* default LZMA settings, should be in sync with mksquashfs */
+#define LZMA_LC 3
+#define LZMA_LP 0
+#define LZMA_PB 2
+
+#define LZMA_WORKSPACE_SIZE ((LZMA_BASE_SIZE + \
+      (LZMA_LIT_SIZE << (LZMA_LC + LZMA_LP))) * sizeof(CProb))
+
+#endif
+
 static void squashfs_put_super(struct super_block *);
 static int squashfs_statfs(struct dentry *, struct kstatfs *);
 static int squashfs_symlink_readpage(struct file *file, struct page *page);
@@ -64,7 +81,11 @@ static int squashfs_get_sb(struct file_s
 			const char *, void *, struct vfsmount *);
 
 
+#ifdef SQUASHFS_LZMA
+static unsigned char lzma_workspace[LZMA_WORKSPACE_SIZE];
+#else
 static z_stream stream;
+#endif
 
 static struct file_system_type squashfs_fs_type = {
 	.owner = THIS_MODULE,
@@ -249,6 +270,15 @@ SQSH_EXTERN unsigned int squashfs_read_d
 	if (compressed) {
 		int zlib_err;
 
+#ifdef SQUASHFS_LZMA
+		if ((zlib_err = LzmaDecode(lzma_workspace,
+			LZMA_WORKSPACE_SIZE, LZMA_LC, LZMA_LP, LZMA_PB,
+			c_buffer, c_byte, buffer, msblk->read_size, &bytes)) != LZMA_RESULT_OK)
+		{
+			ERROR("lzma returned unexpected result 0x%x\n", zlib_err);
+			bytes = 0;
+		}
+#else
 		stream.next_in = c_buffer;
 		stream.avail_in = c_byte;
 		stream.next_out = buffer;
@@ -263,7 +293,7 @@ SQSH_EXTERN unsigned int squashfs_read_d
 			bytes = 0;
 		} else
 			bytes = stream.total_out;
-
+#endif
 		up(&msblk->read_data_mutex);
 	}
 
@@ -2045,15 +2075,19 @@ static int __init init_squashfs_fs(void)
 	printk(KERN_INFO "squashfs: version 3.0 (2006/03/15) "
 		"Phillip Lougher\n");
 
+#ifndef SQUASHFS_LZMA
 	if (!(stream.workspace = vmalloc(zlib_inflate_workspacesize()))) {
 		ERROR("Failed to allocate zlib workspace\n");
 		destroy_inodecache();
 		err = -ENOMEM;
 		goto out;
 	}
+#endif
 
 	if ((err = register_filesystem(&squashfs_fs_type))) {
+#ifndef SQUASHFS_LZMA
 		vfree(stream.workspace);
+#endif
 		destroy_inodecache();
 	}
 
@@ -2064,7 +2098,9 @@ out:
 
 static void __exit exit_squashfs_fs(void)
 {
+#ifndef SQUASHFS_LZMA
 	vfree(stream.workspace);
+#endif
 	unregister_filesystem(&squashfs_fs_type);
 	destroy_inodecache();
 }