]> Devoid-pointer.net GitWeb - omnibook.git/commitdiff
* backlight API change in 2.6.21-rc : disable backlight binding for now
authorMathieu Bérard <mathieu.berard@crans.org>
Sun, 4 Mar 2007 17:13:45 +0000 (17:13 +0000)
committerMathieu Bérard <mathieu.berard@crans.org>
Sun, 4 Mar 2007 17:13:45 +0000 (17:13 +0000)
* Update version string
* Fix procfs read funtion: for a reason I don't really understand all read methods
  were called twice.

init.c
omnibook.h

diff --git a/init.c b/init.c
index 627cdc93f76f9072fbaba3f256292fa4cb293990..500ddfd1d2feee6668130039926923bf7b3bc898 100644 (file)
--- a/init.c
+++ b/init.c
@@ -149,24 +149,20 @@ static int procfile_read_dispatch(char *page, char **start, off_t off, int count
                                  void *data)
 {
        struct omnibook_feature *feature = (struct omnibook_feature *)data;
-       int len;
+       int len = 0;
 
        if (!feature || !feature->read)
                return -EINVAL;
 
+       if(off)
+               goto out;
+
        len = feature->read(page, feature->io_op);
        if (len < 0)
                return len;
 
-       if (len <= off + count)
-               *eof = 1;
-       *start = page + off;
-       len -= off;
-       if (len > count)
-               len = count;
-       if (len < 0)
-               len = 0;
-
+       out:
+       *eof = 1;
        return len;
 }
 
index 31a727fbcb0377e6970e52d691468778c412eb32..64e4030dc0957269899c576da579d2faf88ed236 100644 (file)
@@ -26,7 +26,7 @@
  */
 
 #define OMNIBOOK_MODULE_NAME           "omnibook"
-#define OMNIBOOK_MODULE_VERSION                "2.20060921-trunk"
+#define OMNIBOOK_MODULE_VERSION                "2.20070211-trunk"
 
 /*
  * EC types
@@ -151,7 +151,7 @@ void omnibook_report_key(struct input_dev *dev, unsigned int keycode);
  */
 
 #ifdef  OMNIBOOK_STANDALONE
-#if     (defined (CONFIG_BACKLIGHT_CLASS_DEVICE_MODULE) || defined(CONFIG_BACKLIGHT_CLASS_DEVICE)) && (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,16))
+#if     (defined (CONFIG_BACKLIGHT_CLASS_DEVICE_MODULE) || defined(CONFIG_BACKLIGHT_CLASS_DEVICE)) && (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,16)) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,21))
 #define CONFIG_OMNIBOOK_BACKLIGHT
 #else
 #undef  CONFIG_OMNIBOOK_BACKLIGHT