Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 2 Dec 2009 23:39:20 +0000 (15:39 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 2 Dec 2009 23:39:20 +0000 (15:39 -0800)
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  MIPS: RB532: Fix devices.c compilation.
  MIPS: Fix MIPS I build.

12 files changed:
MAINTAINERS
drivers/block/aoe/aoecmd.c
drivers/gpio/langwell_gpio.c
drivers/media/dvb/dvb-core/dvb_frontend.c
drivers/mmc/host/pxamci.c
drivers/regulator/wm831x-isink.c
drivers/rtc/rtc-pcf50633.c
drivers/rtc/rtc-x1205.c
drivers/video/da8xx-fb.c
drivers/watchdog/rc32434_wdt.c
init/Kconfig
kernel/module.c

index 16129e6..4f96ac8 100644 (file)
@@ -3015,11 +3015,8 @@ S:       Maintained
 F:     fs/autofs4/
 
 KERNEL BUILD
-M:     Sam Ravnborg <sam@ravnborg.org>
-T:     git git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next.git
-T:     git git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes.git
 L:     linux-kbuild@vger.kernel.org
-S:     Maintained
+S:     Orphan
 F:     Documentation/kbuild/
 F:     Makefile
 F:     scripts/Makefile.*
index 965ece2..13bb69d 100644 (file)
@@ -735,6 +735,21 @@ diskstats(struct gendisk *disk, struct bio *bio, ulong duration, sector_t sector
        part_stat_unlock();
 }
 
+/*
+ * Ensure we don't create aliases in VI caches
+ */
+static inline void
+killalias(struct bio *bio)
+{
+       struct bio_vec *bv;
+       int i;
+
+       if (bio_data_dir(bio) == READ)
+               __bio_for_each_segment(bv, bio, i, 0) {
+                       flush_dcache_page(bv->bv_page);
+               }
+}
+
 void
 aoecmd_ata_rsp(struct sk_buff *skb)
 {
@@ -853,8 +868,12 @@ aoecmd_ata_rsp(struct sk_buff *skb)
 
        if (buf && --buf->nframesout == 0 && buf->resid == 0) {
                diskstats(d->gd, buf->bio, jiffies - buf->stime, buf->sector);
-               n = (buf->flags & BUFFL_FAIL) ? -EIO : 0;
-               bio_endio(buf->bio, n);
+               if (buf->flags & BUFFL_FAIL)
+                       bio_endio(buf->bio, -EIO);
+               else {
+                       killalias(buf->bio);
+                       bio_endio(buf->bio, 0);
+               }
                mempool_free(buf, d->bufpool);
        }
 
index 5711ce5..4baf3d7 100644 (file)
@@ -144,13 +144,6 @@ static int lnw_irq_type(unsigned irq, unsigned type)
 
 static void lnw_irq_unmask(unsigned irq)
 {
-       struct lnw_gpio *lnw = get_irq_chip_data(irq);
-       u32 gpio = irq - lnw->irq_base;
-       u8 reg = gpio / 32;
-       void __iomem *gedr;
-
-       gedr = (void __iomem *)(&lnw->reg_base->GEDR[reg]);
-       writel(BIT(gpio % 32), gedr);
 };
 
 static void lnw_irq_mask(unsigned irq)
@@ -183,13 +176,11 @@ static void lnw_irq_handler(unsigned irq, struct irq_desc *desc)
                gedr_v = readl(gedr);
                if (!gedr_v)
                        continue;
-               for (gpio = reg*32; gpio < reg*32+32; gpio++) {
-                       gedr_v = readl(gedr);
+               for (gpio = reg*32; gpio < reg*32+32; gpio++)
                        if (gedr_v & BIT(gpio % 32)) {
                                pr_debug("pin %d triggered\n", gpio);
                                generic_handle_irq(lnw->irq_base + gpio);
                        }
-               }
                /* clear the edge detect status bit */
                writel(gedr_v, gedr);
        }
index ddf639e..9808241 100644 (file)
@@ -31,6 +31,7 @@
 #include <linux/wait.h>
 #include <linux/slab.h>
 #include <linux/poll.h>
+#include <linux/semaphore.h>
 #include <linux/module.h>
 #include <linux/list.h>
 #include <linux/freezer.h>
index b00d673..9fb480b 100644 (file)
@@ -760,6 +760,8 @@ static int pxamci_remove(struct platform_device *pdev)
        if (mmc) {
                struct pxamci_host *host = mmc_priv(mmc);
 
+               mmc_remove_host(mmc);
+
                if (host->pdata) {
                        gpio_cd = host->pdata->gpio_card_detect;
                        gpio_ro = host->pdata->gpio_card_ro;
@@ -779,8 +781,6 @@ static int pxamci_remove(struct platform_device *pdev)
                if (host->pdata && host->pdata->exit)
                        host->pdata->exit(&pdev->dev, mmc);
 
-               mmc_remove_host(mmc);
-
                pxamci_stop_clock(host);
                writel(TXFIFO_WR_REQ|RXFIFO_RD_REQ|CLK_IS_OFF|STOP_CMD|
                       END_CMD_RES|PRG_DONE|DATA_TRAN_DONE,
index 1d8d987..4885700 100644 (file)
@@ -167,6 +167,8 @@ static __devinit int wm831x_isink_probe(struct platform_device *pdev)
                return -ENOMEM;
        }
 
+       isink->wm831x = wm831x;
+
        res = platform_get_resource(pdev, IORESOURCE_IO, 0);
        if (res == NULL) {
                dev_err(&pdev->dev, "No I/O resource\n");
index 33a10c4..4c5d5d0 100644 (file)
@@ -292,8 +292,9 @@ static int __devinit pcf50633_rtc_probe(struct platform_device *pdev)
                                &pcf50633_rtc_ops, THIS_MODULE);
 
        if (IS_ERR(rtc->rtc_dev)) {
+               int ret =  PTR_ERR(rtc->rtc_dev);
                kfree(rtc);
-               return PTR_ERR(rtc->rtc_dev);
+               return ret;
        }
 
        pcf50633_register_irq(rtc->pcf, PCF50633_IRQ_ALARM,
index 310c107..6583c1a 100644 (file)
@@ -195,7 +195,7 @@ static int x1205_set_datetime(struct i2c_client *client, struct rtc_time *tm,
                /* year, since the rtc epoch*/
                buf[CCR_YEAR] = bin2bcd(tm->tm_year % 100);
                buf[CCR_WDAY] = tm->tm_wday & 0x07;
-               buf[CCR_Y2K] = bin2bcd(tm->tm_year / 100);
+               buf[CCR_Y2K] = bin2bcd((tm->tm_year + 1900) / 100);
        }
 
        /* If writing alarm registers, set compare bits on registers 0-4 */
@@ -280,9 +280,9 @@ static int x1205_fix_osc(struct i2c_client *client)
        int err;
        struct rtc_time tm;
 
-       tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
+       memset(&tm, 0, sizeof(tm));
 
-       err = x1205_set_datetime(client, &tm, 0, X1205_CCR_BASE, 0);
+       err = x1205_set_datetime(client, &tm, 1, X1205_CCR_BASE, 0);
        if (err < 0)
                dev_err(&client->dev, "unable to restart the oscillator\n");
 
index 035d568..ea1fd3f 100644 (file)
@@ -554,11 +554,11 @@ static int fb_check_var(struct fb_var_screeninfo *var,
                var->transp.length = 0;
                break;
        case 16:                /* RGB 565 */
-               var->red.offset = 0;
+               var->red.offset = 11;
                var->red.length = 5;
                var->green.offset = 5;
                var->green.length = 6;
-               var->blue.offset = 11;
+               var->blue.offset = 0;
                var->blue.length = 5;
                var->transp.offset = 0;
                var->transp.length = 0;
@@ -591,7 +591,7 @@ static int __devexit fb_remove(struct platform_device *dev)
                unregister_framebuffer(info);
                fb_dealloc_cmap(&info->cmap);
                dma_free_coherent(NULL, par->databuf_sz + PAGE_SIZE,
-                                       info->screen_base,
+                                       info->screen_base - PAGE_SIZE,
                                        info->fix.smem_start);
                free_irq(par->irq, par);
                clk_disable(par->lcdc_clk);
@@ -749,6 +749,7 @@ static int __init fb_probe(struct platform_device *device)
                                (PAGE_SIZE - par->palette_sz);
 
        /* the rest of the frame buffer is pixel data */
+       da8xx_fb_info->screen_base = par->v_palette_base + par->palette_sz;
        da8xx_fb_fix.smem_start = par->p_palette_base + par->palette_sz;
        da8xx_fb_fix.smem_len = par->databuf_sz - par->palette_sz;
        da8xx_fb_fix.line_length = (lcdc_info->width * lcd_cfg->bpp) / 8;
@@ -787,6 +788,8 @@ static int __init fb_probe(struct platform_device *device)
        da8xx_fb_info->var = da8xx_fb_var;
        da8xx_fb_info->fbops = &da8xx_fb_ops;
        da8xx_fb_info->pseudo_palette = par->pseudo_palette;
+       da8xx_fb_info->fix.visual = (da8xx_fb_info->var.bits_per_pixel <= 8) ?
+                               FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_TRUECOLOR;
 
        ret = fb_alloc_cmap(&da8xx_fb_info->cmap, PALETTE_SIZE, 0);
        if (ret)
@@ -825,7 +828,7 @@ err_free_irq:
 
 err_release_fb_mem:
        dma_free_coherent(NULL, par->databuf_sz + PAGE_SIZE,
-                               da8xx_fb_info->screen_base,
+                               da8xx_fb_info->screen_base - PAGE_SIZE,
                                da8xx_fb_info->fix.smem_start);
 
 err_release_fb:
index f6cccc9..bf12d06 100644 (file)
@@ -62,7 +62,7 @@ extern unsigned int idt_cpu_freq;
 static int timeout = WATCHDOG_TIMEOUT;
 module_param(timeout, int, 0);
 MODULE_PARM_DESC(timeout, "Watchdog timeout value, in seconds (default="
-               WATCHDOG_TIMEOUT ")");
+               __MODULE_STRING(WATCHDOG_TIMEOUT) ")");
 
 static int nowayout = WATCHDOG_NOWAYOUT;
 module_param(nowayout, int, 0);
@@ -276,7 +276,7 @@ static int __devinit rc32434_wdt_probe(struct platform_device *pdev)
                return -ENODEV;
        }
 
-       wdt_reg = ioremap_nocache(r->start, r->end - r->start);
+       wdt_reg = ioremap_nocache(r->start, resource_size(r));
        if (!wdt_reg) {
                printk(KERN_ERR PFX "failed to remap I/O resources\n");
                return -ENXIO;
index 39923cc..eb4b337 100644 (file)
@@ -606,7 +606,7 @@ config SYSFS_DEPRECATED
        bool
 
 config SYSFS_DEPRECATED_V2
-       bool "remove sysfs features which may confuse old userspace tools"
+       bool "enable deprecated sysfs features which may confuse old userspace tools"
        depends on SYSFS
        default n
        select SYSFS_DEPRECATED
index 8b7d880..5842a71 100644 (file)
@@ -1187,7 +1187,8 @@ static void add_sect_attrs(struct module *mod, unsigned int nsect,
 
        /* Count loaded sections and allocate structures */
        for (i = 0; i < nsect; i++)
-               if (sechdrs[i].sh_flags & SHF_ALLOC)
+               if (sechdrs[i].sh_flags & SHF_ALLOC
+                   && sechdrs[i].sh_size)
                        nloaded++;
        size[0] = ALIGN(sizeof(*sect_attrs)
                        + nloaded * sizeof(sect_attrs->attrs[0]),
@@ -1207,6 +1208,8 @@ static void add_sect_attrs(struct module *mod, unsigned int nsect,
        for (i = 0; i < nsect; i++) {
                if (! (sechdrs[i].sh_flags & SHF_ALLOC))
                        continue;
+               if (!sechdrs[i].sh_size)
+                       continue;
                sattr->address = sechdrs[i].sh_addr;
                sattr->name = kstrdup(secstrings + sechdrs[i].sh_name,
                                        GFP_KERNEL);