Send commitlog mailing list submissions to
        commitlog@lists.openmoko.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.openmoko.org/mailman/listinfo/commitlog
or, via email, send a message with subject or body 'help' to
        [EMAIL PROTECTED]

You can reach the person managing the list at
        [EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of commitlog digest..."
Today's Topics:

   1. r3993 - branches/src/target/kernel/2.6.24.x/patches
      ([EMAIL PROTECTED])
   2. r3994 - trunk/src/target/gsm/src/gsmd
      ([EMAIL PROTECTED])
   3. r3995 - branches/src/target/kernel/2.6.24.x/patches
      ([EMAIL PROTECTED])
   4. r3996 - branches/src/target/kernel/2.6.24.x/patches
      ([EMAIL PROTECTED])
   5. r3997 - branches/src/target/kernel/2.6.24.x/patches
      ([EMAIL PROTECTED])
   6. r3998 - branches/src/target/kernel/2.6.24.x/patches
      ([EMAIL PROTECTED])
--- Begin Message ---
Author: werner
Date: 2008-01-31 10:23:37 +0100 (Thu, 31 Jan 2008)
New Revision: 3993

Modified:
   branches/src/target/kernel/2.6.24.x/patches/atheros_2_0_function.patch
Log:
Subject: [PATCH 3/3] ar6k: Scan request synchronization

We now wait for the scan done event before returning from the wireless
extension scan call.
This way we make sure that userspace doesn't ask for scan results before
we actually have them.

Signed-off-by: Samuel Ortiz <[EMAIL PROTECTED]>

---
 drivers/sdio/function/wlan/ar6000/ar6000/ar6000_drv.c   |    7 ++++++-
 drivers/sdio/function/wlan/ar6000/ar6000/ar6000_drv.h   |    1 +
 drivers/sdio/function/wlan/ar6000/ar6000/wireless_ext.c |    4 ++++
 3 files changed, 11 insertions(+), 1 deletion(-)



Modified: branches/src/target/kernel/2.6.24.x/patches/atheros_2_0_function.patch
===================================================================
--- branches/src/target/kernel/2.6.24.x/patches/atheros_2_0_function.patch      
2008-01-31 09:22:11 UTC (rev 3992)
+++ branches/src/target/kernel/2.6.24.x/patches/atheros_2_0_function.patch      
2008-01-31 09:23:37 UTC (rev 3993)
@@ -79,7 +79,7 @@
 ===================================================================
 --- /dev/null
 +++ linux-2.6.24/drivers/sdio/function/wlan/ar6000/ar6000/ar6000_drv.c
-@@ -0,0 +1,3070 @@
+@@ -0,0 +1,3075 @@
 +/*
 + *
 + * Copyright (c) 2004-2007 Atheros Communications Inc.
@@ -281,6 +281,8 @@
 +
 +int reconnect_flag = 0;
 +
++DECLARE_WAIT_QUEUE_HEAD(ar6000_scan_queue);
++
 +/* Function declarations */
 +static int ar6000_init_module(void);
 +static void ar6000_cleanup_module(void);
@@ -2502,7 +2504,10 @@
 +void
 +ar6000_scanComplete_event(AR_SOFTC_T *ar, A_STATUS status)
 +{
-+    AR_DEBUG_PRINTF("AR6000 scan complete: %d\n", status);
++      AR_DEBUG_PRINTF("AR6000 scan complete: %d\n", status);
++
++      ar->scan_complete = 1;
++      wake_up_interruptible(&ar6000_scan_queue);
 +}
 +
 +void
@@ -3154,7 +3159,7 @@
 ===================================================================
 --- /dev/null
 +++ linux-2.6.24/drivers/sdio/function/wlan/ar6000/ar6000/ar6000_drv.h
-@@ -0,0 +1,361 @@
+@@ -0,0 +1,362 @@
 +/*
 + *
 + * Copyright (c) 2004-2007 Atheros Communications Inc.
@@ -3441,6 +3446,7 @@
 +    A_UINT32                log_cnt;
 +    A_UINT32                dbglog_init_done;
 +    A_UINT32                arConnectCtrlFlags;
++      A_UINT32                scan_complete;
 +#ifdef USER_KEYS
 +    A_INT32                 user_savedkeys_stat;
 +    A_UINT32                user_key_ctrl;
@@ -8419,7 +8425,7 @@
 ===================================================================
 --- /dev/null
 +++ linux-2.6.24/drivers/sdio/function/wlan/ar6000/ar6000/wireless_ext.c
-@@ -0,0 +1,2068 @@
+@@ -0,0 +1,2072 @@
 +/*
 + *
 + * Copyright (c) 2004-2007 Atheros Communications Inc.
@@ -8445,6 +8451,7 @@
 +static void ar6000_set_quality(struct iw_quality *iq, A_INT8 rssi);
 +extern unsigned int wmitimeout;
 +extern A_WAITQUEUE_HEAD arEvent;
++extern wait_queue_head_t ar6000_scan_queue;
 +
 +#ifdef  __ATH_CENTRAL_IOCTL_DISPATCHER___
 +extern int allow_trace_signal;
@@ -10153,6 +10160,9 @@
 +        ret = -EIO;
 +    }
 +
++    ar->scan_complete = 0;
++    wait_event_interruptible_timeout(ar6000_scan_queue, ar->scan_complete,
++                                   5 * HZ);
 +
 +    return ret;
 +#undef  ACT_DWELLTIME_DEFAULT




--- End Message ---
--- Begin Message ---
Author: erin_yueh
Date: 2008-01-31 10:41:45 +0100 (Thu, 31 Jan 2008)
New Revision: 3994

Added:
   trunk/src/target/gsm/src/gsmd/machine_telit.c
   trunk/src/target/gsm/src/gsmd/vendor_telit.c
Modified:
   trunk/src/target/gsm/src/gsmd/Makefile.am
Log:
gsmd: Patch for Telit GM862 GSM modem (Florian Boor)



Modified: trunk/src/target/gsm/src/gsmd/Makefile.am
===================================================================
--- trunk/src/target/gsm/src/gsmd/Makefile.am   2008-01-31 09:23:37 UTC (rev 
3993)
+++ trunk/src/target/gsm/src/gsmd/Makefile.am   2008-01-31 09:41:45 UTC (rev 
3994)
@@ -25,10 +25,12 @@
 plugin_LTLIBRARIES = libgsmd-machine_generic.la \
                     libgsmd-machine_tihtc.la \
                     libgsmd-machine_gta01.la \
+                    libgsmd-machine_telit.la \
                     libgsmd-vendor_ti.la \
                     libgsmd-vendor_tihtc.la \
                     libgsmd-vendor_qc.la \
-                    libgsmd-vendor_bcm.la
+                    libgsmd-vendor_bcm.la \
+                    libgsmd-vendor_telit.la
 
 libgsmd_machine_generic_la_SOURCES = machine_generic.c
 libgsmd_machine_generic_la_LDFLAGS = -module
@@ -36,6 +38,8 @@
 libgsmd_machine_tihtc_la_LDFLAGS = -module
 libgsmd_machine_gta01_la_SOURCES = machine_gta01.c
 libgsmd_machine_gta01_la_LDFLAGS = -module
+libgsmd_machine_telit_la_SOURCES = machine_telit.c
+libgsmd_machine_telit_la_LDFLAGS = -module
 
 libgsmd_vendor_ti_la_SOURCES = vendor_ti.c
 libgsmd_vendor_ti_la_LDFLAGS = -module
@@ -45,6 +49,8 @@
 libgsmd_vendor_qc_la_LDFLAGS = -module
 libgsmd_vendor_bcm_la_SOURCES = vendor_bcm.c
 libgsmd_vendor_bcm_la_LDFLAGS = -module
+libgsmd_vendor_telit_la_SOURCES = vendor_telit.c
+libgsmd_vendor_telit_la_LDFLAGS = -module
 
 
 noinst_HEADERS = gsmd.h

Added: trunk/src/target/gsm/src/gsmd/machine_telit.c
===================================================================
--- trunk/src/target/gsm/src/gsmd/machine_telit.c       2008-01-31 09:23:37 UTC 
(rev 3993)
+++ trunk/src/target/gsm/src/gsmd/machine_telit.c       2008-01-31 09:41:45 UTC 
(rev 3994)
@@ -0,0 +1,103 @@
+/* Telit GM862 / RS323 machine plugin
+ *
+ * (c) 2008 Florian Boor <[EMAIL PROTECTED]>
+ *
+ * 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 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ */
+
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <stdio.h>
+#include <errno.h>
+#include <sys/ioctl.h>
+
+#include "gsmd.h"
+
+#include <gsmd/gsmd.h>
+#include <gsmd/usock.h>
+#include <gsmd/event.h>
+#include <gsmd/talloc.h>
+#include <gsmd/extrsp.h>
+#include <gsmd/machineplugin.h>
+
+#define GSMD_MODEM_POWEROFF_TIMEOUT 6
+
+static void poweroff_timeout(struct gsmd_timer *tmr, void *data) 
+{
+       exit(0);
+}
+
+static struct gsmd_timer *poweroff_timer(struct gsmd *g)
+{
+       struct timeval tv;
+       tv.tv_sec = GSMD_MODEM_POWEROFF_TIMEOUT;
+       tv.tv_usec = 0;
+       DEBUGP("Create power off timer\n");
+
+       return gsmd_timer_create(&tv, &poweroff_timeout, g);
+}
+
+static int telit_detect(struct gsmd *g)
+{
+       return 1; /* not yet implemented */
+}
+
+static int telit_init(struct gsmd *g, int fd)
+{
+    /* We assume the modem has been turned on manually using the S3
+       baseboard or on device startup. */
+       g->interpreter_ready = 1;
+    
+       return 0;
+}
+
+static int telit_power(struct gsmd *g, int power)
+{
+       struct gsmd_atcmd *cmd = NULL;
+
+       switch (power) {
+               case GSMD_MODEM_POWERUP:
+                       break;
+
+               case GSMD_MODEM_POWERDOWN:
+                       cmd = atcmd_fill("AT#SHDN", 7 + 1, NULL,
+                                       g, 0, poweroff_timer);
+
+                       if (!cmd)
+                               return -ENOMEM;
+
+                       llist_add_tail(&cmd->list, &g->pending_atcmds);
+                       if (llist_empty(&g->busy_atcmds) && 
+                                       !llist_empty(&g->pending_atcmds)) {
+                               atcmd_wake_pending_queue(g);
+                       }
+                       break;
+
+               default:
+                       return -EINVAL;
+       }
+
+       return 0;
+}
+
+struct gsmd_machine_plugin gsmd_machine_plugin = {
+       .name = "Telit GM862",
+       .power = telit_power,
+       .ex_submit = NULL,
+       .detect = &telit_detect,
+       .init = &telit_init,
+};

Added: trunk/src/target/gsm/src/gsmd/vendor_telit.c
===================================================================
--- trunk/src/target/gsm/src/gsmd/vendor_telit.c        2008-01-31 09:23:37 UTC 
(rev 3993)
+++ trunk/src/target/gsm/src/gsmd/vendor_telit.c        2008-01-31 09:41:45 UTC 
(rev 3994)
@@ -0,0 +1,112 @@
+/* Telit GM862 gsmd plugin
+ *
+ * (c) 2008 Florian Boor <[EMAIL PROTECTED]>
+ *
+ * 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 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ */
+
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <stdio.h>
+#include <errno.h>
+
+#include "gsmd.h"
+
+#include <gsmd/gsmd.h>
+#include <gsmd/usock.h>
+#include <gsmd/event.h>
+#include <gsmd/talloc.h>
+#include <gsmd/extrsp.h>
+#include <gsmd/atcmd.h>
+#include <gsmd/vendorplugin.h>
+#include <gsmd/unsolicited.h>
+
+static int gsmd_test_atcb(struct gsmd_atcmd *cmd, void *ctx, char *resp)
+{
+       printf("`%s' returned `%s'\n", cmd->buf, resp);
+       return 0;
+}
+
+int gsmd_simplecmd(struct gsmd *gsmd, char *cmdtxt)
+{
+       struct gsmd_atcmd *cmd;
+       cmd = atcmd_fill(cmdtxt, strlen(cmdtxt)+1, &gsmd_test_atcb, NULL, 0, 
NULL);
+       if (!cmd)
+               return -ENOMEM;
+
+       return atcmd_submit(gsmd, cmd);
+}
+
+static int telit_detect(struct gsmd *g)
+{
+       return 1; /* not yet implemented */
+}
+
+static int telit_initsettings(struct gsmd *g)
+{
+       int rc = 0;
+       struct gsmd_atcmd *cmd;
+
+       /* Get network registration events with full information. */
+       rc |= gsmd_simplecmd(g, "AT+CGREG=2");
+       /* Turn on CLIP. */
+       rc |= gsmd_simplecmd(g, "AT+CLIP=1");
+       /* Enable powersaving. */
+       rc |= gsmd_simplecmd(g, "AT+CFUN=5");
+       /* enable signal quality reports */
+//     rc |= gsmd_simplecmd(g, "AT%HTCCSQ=1");
+
+       return rc;
+}
+
+static int csq_parse(const char *buf, int len, const char *param,
+                    struct gsmd *gsmd)
+{
+       struct gsmd_evt_auxdata *aux;
+       struct gsmd_ucmd *ucmd = usock_build_event(GSMD_MSG_EVENT,
+                       GSMD_EVT_SIGNAL, sizeof(*aux));
+
+       DEBUGP("entering csq_parse param=`%s'\n", param);
+       if (!ucmd)
+               return -EINVAL;
+
+       aux = (struct gsmd_evt_auxdata *) ucmd->buf;
+       if (sscanf(param, " %hhi, %hhi",
+                               &aux->u.signal.sigq.rssi,
+                               &aux->u.signal.sigq.ber) < 2)
+               goto out_free_io;
+
+       usock_evt_send(gsmd, ucmd, GSMD_EVT_SIGNAL);
+       return 0;
+
+out_free_io:
+       talloc_free(ucmd);
+       return -EIO;
+}
+
+static const struct gsmd_unsolicit telit_unsolicit[] = {
+       { "+CSQ",       &csq_parse },   /* Signal Quality */
+};
+
+struct gsmd_vendor_plugin gsmd_vendor_plugin = {
+       .name = "Telit GM862",
+       .ext_chars = "%#$",
+       .num_unsolicit = ARRAY_SIZE(telit_unsolicit),
+       .unsolicit = telit_unsolicit,
+       .detect = &telit_detect,
+       .initsettings = &telit_initsettings,
+};




--- End Message ---
--- Begin Message ---
Author: werner
Date: 2008-01-31 10:52:04 +0100 (Thu, 31 Jan 2008)
New Revision: 3995

Modified:
   branches/src/target/kernel/2.6.24.x/patches/gta02-acc.patch
Log:
bugfix-motion-sensors-suspend.patch

Current motion sensor driver in svn chokes resume, this fixes it.

Signed-off-by: Andy Green <[EMAIL PROTECTED]>

gta02-acc.patch:
- drivers/input/misc/lis302dl.c (lis302dl_suspend, lis302dl_resume): disable 
  the SPI interrupt while in suspend

---

 drivers/input/misc/lis302dl.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)



Modified: branches/src/target/kernel/2.6.24.x/patches/gta02-acc.patch
===================================================================
--- branches/src/target/kernel/2.6.24.x/patches/gta02-acc.patch 2008-01-31 
09:41:45 UTC (rev 3994)
+++ branches/src/target/kernel/2.6.24.x/patches/gta02-acc.patch 2008-01-31 
09:52:04 UTC (rev 3995)
@@ -2,7 +2,7 @@
 ===================================================================
 --- linux-2.6.24.orig/arch/arm/mach-s3c2440/mach-gta02.c
 +++ linux-2.6.24/arch/arm/mach-s3c2440/mach-gta02.c
-@@ -374,8 +374,6 @@
+@@ -375,8 +375,6 @@
        &s3c_device_usbgadget,
        &s3c_device_nand,
        &s3c_device_ts,
@@ -11,7 +11,7 @@
        &gta02_nor_flash,
  };
  
-@@ -475,10 +473,12 @@
+@@ -476,10 +474,12 @@
        },
  };
  
@@ -24,7 +24,7 @@
  
  static struct glamo_spigpio_info glamo_spigpio_cfg = {
        .pin_clk        = GLAMO_GPIO10_OUTPUT,
-@@ -504,16 +504,93 @@
+@@ -505,16 +505,93 @@
  
  /* SPI: Accelerometers attached to SPI of s3c244x */
  
@@ -123,7 +123,7 @@
        },
  };
  
-@@ -522,26 +599,75 @@
+@@ -523,26 +600,75 @@
                .modalias       = "lis302dl",
                .platform_data  = &lis302_pdata[0],
                .irq            = GTA02_IRQ_GSENSOR_1,
@@ -205,7 +205,7 @@
  };
  
  static struct resource gta02_led_resources[] = {
-@@ -784,7 +910,6 @@
+@@ -785,7 +911,6 @@
        s3c_device_usb.dev.platform_data = &gta02_usb_info;
        s3c_device_nand.dev.platform_data = &gta02_nand_info;
        s3c_device_sdi.dev.platform_data = &gta02_mmc_cfg;
@@ -213,7 +213,7 @@
  
        /* Only GTA02v1 has a SD_DETECT GPIO.  Since the slot is not
         * hot-pluggable, this is not required anyway */
-@@ -796,6 +921,12 @@
+@@ -797,6 +922,12 @@
                break;
        }
  
@@ -226,7 +226,7 @@
        INIT_WORK(&gta02_udc_vbus_drawer.work, __gta02_udc_vbus_draw);
        s3c24xx_udc_set_platdata(&gta02_udc_cfg);
        set_s3c2410ts_info(&gta02_ts_cfg);
-@@ -824,6 +955,7 @@
+@@ -825,6 +956,7 @@
                break;
        }
  
@@ -663,7 +663,7 @@
 +      reg_write(lis, LIS302DL_REG_FF_WU_THS_1, 0x14);
 +      reg_write(lis, LIS302DL_REG_FF_WU_DURATION_1, 0x00);
 +      reg_write(lis, LIS302DL_REG_FF_WU_CFG_1, 0x95);
-+
+ 
 +      reg_write(lis, LIS302DL_REG_CTRL1, LIS302DL_CTRL1_Xen |
 +                                         LIS302DL_CTRL1_Yen |
 +                                         LIS302DL_CTRL1_Zen);
@@ -680,7 +680,7 @@
 +      reg_read(lis, LIS302DL_REG_CLICK_SRC);
 +
 +      dev_info(&spi->dev, "Found %s\n", pdata->name);
- 
++
 +      lis->pdata = pdata;
 +
 +      rc = request_irq(lis->spi_dev->irq, lis302dl_interrupt,
@@ -722,17 +722,18 @@
        dev_set_drvdata(&spi->dev, NULL);
        kfree(lis);
  
-@@ -521,6 +418,9 @@
+@@ -521,6 +418,10 @@
  static int lis302dl_suspend(struct spi_device *spi, pm_message_t state)
  {
        struct lis302dl_info *lis = dev_get_drvdata(&spi->dev);
 +      unsigned long flags;
 +
++      disable_irq(lis->spi_dev->irq);
 +      local_save_flags(flags);
  
        /* save registers */
        lis->regs[LIS302DL_REG_CTRL1] = reg_read(lis, LIS302DL_REG_CTRL1);
-@@ -561,12 +461,17 @@
+@@ -561,12 +462,17 @@
                reg_write(lis, LIS302DL_REG_CTRL1, tmp);
        }
  
@@ -750,11 +751,12 @@
  
        /* restore registers after resume */
        reg_write(lis, LIS302DL_REG_CTRL1, lis->regs[LIS302DL_REG_CTRL1]);
-@@ -597,6 +502,8 @@
+@@ -597,6 +503,9 @@
        reg_write(lis, LIS302DL_REG_CLICK_WINDOW,
                  lis->regs[LIS302DL_REG_CLICK_WINDOW]);
  
 +      local_irq_restore(flags);
++      enable_irq(lis->spi_dev->irq);
 +
        return 0;
  }




--- End Message ---
--- Begin Message ---
Author: werner
Date: 2008-01-31 11:02:49 +0100 (Thu, 31 Jan 2008)
New Revision: 3996

Modified:
   branches/src/target/kernel/2.6.24.x/patches/gta02-core.patch
Log:
Patch contained include/asm/arch-s3c2410/gta02.h twice, causing havoc.
Funny. Is quilt acting up ?



Modified: branches/src/target/kernel/2.6.24.x/patches/gta02-core.patch
===================================================================
--- branches/src/target/kernel/2.6.24.x/patches/gta02-core.patch        
2008-01-31 09:52:04 UTC (rev 3995)
+++ branches/src/target/kernel/2.6.24.x/patches/gta02-core.patch        
2008-01-31 10:02:49 UTC (rev 3996)
@@ -1277,15 +1277,3 @@
 -MODULE_DESCRIPTION("ALSA SoC WM8753 Neo1973");
 +MODULE_DESCRIPTION("ALSA SoC WM8753 Neo1973 GTA01");
  MODULE_LICENSE("GPL");
-Index: linux-2.6.24/include/asm/arch-s3c2410/gta02.h
-===================================================================
---- linux-2.6.24.orig/include/asm/arch-s3c2410/gta02.h
-+++ linux-2.6.24/include/asm/arch-s3c2410/gta02.h
-@@ -9,6 +9,7 @@
- #define GTA02v2_SYSTEM_REV    0x00000320
- #define GTA02v3_SYSTEM_REV    0x00000330
- #define GTA02v4_SYSTEM_REV    0x00000340
-+#define GTA02v5_SYSTEM_REV    0x00000350
- 
- #define GTA02_GPIO_n3DL_GSM   S3C2410_GPA13   /* v1 + v2 + v3 only */
- 




--- End Message ---
--- Begin Message ---
Author: werner
Date: 2008-01-31 11:20:15 +0100 (Thu, 31 Jan 2008)
New Revision: 3997

Modified:
   branches/src/target/kernel/2.6.24.x/patches/pcf50633.patch
Log:
fix-compile-warnings.patch

Couple of our files generate compile warnings - fix 'em.

Signed-off-by: Andy Green <[EMAIL PROTECTED]>

---

 drivers/i2c/chips/pcf50633.c       |    4 ++--

patches/pcf50633.patch:
- drivers/i2c/chips/pcf50633.c (show_battemp, show_chgcur): #if 0 unused 
  variables



Modified: branches/src/target/kernel/2.6.24.x/patches/pcf50633.patch
===================================================================
--- branches/src/target/kernel/2.6.24.x/patches/pcf50633.patch  2008-01-31 
10:02:49 UTC (rev 3996)
+++ branches/src/target/kernel/2.6.24.x/patches/pcf50633.patch  2008-01-31 
10:20:15 UTC (rev 3997)
@@ -1,7 +1,7 @@
-Index: linux-2.6/drivers/i2c/chips/Kconfig
+Index: linux-2.6.24/drivers/i2c/chips/Kconfig
 ===================================================================
---- linux-2.6.orig/drivers/i2c/chips/Kconfig
-+++ linux-2.6/drivers/i2c/chips/Kconfig
+--- linux-2.6.24.orig/drivers/i2c/chips/Kconfig
++++ linux-2.6.24/drivers/i2c/chips/Kconfig
 @@ -61,6 +61,15 @@
          This driver can also be built as a module.  If so, the module
          will be called pcf50606.
@@ -18,10 +18,10 @@
  
  config SENSORS_PCF8574
        tristate "Philips PCF8574 and PCF8574A"
-Index: linux-2.6/drivers/i2c/chips/Makefile
+Index: linux-2.6.24/drivers/i2c/chips/Makefile
 ===================================================================
---- linux-2.6.orig/drivers/i2c/chips/Makefile
-+++ linux-2.6/drivers/i2c/chips/Makefile
+--- linux-2.6.24.orig/drivers/i2c/chips/Makefile
++++ linux-2.6.24/drivers/i2c/chips/Makefile
 @@ -10,6 +10,7 @@
  obj-$(CONFIG_SENSORS_M41T00)  += m41t00.o
  obj-$(CONFIG_SENSORS_PCA9539) += pca9539.o
@@ -30,10 +30,10 @@
  obj-$(CONFIG_SENSORS_PCF8574) += pcf8574.o
  obj-$(CONFIG_SENSORS_PCF8591) += pcf8591.o
  obj-$(CONFIG_ISP1301_OMAP)    += isp1301_omap.o
-Index: linux-2.6/drivers/i2c/chips/pcf50633.c
+Index: linux-2.6.24/drivers/i2c/chips/pcf50633.c
 ===================================================================
 --- /dev/null
-+++ linux-2.6/drivers/i2c/chips/pcf50633.c
++++ linux-2.6.24/drivers/i2c/chips/pcf50633.c
 @@ -0,0 +1,1736 @@
 +/* Philips PCF50633 Power Management Unit (PMU) driver
 + *
@@ -945,9 +945,9 @@
 +static ssize_t show_battemp(struct device *dev, struct device_attribute *attr,
 +                          char *buf)
 +{
++#if 0
 +      struct i2c_client *client = to_i2c_client(dev);
 +      struct pcf50633_data *pcf = i2c_get_clientdata(client);
-+#if 0
 +      u_int16_t adc;
 +
 +      adc = adc_read(pcf, PCF50633_ADCC1_MUX_BATTEMP, 0, NULL);
@@ -969,9 +969,9 @@
 +static ssize_t show_chgcur(struct device *dev, struct device_attribute *attr,
 +                         char *buf)
 +{
++#if 0
 +      struct i2c_client *client = to_i2c_client(dev);
 +      struct pcf50633_data *pcf = i2c_get_clientdata(client);
-+#if 0
 +      u_int16_t adc_batvolt, adc_adcin1;
 +      u_int16_t ma;
 +
@@ -1771,10 +1771,10 @@
 +
 +module_init(pcf50633_init);
 +module_exit(pcf50633_exit);
-Index: linux-2.6/include/linux/pcf50633.h
+Index: linux-2.6.24/include/linux/pcf50633.h
 ===================================================================
 --- /dev/null
-+++ linux-2.6/include/linux/pcf50633.h
++++ linux-2.6.24/include/linux/pcf50633.h
 @@ -0,0 +1,113 @@
 +#ifndef _LINUX_PCF50633_H
 +#define _LINUX_PCF50633_H
@@ -1889,11 +1889,11 @@
 +};
 +
 +#endif /* _PCF50633_H */
-Index: linux-2.6/include/linux/i2c-id.h
+Index: linux-2.6.24/include/linux/i2c-id.h
 ===================================================================
---- linux-2.6.orig/include/linux/i2c-id.h
-+++ linux-2.6/include/linux/i2c-id.h
-@@ -165,6 +165,7 @@
+--- linux-2.6.24.orig/include/linux/i2c-id.h
++++ linux-2.6.24/include/linux/i2c-id.h
+@@ -169,6 +169,7 @@
  #define I2C_DRIVERID_OV7670 1048      /* Omnivision 7670 camera */
  #define I2C_DRIVERID_PCF50606 1049
  #define I2C_DRIVERID_TSL256X 1050
@@ -1901,10 +1901,10 @@
  
  /*
   * ---- Adapter types ----------------------------------------------------
-Index: linux-2.6/drivers/i2c/chips/pcf50633.h
+Index: linux-2.6.24/drivers/i2c/chips/pcf50633.h
 ===================================================================
 --- /dev/null
-+++ linux-2.6/drivers/i2c/chips/pcf50633.h
++++ linux-2.6.24/drivers/i2c/chips/pcf50633.h
 @@ -0,0 +1,402 @@
 +#ifndef _PCF50633_H
 +#define _PCF50633_H




--- End Message ---
--- Begin Message ---
Author: werner
Date: 2008-01-31 11:44:30 +0100 (Thu, 31 Jan 2008)
New Revision: 3998

Modified:
   branches/src/target/kernel/2.6.24.x/patches/s3c2410-qt2410-buttons.patch
Log:
fix-compile-warnings.patch (2/2)

Couple of our files generate compile warnings - fix 'em.

Also the fail paths on gta01kbd_probe() were broken, fixed.

Signed-off-by: Andy Green <[EMAIL PROTECTED]>

---

 drivers/input/keyboard/qt2410kbd.c |   37 +++++++++++++++++++++++++-----------

patches/s3c2410-qt2410-buttons.patch::
- drivers/input/keyboard/qt2410kbd.c (gta01kbd_suspend, gta01kbd_resume,
  gta01kbd_probe): unused variables, begone
- drivers/input/keyboard/qt2410kbd.c (gta01kbd_probe): properly clean up in
  failure paths



Modified: 
branches/src/target/kernel/2.6.24.x/patches/s3c2410-qt2410-buttons.patch
===================================================================
--- branches/src/target/kernel/2.6.24.x/patches/s3c2410-qt2410-buttons.patch    
2008-01-31 10:20:15 UTC (rev 3997)
+++ branches/src/target/kernel/2.6.24.x/patches/s3c2410-qt2410-buttons.patch    
2008-01-31 10:44:30 UTC (rev 3998)
@@ -1,7 +1,7 @@
-Index: linux-2.6/arch/arm/mach-s3c2410/mach-qt2410.c
+Index: linux-2.6.24/arch/arm/mach-s3c2410/mach-qt2410.c
 ===================================================================
---- linux-2.6.orig/arch/arm/mach-s3c2410/mach-qt2410.c
-+++ linux-2.6/arch/arm/mach-s3c2410/mach-qt2410.c
+--- linux-2.6.24.orig/arch/arm/mach-s3c2410/mach-qt2410.c
++++ linux-2.6.24/arch/arm/mach-s3c2410/mach-qt2410.c
 @@ -331,6 +331,24 @@
        .ocr_avail      = MMC_VDD_32_33,
  };
@@ -27,13 +27,13 @@
  static void __init qt2410_map_io(void)
  {
        s3c24xx_init_io(qt2410_iodesc, ARRAY_SIZE(qt2410_iodesc));
-Index: linux-2.6/drivers/input/keyboard/Kconfig
+Index: linux-2.6.24/drivers/input/keyboard/Kconfig
 ===================================================================
---- linux-2.6.orig/drivers/input/keyboard/Kconfig
-+++ linux-2.6/drivers/input/keyboard/Kconfig
+--- linux-2.6.24.orig/drivers/input/keyboard/Kconfig
++++ linux-2.6.24/drivers/input/keyboard/Kconfig
 @@ -304,5 +304,10 @@
          To compile this driver as a module, choose M here: the
-         module will be called gta01kbd.
+         module will be called neo1973kbd.
  
 +config KEYBOARD_QT2410
 +      tristate "QT2410 buttons"
@@ -42,10 +42,10 @@
 +
  
  endif
-Index: linux-2.6/drivers/input/keyboard/Makefile
+Index: linux-2.6.24/drivers/input/keyboard/Makefile
 ===================================================================
---- linux-2.6.orig/drivers/input/keyboard/Makefile
-+++ linux-2.6/drivers/input/keyboard/Makefile
+--- linux-2.6.24.orig/drivers/input/keyboard/Makefile
++++ linux-2.6.24/drivers/input/keyboard/Makefile
 @@ -15,6 +15,7 @@
  obj-$(CONFIG_KEYBOARD_STOWAWAY)               += stowaway.o
  obj-$(CONFIG_KEYBOARD_CORGI)          += corgikbd.o
@@ -54,11 +54,11 @@
  obj-$(CONFIG_KEYBOARD_SPITZ)          += spitzkbd.o
  obj-$(CONFIG_KEYBOARD_HIL)            += hil_kbd.o
  obj-$(CONFIG_KEYBOARD_HIL_OLD)                += hilkbd.o
-Index: linux-2.6/drivers/input/keyboard/qt2410kbd.c
+Index: linux-2.6.24/drivers/input/keyboard/qt2410kbd.c
 ===================================================================
 --- /dev/null
-+++ linux-2.6/drivers/input/keyboard/qt2410kbd.c
-@@ -0,0 +1,218 @@
++++ linux-2.6.24/drivers/input/keyboard/qt2410kbd.c
+@@ -0,0 +1,233 @@
 +/*
 + * Keyboard driver for Armzone QT2410
 + *
@@ -109,7 +109,6 @@
 +#ifdef CONFIG_PM
 +static int gta01kbd_suspend(struct platform_device *dev, pm_message_t state)
 +{
-+      int i;
 +      struct gta01kbd *gta01kbd = platform_get_drvdata(dev);
 +
 +      gta01kbd->suspended = 1;
@@ -119,7 +118,6 @@
 +
 +static int gta01kbd_resume(struct platform_device *dev)
 +{
-+      int i;
 +      struct gta01kbd *gta01kbd = platform_get_drvdata(dev);
 +
 +      gta01kbd->suspended = 0;
@@ -135,22 +133,30 @@
 +{
 +      struct gta01kbd *gta01kbd;
 +      struct input_dev *input_dev;
-+      int irq_911, irq_hold;
++      int irq_911;
++      int rc = 0;
 +
 +      gta01kbd = kzalloc(sizeof(struct gta01kbd), GFP_KERNEL);
++      if (!gta01kbd) {
++              rc = -ENOMEM;
++              goto bail;
++      }
 +      input_dev = input_allocate_device();
 +      if (!gta01kbd || !input_dev) {
-+              kfree(gta01kbd);
-+              input_free_device(input_dev);
-+              return -ENOMEM;
++              rc = -ENOMEM;
++              goto bail_free;
 +      }
 +
-+      if (pdev->resource[0].flags != 0)
-+              return -EINVAL;
++      if (pdev->resource[0].flags != 0) {\
++              rc = -EINVAL;
++              goto bail_free_dev;
++      }
 +
 +      irq_911 = s3c2410_gpio_getirq(pdev->resource[0].start);
-+      if (irq_911 < 0)
-+              return -EINVAL;
++      if (irq_911 < 0) {
++              rc = -EINVAL;
++              goto bail_free_dev;
++      }
 +
 +      platform_set_drvdata(pdev, gta01kbd);
 +
@@ -196,7 +202,9 @@
 +      set_bit(SW_HEADPHONE_INSERT, input_dev->swbit);
 +#endif
 +
-+      input_register_device(gta01kbd->input);
++      rc = input_register_device(gta01kbd->input);
++      if (rc)
++              goto bail_free_dev;
 +
 +      s3c2410_gpio_cfgpin(S3C2410_GPF0, S3C2410_GPF0_EINT0);
 +      if (request_irq(irq_911, gta01kbd_interrupt,
@@ -228,6 +236,13 @@
 +#endif
 +
 +      return 0;
++
++bail_free_dev:
++      input_free_device(input_dev);
++bail_free:
++      kfree(gta01kbd);
++bail:
++      return rc;
 +}
 +
 +static int gta01kbd_remove(struct platform_device *pdev)




--- End Message ---
_______________________________________________
commitlog mailing list
commitlog@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/commitlog

Reply via email to