Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
authorPaul Mundt <lethal@linux-sh.org>
Mon, 31 May 2010 03:59:19 +0000 (12:59 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Mon, 31 May 2010 03:59:19 +0000 (12:59 +0900)
arch/sh/boards/mach-ecovec24/setup.c
arch/sh/kernel/dwarf.c
arch/sh/kernel/return_address.c
drivers/video/sh_mobile_lcdcfb.c
include/linux/serial_sci.h

index 4971425..3845258 100644 (file)
@@ -26,7 +26,6 @@
 #include <linux/mmc/host.h>
 #include <linux/input.h>
 #include <linux/input/sh_keysc.h>
-#include <linux/mfd/sh_mobile_sdhi.h>
 #include <video/sh_mobile_lcdc.h>
 #include <sound/sh_fsi.h>
 #include <media/sh_mobile_ceu.h>
index 886d7d8..49c09c7 100644 (file)
@@ -49,6 +49,8 @@ static DEFINE_SPINLOCK(dwarf_fde_lock);
 
 static struct dwarf_cie *cached_cie;
 
+static unsigned int dwarf_unwinder_ready;
+
 /**
  *     dwarf_frame_alloc_reg - allocate memory for a DWARF register
  *     @frame: the DWARF frame whose list of registers we insert on
@@ -582,6 +584,13 @@ struct dwarf_frame *dwarf_unwind_stack(unsigned long pc,
        unsigned long addr;
 
        /*
+        * If we've been called in to before initialization has
+        * completed, bail out immediately.
+        */
+       if (!dwarf_unwinder_ready)
+               return NULL;
+
+       /*
         * If we're starting at the top of the stack we need get the
         * contents of a physical register to get the CFA in order to
         * begin the virtual unwinding of the stack.
@@ -1167,7 +1176,7 @@ void module_dwarf_cleanup(struct module *mod)
  */
 static int __init dwarf_unwinder_init(void)
 {
-       int err;
+       int err = -ENOMEM;
 
        dwarf_frame_cachep = kmem_cache_create("dwarf_frames",
                        sizeof(struct dwarf_frame), 0,
@@ -1181,11 +1190,15 @@ static int __init dwarf_unwinder_init(void)
                                          mempool_alloc_slab,
                                          mempool_free_slab,
                                          dwarf_frame_cachep);
+       if (!dwarf_frame_pool)
+               goto out;
 
        dwarf_reg_pool = mempool_create(DWARF_REG_MIN_REQ,
                                         mempool_alloc_slab,
                                         mempool_free_slab,
                                         dwarf_reg_cachep);
+       if (!dwarf_reg_pool)
+               goto out;
 
        err = dwarf_parse_section(__start_eh_frame, __stop_eh_frame, NULL);
        if (err)
@@ -1195,11 +1208,13 @@ static int __init dwarf_unwinder_init(void)
        if (err)
                goto out;
 
+       dwarf_unwinder_ready = 1;
+
        return 0;
 
 out:
        printk(KERN_ERR "Failed to initialise DWARF unwinder: %d\n", err);
        dwarf_unwinder_cleanup();
-       return -EINVAL;
+       return err;
 }
 early_initcall(dwarf_unwinder_init);
index cbf1dd5..5124aeb 100644 (file)
@@ -24,6 +24,8 @@ void *return_address(unsigned int depth)
                struct dwarf_frame *tmp;
 
                tmp = dwarf_unwind_stack(ra, frame);
+               if (!tmp)
+                       return NULL;
 
                if (frame)
                        dwarf_free_frame(frame);
index e8c7699..12c451a 100644 (file)
@@ -991,13 +991,13 @@ static int __devinit sh_mobile_lcdc_probe(struct platform_device *pdev)
                priv->ch[j].lcdc = priv;
                memcpy(&priv->ch[j].cfg, &pdata->ch[i], sizeof(pdata->ch[i]));
 
-               error = sh_mobile_lcdc_check_interface(&priv->ch[i]);
+               error = sh_mobile_lcdc_check_interface(&priv->ch[j]);
                if (error) {
                        dev_err(&pdev->dev, "unsupported interface type\n");
                        goto err1;
                }
-               init_waitqueue_head(&priv->ch[i].frame_end_wait);
-               init_completion(&priv->ch[i].vsync_completion);
+               init_waitqueue_head(&priv->ch[j].frame_end_wait);
+               init_completion(&priv->ch[j].vsync_completion);
                priv->ch[j].pan_offset = 0;
 
                switch (pdata->ch[i].chan) {
index f5364a1..baed212 100644 (file)
@@ -2,9 +2,7 @@
 #define __LINUX_SERIAL_SCI_H
 
 #include <linux/serial_core.h>
-#ifdef CONFIG_SERIAL_SH_SCI_DMA
-#include <asm/dmaengine.h>
-#endif
+#include <linux/sh_dma.h>
 
 /*
  * Generic header for SuperH SCI(F) (used by sh/sh64/h8300 and related parts)