]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branch 'linux-2.6' into for-2.6.22
authorPaul Mackerras <paulus@samba.org>
Mon, 30 Apr 2007 02:38:01 +0000 (12:38 +1000)
committerPaul Mackerras <paulus@samba.org>
Mon, 30 Apr 2007 02:38:01 +0000 (12:38 +1000)
1  2 
arch/powerpc/kernel/of_platform.c
arch/powerpc/kernel/ppc_ksyms.c
drivers/infiniband/hw/ehca/ehca_main.c
drivers/macintosh/smu.c
drivers/media/video/planb.c
drivers/net/Kconfig
drivers/video/Kconfig
sound/aoa/soundbus/core.c

Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 6f004f70e3084b743ce0ab22e454ab42564c5444,418a98a10c73b0548bebdb958be82b2e3f927a2a..8b2e9b905cda8271f15355baeff04364cf3fc564
@@@ -61,10 -61,9 +61,9 @@@ static int soundbus_uevent(struct devic
  {
        struct soundbus_dev * soundbus_dev;
        struct of_device * of;
-       char *scratch;
 -      char *compat;
 +      const char *compat;
-       int i = 0;
-       int length, cplen, seen = 0;
+       int retval = 0, i = 0, length = 0;
+       int cplen, seen = 0;
  
        if (!dev)
                return -ENODEV;
         * it's not really legal to split it out with commas. We split it
         * up using a number of environment variables instead. */
  
 -      compat = (char *) get_property(of->node, "compatible", &cplen);
 +      compat = of_get_property(of->node, "compatible", &cplen);
        while (compat && cplen > 0) {
-               envp[i++] = scratch;
-               length = scnprintf (scratch, buffer_size,
-                                    "OF_COMPATIBLE_%d=%s", seen, compat);
-               ++length;
-               buffer_size -= length;
-               if ((buffer_size <= 0) || (i >= num_envp))
-                       return -ENOMEM;
-               scratch += length;
-               length = strlen (compat) + 1;
-               compat += length;
-               cplen -= length;
-               seen++;
+               int tmp = length;
+               retval = add_uevent_var(envp, num_envp, &i,
+                                       buffer, buffer_size, &length,
+                                       "OF_COMPATIBLE_%d=%s", seen, compat);
+               if (retval)
+                       return retval;
+               compat += length - tmp;
+               cplen -= length - tmp;
+               seen += 1;
        }
  
-       envp[i++] = scratch;
-       length = scnprintf (scratch, buffer_size, "OF_COMPATIBLE_N=%d", seen);
-       ++length;
-       buffer_size -= length;
-       if ((buffer_size <= 0) || (i >= num_envp))
-               return -ENOMEM;
-       scratch += length;
-       envp[i++] = scratch;
-       length = scnprintf (scratch, buffer_size, "MODALIAS=%s",
-                       soundbus_dev->modalias);
-       buffer_size -= length;
-       if ((buffer_size <= 0) || (i >= num_envp))
-               return -ENOMEM;
+       retval = add_uevent_var(envp, num_envp, &i,
+                               buffer, buffer_size, &length,
+                               "OF_COMPATIBLE_N=%d", seen);
+       if (retval)
+               return retval;
+       retval = add_uevent_var(envp, num_envp, &i,
+                               buffer, buffer_size, &length,
+                               "MODALIAS=%s", soundbus_dev->modalias);
  
        envp[i] = NULL;