diff --git a/[refs] b/[refs] index d7fc3a98c956..8c5462452d5a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9c38c7e573ec44e4a10f735c048b40eb00ccc29c +refs/heads/master: fa748203175de7c08f2df80e5a0eeca40329b5e2 diff --git a/trunk/Documentation/DMA-mapping.txt b/trunk/Documentation/DMA-mapping.txt index c74fec8c2351..b463ecd0c7ce 100644 --- a/trunk/Documentation/DMA-mapping.txt +++ b/trunk/Documentation/DMA-mapping.txt @@ -740,7 +740,7 @@ failure can be determined by: dma_addr_t dma_handle; dma_handle = pci_map_single(pdev, addr, size, direction); - if (pci_dma_mapping_error(pdev, dma_handle)) { + if (pci_dma_mapping_error(dma_handle)) { /* * reduce current DMA mapping usage, * delay and try again later or diff --git a/trunk/Documentation/sysctl/kernel.txt b/trunk/Documentation/sysctl/kernel.txt index e1ff0d920a5c..276a7e637822 100644 --- a/trunk/Documentation/sysctl/kernel.txt +++ b/trunk/Documentation/sysctl/kernel.txt @@ -351,10 +351,9 @@ kernel. This value defaults to SHMMAX. softlockup_thresh: -This value can be used to lower the softlockup tolerance threshold. The -default threshold is 60 seconds. If a cpu is locked up for 60 seconds, -the kernel complains. Valid values are 1-60 seconds. Setting this -tunable to zero will disable the softlockup detection altogether. +This value can be used to lower the softlockup tolerance +threshold. The default threshold is 10s. If a cpu is locked up +for 10s, the kernel complains. Valid values are 1-60s. ============================================================== diff --git a/trunk/MAINTAINERS b/trunk/MAINTAINERS index 42ebbfdc350b..cad81a24e832 100644 --- a/trunk/MAINTAINERS +++ b/trunk/MAINTAINERS @@ -3833,12 +3833,11 @@ S: Maintained SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEMENT P: Liam Girdwood -M: lrg@slimlogic.co.uk +M: liam.girdwood@wolfsonmicro.com P: Mark Brown M: broonie@opensource.wolfsonmicro.com T: git opensource.wolfsonmicro.com/linux-2.6-asoc L: alsa-devel@alsa-project.org (subscribers-only) -W: http://alsa-project.org/main/index.php/ASoC S: Supported SPI SUBSYSTEM diff --git a/trunk/arch/ia64/kernel/efi.c b/trunk/arch/ia64/kernel/efi.c index 51b75cea7018..d45f215bc8fc 100644 --- a/trunk/arch/ia64/kernel/efi.c +++ b/trunk/arch/ia64/kernel/efi.c @@ -1232,10 +1232,9 @@ efi_initialize_iomem_resources(struct resource *code_resource, if (md->attribute & EFI_MEMORY_WP) { name = "System ROM"; flags |= IORESOURCE_READONLY; - } else if (md->attribute == EFI_MEMORY_UC) - name = "Uncached RAM"; - else + } else { name = "System RAM"; + } break; case EFI_ACPI_MEMORY_NVS: diff --git a/trunk/arch/ia64/kernel/setup.c b/trunk/arch/ia64/kernel/setup.c index de636b215677..c27d5b2c182b 100644 --- a/trunk/arch/ia64/kernel/setup.c +++ b/trunk/arch/ia64/kernel/setup.c @@ -616,9 +616,7 @@ setup_arch (char **cmdline_p) ia64_mca_init(); platform_setup(cmdline_p); -#ifndef CONFIG_IA64_HP_SIM check_sal_cache_flush(); -#endif paging_init(); } diff --git a/trunk/arch/sparc64/kernel/of_device.c b/trunk/arch/sparc64/kernel/of_device.c index 100ebd527499..f845f150f565 100644 --- a/trunk/arch/sparc64/kernel/of_device.c +++ b/trunk/arch/sparc64/kernel/of_device.c @@ -169,7 +169,7 @@ static unsigned long of_bus_default_get_flags(const u32 *addr, unsigned long fla static int of_bus_pci_match(struct device_node *np) { - if (!strcmp(np->name, "pci")) { + if (!strcmp(np->type, "pci") || !strcmp(np->type, "pciex")) { const char *model = of_get_property(np, "model", NULL); if (model && !strcmp(model, "SUNW,simba")) @@ -200,7 +200,7 @@ static int of_bus_simba_match(struct device_node *np) /* Treat PCI busses lacking ranges property just like * simba. */ - if (!strcmp(np->name, "pci")) { + if (!strcmp(np->type, "pci") || !strcmp(np->type, "pciex")) { if (!of_find_property(np, "ranges", NULL)) return 1; } @@ -429,7 +429,7 @@ static int __init use_1to1_mapping(struct device_node *pp) * it lacks a ranges property, and this will include * cases like Simba. */ - if (!strcmp(pp->name, "pci")) + if (!strcmp(pp->type, "pci") || !strcmp(pp->type, "pciex")) return 0; return 1; @@ -714,7 +714,8 @@ static unsigned int __init build_one_device_irq(struct of_device *op, break; } } else { - if (!strcmp(pp->name, "pci")) { + if (!strcmp(pp->type, "pci") || + !strcmp(pp->type, "pciex")) { unsigned int this_orig_irq = irq; irq = pci_irq_swizzle(dp, pp, irq); diff --git a/trunk/arch/sparc64/kernel/pci.c b/trunk/arch/sparc64/kernel/pci.c index 80dad76f8b81..55096195458f 100644 --- a/trunk/arch/sparc64/kernel/pci.c +++ b/trunk/arch/sparc64/kernel/pci.c @@ -425,7 +425,7 @@ struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm, dev->current_state = 4; /* unknown power state */ dev->error_state = pci_channel_io_normal; - if (!strcmp(node->name, "pci")) { + if (!strcmp(type, "pci") || !strcmp(type, "pciex")) { /* a PCI-PCI bridge */ dev->hdr_type = PCI_HEADER_TYPE_BRIDGE; dev->rom_base_reg = PCI_ROM_ADDRESS1; diff --git a/trunk/arch/x86/kernel/amd_iommu.c b/trunk/arch/x86/kernel/amd_iommu.c index 042fdc27bc92..69b4d060b21c 100644 --- a/trunk/arch/x86/kernel/amd_iommu.c +++ b/trunk/arch/x86/kernel/amd_iommu.c @@ -101,10 +101,10 @@ static int iommu_queue_command(struct amd_iommu *iommu, struct iommu_cmd *cmd) */ static int iommu_completion_wait(struct amd_iommu *iommu) { - int ret = 0, ready = 0; + int ret, ready = 0; unsigned status = 0; struct iommu_cmd cmd; - unsigned long flags, i = 0; + unsigned long i = 0; memset(&cmd, 0, sizeof(cmd)); cmd.data[0] = CMD_COMPL_WAIT_INT_MASK; @@ -112,12 +112,10 @@ static int iommu_completion_wait(struct amd_iommu *iommu) iommu->need_sync = 0; - spin_lock_irqsave(&iommu->lock, flags); - - ret = __iommu_queue_command(iommu, &cmd); + ret = iommu_queue_command(iommu, &cmd); if (ret) - goto out; + return ret; while (!ready && (i < EXIT_LOOP_COUNT)) { ++i; @@ -132,8 +130,6 @@ static int iommu_completion_wait(struct amd_iommu *iommu) if (unlikely((i == EXIT_LOOP_COUNT) && printk_ratelimit())) printk(KERN_WARNING "AMD IOMMU: Completion wait loop failed\n"); -out: - spin_unlock_irqrestore(&iommu->lock, flags); return 0; } @@ -144,7 +140,6 @@ static int iommu_completion_wait(struct amd_iommu *iommu) static int iommu_queue_inv_dev_entry(struct amd_iommu *iommu, u16 devid) { struct iommu_cmd cmd; - int ret; BUG_ON(iommu == NULL); @@ -152,11 +147,9 @@ static int iommu_queue_inv_dev_entry(struct amd_iommu *iommu, u16 devid) CMD_SET_TYPE(&cmd, CMD_INV_DEV_ENTRY); cmd.data[0] = devid; - ret = iommu_queue_command(iommu, &cmd); - iommu->need_sync = 1; - return ret; + return iommu_queue_command(iommu, &cmd); } /* @@ -166,7 +159,6 @@ static int iommu_queue_inv_iommu_pages(struct amd_iommu *iommu, u64 address, u16 domid, int pde, int s) { struct iommu_cmd cmd; - int ret; memset(&cmd, 0, sizeof(cmd)); address &= PAGE_MASK; @@ -179,11 +171,9 @@ static int iommu_queue_inv_iommu_pages(struct amd_iommu *iommu, if (pde) /* PDE bit - we wan't flush everything not only the PTEs */ cmd.data[2] |= CMD_INV_IOMMU_PAGES_PDE_MASK; - ret = iommu_queue_command(iommu, &cmd); - iommu->need_sync = 1; - return ret; + return iommu_queue_command(iommu, &cmd); } /* diff --git a/trunk/arch/x86/kernel/vsmp_64.c b/trunk/arch/x86/kernel/vsmp_64.c index 7766d36983fc..0c029e8959c7 100644 --- a/trunk/arch/x86/kernel/vsmp_64.c +++ b/trunk/arch/x86/kernel/vsmp_64.c @@ -61,7 +61,7 @@ static void vsmp_irq_enable(void) native_restore_fl((flags | X86_EFLAGS_IF) & (~X86_EFLAGS_AC)); } -static unsigned __init_or_module vsmp_patch(u8 type, u16 clobbers, void *ibuf, +static unsigned __init vsmp_patch(u8 type, u16 clobbers, void *ibuf, unsigned long addr, unsigned len) { switch (type) { diff --git a/trunk/arch/x86/oprofile/nmi_int.c b/trunk/arch/x86/oprofile/nmi_int.c index 8a5f1614a3d5..0227694f7dab 100644 --- a/trunk/arch/x86/oprofile/nmi_int.c +++ b/trunk/arch/x86/oprofile/nmi_int.c @@ -295,12 +295,10 @@ static void nmi_cpu_shutdown(void *dummy) static void nmi_shutdown(void) { - struct op_msrs *msrs; - + struct op_msrs *msrs = &get_cpu_var(cpu_msrs); nmi_enabled = 0; on_each_cpu(nmi_cpu_shutdown, NULL, 1); unregister_die_notifier(&profile_exceptions_nb); - msrs = &get_cpu_var(cpu_msrs); model->shutdown(msrs); free_msrs(); put_cpu_var(cpu_msrs); diff --git a/trunk/drivers/net/wireless/ath9k/core.c b/trunk/drivers/net/wireless/ath9k/core.c index c04959357bda..f6c45288d0e7 100644 --- a/trunk/drivers/net/wireless/ath9k/core.c +++ b/trunk/drivers/net/wireless/ath9k/core.c @@ -294,6 +294,8 @@ static int ath_stop(struct ath_softc *sc) * hardware is gone (invalid). */ + if (!sc->sc_invalid) + ath9k_hw_set_interrupts(ah, 0); ath_draintxq(sc, false); if (!sc->sc_invalid) { ath_stoprecv(sc); @@ -1334,8 +1336,6 @@ void ath_deinit(struct ath_softc *sc) DPRINTF(sc, ATH_DBG_CONFIG, "%s\n", __func__); - tasklet_kill(&sc->intr_tq); - tasklet_kill(&sc->bcon_tasklet); ath_stop(sc); if (!sc->sc_invalid) ath9k_hw_setpower(sc->sc_ah, ATH9K_PM_AWAKE); diff --git a/trunk/drivers/net/wireless/ath9k/core.h b/trunk/drivers/net/wireless/ath9k/core.h index 2f84093331ee..4ee695b76b88 100644 --- a/trunk/drivers/net/wireless/ath9k/core.h +++ b/trunk/drivers/net/wireless/ath9k/core.h @@ -974,6 +974,7 @@ struct ath_softc { u32 sc_keymax; /* size of key cache */ DECLARE_BITMAP(sc_keymap, ATH_KEYMAX); /* key use bit map */ u8 sc_splitmic; /* split TKIP MIC keys */ + int sc_keytype; /* RX */ struct list_head sc_rxbuf; diff --git a/trunk/drivers/net/wireless/ath9k/main.c b/trunk/drivers/net/wireless/ath9k/main.c index acebdf1d20a8..99badf1404c3 100644 --- a/trunk/drivers/net/wireless/ath9k/main.c +++ b/trunk/drivers/net/wireless/ath9k/main.c @@ -206,6 +206,8 @@ static int ath_key_config(struct ath_softc *sc, if (!ret) return -EIO; + if (mac) + sc->sc_keytype = hk.kv_type; return 0; } @@ -776,6 +778,7 @@ static int ath9k_set_key(struct ieee80211_hw *hw, case DISABLE_KEY: ath_key_delete(sc, key); clear_bit(key->keyidx, sc->sc_keymap); + sc->sc_keytype = ATH9K_CIPHER_CLR; break; default: ret = -EINVAL; @@ -1411,17 +1414,10 @@ static void ath_pci_remove(struct pci_dev *pdev) { struct ieee80211_hw *hw = pci_get_drvdata(pdev); struct ath_softc *sc = hw->priv; - enum ath9k_int status; - if (pdev->irq) { - ath9k_hw_set_interrupts(sc->sc_ah, 0); - /* clear the ISR */ - ath9k_hw_getisr(sc->sc_ah, &status); - sc->sc_invalid = 1; + if (pdev->irq) free_irq(pdev->irq, sc); - } ath_detach(sc); - pci_iounmap(pdev, sc->mem); pci_release_region(pdev, 0); pci_disable_device(pdev); diff --git a/trunk/drivers/net/wireless/ath9k/xmit.c b/trunk/drivers/net/wireless/ath9k/xmit.c index 8b332e11a656..550129f717e2 100644 --- a/trunk/drivers/net/wireless/ath9k/xmit.c +++ b/trunk/drivers/net/wireless/ath9k/xmit.c @@ -315,11 +315,11 @@ static int ath_tx_prepare(struct ath_softc *sc, txctl->keyix = tx_info->control.hw_key->hw_key_idx; txctl->frmlen += tx_info->control.icv_len; - if (tx_info->control.hw_key->alg == ALG_WEP) + if (sc->sc_keytype == ATH9K_CIPHER_WEP) txctl->keytype = ATH9K_KEY_TYPE_WEP; - else if (tx_info->control.hw_key->alg == ALG_TKIP) + else if (sc->sc_keytype == ATH9K_CIPHER_TKIP) txctl->keytype = ATH9K_KEY_TYPE_TKIP; - else if (tx_info->control.hw_key->alg == ALG_CCMP) + else if (sc->sc_keytype == ATH9K_CIPHER_AES_CCM) txctl->keytype = ATH9K_KEY_TYPE_AES; } diff --git a/trunk/drivers/net/wireless/zd1211rw/zd_usb.c b/trunk/drivers/net/wireless/zd1211rw/zd_usb.c index a60ae86bd5c9..da8b7433e3a6 100644 --- a/trunk/drivers/net/wireless/zd1211rw/zd_usb.c +++ b/trunk/drivers/net/wireless/zd1211rw/zd_usb.c @@ -58,7 +58,6 @@ static struct usb_device_id usb_ids[] = { { USB_DEVICE(0x0586, 0x3407), .driver_info = DEVICE_ZD1211 }, { USB_DEVICE(0x129b, 0x1666), .driver_info = DEVICE_ZD1211 }, { USB_DEVICE(0x157e, 0x300a), .driver_info = DEVICE_ZD1211 }, - { USB_DEVICE(0x0105, 0x145f), .driver_info = DEVICE_ZD1211 }, /* ZD1211B */ { USB_DEVICE(0x0ace, 0x1215), .driver_info = DEVICE_ZD1211B }, { USB_DEVICE(0x157e, 0x300d), .driver_info = DEVICE_ZD1211B }, diff --git a/trunk/drivers/pci/pcie/aspm.c b/trunk/drivers/pci/pcie/aspm.c index 851f5b83cdbc..9a7c9e1408a4 100644 --- a/trunk/drivers/pci/pcie/aspm.c +++ b/trunk/drivers/pci/pcie/aspm.c @@ -527,7 +527,7 @@ static int pcie_aspm_sanity_check(struct pci_dev *pdev) */ pci_read_config_dword(child_dev, child_pos + PCI_EXP_DEVCAP, ®32); - if (!(reg32 & PCI_EXP_DEVCAP_RBER) && !aspm_force) { + if (!(reg32 & PCI_EXP_DEVCAP_RBER && !aspm_force)) { printk("Pre-1.1 PCIe device detected, " "disable ASPM for %s. It can be enabled forcedly" " with 'pcie_aspm=force'\n", pci_name(pdev)); diff --git a/trunk/drivers/pci/search.c b/trunk/drivers/pci/search.c index 4edfc4731bd4..3b3b5f178797 100644 --- a/trunk/drivers/pci/search.c +++ b/trunk/drivers/pci/search.c @@ -162,7 +162,7 @@ EXPORT_SYMBOL(pci_find_slot); * time. */ struct pci_dev *pci_find_device(unsigned int vendor, unsigned int device, - struct pci_dev *from) + const struct pci_dev *from) { struct pci_dev *pdev; @@ -263,7 +263,7 @@ static int match_pci_dev_by_id(struct device *dev, void *data) * this file. */ static struct pci_dev *pci_get_dev_by_id(const struct pci_device_id *id, - struct pci_dev *from) + const struct pci_dev *from) { struct device *dev; struct device *dev_start = NULL; @@ -303,7 +303,7 @@ static struct pci_dev *pci_get_dev_by_id(const struct pci_device_id *id, */ struct pci_dev *pci_get_subsys(unsigned int vendor, unsigned int device, unsigned int ss_vendor, unsigned int ss_device, - struct pci_dev *from) + const struct pci_dev *from) { struct pci_dev *pdev; struct pci_device_id *id; diff --git a/trunk/drivers/serial/atmel_serial.c b/trunk/drivers/serial/atmel_serial.c index 61fb8b6d19af..3a6da80b081c 100644 --- a/trunk/drivers/serial/atmel_serial.c +++ b/trunk/drivers/serial/atmel_serial.c @@ -131,8 +131,7 @@ struct atmel_uart_char { struct atmel_uart_port { struct uart_port uart; /* uart */ struct clk *clk; /* uart clock */ - int may_wakeup; /* cached value of device_may_wakeup for times we need to disable it */ - u32 backup_imr; /* IMR saved during suspend */ + unsigned short suspended; /* is port suspended? */ int break_active; /* break being received */ short use_dma_rx; /* enable PDC receiver */ @@ -985,15 +984,8 @@ static void atmel_serial_pm(struct uart_port *port, unsigned int state, * This is called on uart_open() or a resume event. */ clk_enable(atmel_port->clk); - - /* re-enable interrupts if we disabled some on suspend */ - UART_PUT_IER(port, atmel_port->backup_imr); break; case 3: - /* Back up the interrupt mask and disable all interrupts */ - atmel_port->backup_imr = UART_GET_IMR(port); - UART_PUT_IDR(port, -1); - /* * Disable the peripheral clock for this serial port. * This is called on uart_close() or a suspend event. @@ -1483,12 +1475,13 @@ static int atmel_serial_suspend(struct platform_device *pdev, cpu_relax(); } - /* we can not wake up if we're running on slow clock */ - atmel_port->may_wakeup = device_may_wakeup(&pdev->dev); - if (atmel_serial_clk_will_stop()) - device_set_wakeup_enable(&pdev->dev, 0); - - uart_suspend_port(&atmel_uart, port); + if (device_may_wakeup(&pdev->dev) + && !atmel_serial_clk_will_stop()) + enable_irq_wake(port->irq); + else { + uart_suspend_port(&atmel_uart, port); + atmel_port->suspended = 1; + } return 0; } @@ -1498,8 +1491,11 @@ static int atmel_serial_resume(struct platform_device *pdev) struct uart_port *port = platform_get_drvdata(pdev); struct atmel_uart_port *atmel_port = to_atmel_uart_port(port); - uart_resume_port(&atmel_uart, port); - device_set_wakeup_enable(&pdev->dev, atmel_port->may_wakeup); + if (atmel_port->suspended) { + uart_resume_port(&atmel_uart, port); + atmel_port->suspended = 0; + } else + disable_irq_wake(port->irq); return 0; } @@ -1517,8 +1513,6 @@ static int __devinit atmel_serial_probe(struct platform_device *pdev) BUILD_BUG_ON(!is_power_of_2(ATMEL_SERIAL_RINGSIZE)); port = &atmel_ports[pdev->id]; - port->backup_imr = 0; - atmel_init_port(port, pdev); if (!atmel_use_dma_rx(&port->uart)) { diff --git a/trunk/drivers/watchdog/geodewdt.c b/trunk/drivers/watchdog/geodewdt.c index 6799a6de66fe..614a5c7017b6 100644 --- a/trunk/drivers/watchdog/geodewdt.c +++ b/trunk/drivers/watchdog/geodewdt.c @@ -130,8 +130,8 @@ static ssize_t geodewdt_write(struct file *file, const char __user *data, return len; } -static long geodewdt_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) +static int geodewdt_ioctl(struct inode *inode, struct file *file, + unsigned int cmd, unsigned long arg) { void __user *argp = (void __user *)arg; int __user *p = argp; @@ -198,7 +198,7 @@ static const struct file_operations geodewdt_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = geodewdt_write, - .unlocked_ioctl = geodewdt_ioctl, + .ioctl = geodewdt_ioctl, .open = geodewdt_open, .release = geodewdt_release, }; diff --git a/trunk/drivers/watchdog/ibmasr.c b/trunk/drivers/watchdog/ibmasr.c index 89fcefcc8510..b82405cfb4cd 100644 --- a/trunk/drivers/watchdog/ibmasr.c +++ b/trunk/drivers/watchdog/ibmasr.c @@ -85,6 +85,7 @@ static void __asr_toggle(void) outb(reg & ~asr_toggle_mask, asr_write_addr); reg = inb(asr_read_addr); + spin_unlock(&asr_lock); } static void asr_toggle(void) diff --git a/trunk/drivers/watchdog/pnx4008_wdt.c b/trunk/drivers/watchdog/pnx4008_wdt.c index 6d9f3d4a9987..0ed84162437b 100644 --- a/trunk/drivers/watchdog/pnx4008_wdt.c +++ b/trunk/drivers/watchdog/pnx4008_wdt.c @@ -173,8 +173,8 @@ static const struct watchdog_info ident = { .identity = "PNX4008 Watchdog", }; -static long pnx4008_wdt_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) +static long pnx4008_wdt_ioctl(struct inode *inode, struct file *file, + unsigned int cmd, unsigned long arg) { int ret = -ENOTTY; int time; diff --git a/trunk/drivers/watchdog/rc32434_wdt.c b/trunk/drivers/watchdog/rc32434_wdt.c index c9c73b69c5e5..6756bcb009ed 100644 --- a/trunk/drivers/watchdog/rc32434_wdt.c +++ b/trunk/drivers/watchdog/rc32434_wdt.c @@ -182,8 +182,8 @@ static ssize_t rc32434_wdt_write(struct file *file, const char *data, return 0; } -static long rc32434_wdt_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) +static int rc32434_wdt_ioctl(struct inode *inode, struct file *file, + unsigned int cmd, unsigned long arg) { void __user *argp = (void __user *)arg; int new_timeout; @@ -242,7 +242,7 @@ static struct file_operations rc32434_wdt_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = rc32434_wdt_write, - .unlocked_ioctl = rc32434_wdt_ioctl, + .ioctl = rc32434_wdt_ioctl, .open = rc32434_wdt_open, .release = rc32434_wdt_release, }; diff --git a/trunk/drivers/watchdog/rdc321x_wdt.c b/trunk/drivers/watchdog/rdc321x_wdt.c index bf92802f2bbe..9108efa73e7d 100644 --- a/trunk/drivers/watchdog/rdc321x_wdt.c +++ b/trunk/drivers/watchdog/rdc321x_wdt.c @@ -144,8 +144,8 @@ static int rdc321x_wdt_release(struct inode *inode, struct file *file) return 0; } -static long rdc321x_wdt_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) +static int rdc321x_wdt_ioctl(struct inode *inode, struct file *file, + unsigned int cmd, unsigned long arg) { void __user *argp = (void __user *)arg; unsigned int value; @@ -204,7 +204,7 @@ static ssize_t rdc321x_wdt_write(struct file *file, const char __user *buf, static const struct file_operations rdc321x_wdt_fops = { .owner = THIS_MODULE, .llseek = no_llseek, - .unlocked_ioctl = rdc321x_wdt_ioctl, + .ioctl = rdc321x_wdt_ioctl, .open = rdc321x_wdt_open, .write = rdc321x_wdt_write, .release = rdc321x_wdt_release, diff --git a/trunk/drivers/watchdog/wdt285.c b/trunk/drivers/watchdog/wdt285.c index 191ea6302107..db362c34958b 100644 --- a/trunk/drivers/watchdog/wdt285.c +++ b/trunk/drivers/watchdog/wdt285.c @@ -115,8 +115,8 @@ static int watchdog_release(struct inode *inode, struct file *file) return 0; } -static ssize_t watchdog_write(struct file *file, const char __user *data, - size_t len, loff_t *ppos) +static ssize_t watchdog_write(struct file *file, const char *data, + size_t len, loff_t *ppos) { /* * Refresh the timer. @@ -133,22 +133,21 @@ static const struct watchdog_info ident = { }; static long watchdog_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) + unsigned long arg) { unsigned int new_margin; - int __user *int_arg = (int __user *)arg; int ret = -ENOTTY; switch (cmd) { case WDIOC_GETSUPPORT: ret = 0; - if (copy_to_user((void __user *)arg, &ident, sizeof(ident))) + if (copy_to_user((void *)arg, &ident, sizeof(ident))) ret = -EFAULT; break; case WDIOC_GETSTATUS: case WDIOC_GETBOOTSTATUS: - ret = put_user(0, int_arg); + ret = put_user(0, (int *)arg); break; case WDIOC_KEEPALIVE: @@ -157,7 +156,7 @@ static long watchdog_ioctl(struct file *file, unsigned int cmd, break; case WDIOC_SETTIMEOUT: - ret = get_user(new_margin, int_arg); + ret = get_user(new_margin, (int *)arg); if (ret) break; @@ -172,7 +171,7 @@ static long watchdog_ioctl(struct file *file, unsigned int cmd, watchdog_ping(); /* Fall */ case WDIOC_GETTIMEOUT: - ret = put_user(soft_margin, int_arg); + ret = put_user(soft_margin, (int *)arg); break; } return ret; diff --git a/trunk/include/linux/pci.h b/trunk/include/linux/pci.h index 98dc6243a706..c0e14008a3c2 100644 --- a/trunk/include/linux/pci.h +++ b/trunk/include/linux/pci.h @@ -534,7 +534,7 @@ extern void pci_sort_breadthfirst(void); #ifdef CONFIG_PCI_LEGACY struct pci_dev __deprecated *pci_find_device(unsigned int vendor, unsigned int device, - struct pci_dev *from); + const struct pci_dev *from); struct pci_dev __deprecated *pci_find_slot(unsigned int bus, unsigned int devfn); #endif /* CONFIG_PCI_LEGACY */ @@ -550,7 +550,7 @@ struct pci_dev *pci_get_device(unsigned int vendor, unsigned int device, struct pci_dev *from); struct pci_dev *pci_get_subsys(unsigned int vendor, unsigned int device, unsigned int ss_vendor, unsigned int ss_device, - struct pci_dev *from); + const struct pci_dev *from); struct pci_dev *pci_get_slot(struct pci_bus *bus, unsigned int devfn); struct pci_dev *pci_get_bus_and_slot(unsigned int bus, unsigned int devfn); struct pci_dev *pci_get_class(unsigned int class, struct pci_dev *from); @@ -816,7 +816,7 @@ _PCI_NOP_ALL(write,) static inline struct pci_dev *pci_find_device(unsigned int vendor, unsigned int device, - struct pci_dev *from) + const struct pci_dev *from) { return NULL; } @@ -838,7 +838,7 @@ static inline struct pci_dev *pci_get_subsys(unsigned int vendor, unsigned int device, unsigned int ss_vendor, unsigned int ss_device, - struct pci_dev *from) + const struct pci_dev *from) { return NULL; } diff --git a/trunk/include/linux/smb.h b/trunk/include/linux/smb.h index 82fefddc5987..caa43b2370cb 100644 --- a/trunk/include/linux/smb.h +++ b/trunk/include/linux/smb.h @@ -11,9 +11,7 @@ #include #include -#ifdef __KERNEL__ #include -#endif enum smb_protocol { SMB_PROTOCOL_NONE, diff --git a/trunk/kernel/kexec.c b/trunk/kernel/kexec.c index aef265325cd3..59f3f0df35d4 100644 --- a/trunk/kernel/kexec.c +++ b/trunk/kernel/kexec.c @@ -753,14 +753,8 @@ static struct page *kimage_alloc_page(struct kimage *image, *old = addr | (*old & ~PAGE_MASK); /* The old page I have found cannot be a - * destination page, so return it if it's - * gfp_flags honor the ones passed in. + * destination page, so return it. */ - if (!(gfp_mask & __GFP_HIGHMEM) && - PageHighMem(old_page)) { - kimage_free_pages(old_page); - continue; - } addr = old_addr; page = old_page; break; diff --git a/trunk/kernel/sched.c b/trunk/kernel/sched.c index 98890807375b..13dd2db9fb2d 100644 --- a/trunk/kernel/sched.c +++ b/trunk/kernel/sched.c @@ -1087,7 +1087,7 @@ hotplug_hrtick(struct notifier_block *nfb, unsigned long action, void *hcpu) return NOTIFY_DONE; } -static void init_hrtick(void) +static __init void init_hrtick(void) { hotcpu_notifier(hotplug_hrtick, 0); } diff --git a/trunk/mm/memcontrol.c b/trunk/mm/memcontrol.c index c0500e4d3a2f..0f1f7a7374ba 100644 --- a/trunk/mm/memcontrol.c +++ b/trunk/mm/memcontrol.c @@ -806,7 +806,6 @@ int mem_cgroup_shrink_usage(struct mm_struct *mm, gfp_t gfp_mask) do { progress = try_to_free_mem_cgroup_pages(mem, gfp_mask); - progress += res_counter_check_under_limit(&mem->res); } while (!progress && --retry); css_put(&mem->css); diff --git a/trunk/mm/tiny-shmem.c b/trunk/mm/tiny-shmem.c index d17cb6f6ab10..ae532f501943 100644 --- a/trunk/mm/tiny-shmem.c +++ b/trunk/mm/tiny-shmem.c @@ -65,25 +65,31 @@ struct file *shmem_file_setup(char *name, loff_t size, unsigned long flags) if (!dentry) goto put_memory; - error = -ENFILE; - file = get_empty_filp(); - if (!file) - goto put_dentry; - error = -ENOSPC; inode = ramfs_get_inode(root->d_sb, S_IFREG | S_IRWXUGO, 0); if (!inode) - goto close_file; + goto put_dentry; d_instantiate(dentry, inode); - inode->i_size = size; - inode->i_nlink = 0; /* It is unlinked */ - init_file(file, shm_mnt, dentry, FMODE_WRITE | FMODE_READ, + error = -ENFILE; + file = alloc_file(shm_mnt, dentry, FMODE_WRITE | FMODE_READ, &ramfs_file_operations); + if (!file) + goto put_dentry; + + inode->i_nlink = 0; /* It is unlinked */ + + /* notify everyone as to the change of file size */ + error = do_truncate(dentry, size, 0, file); + if (error < 0) + goto close_file; + return file; close_file: put_filp(file); + return ERR_PTR(error); + put_dentry: dput(dentry); put_memory: diff --git a/trunk/net/socket.c b/trunk/net/socket.c index 3e8d4e35c08f..8ef8ba81b9e2 100644 --- a/trunk/net/socket.c +++ b/trunk/net/socket.c @@ -1511,7 +1511,6 @@ long do_accept(int fd, struct sockaddr __user *upeer_sockaddr, goto out_put; } -#if 0 #ifdef HAVE_SET_RESTORE_SIGMASK asmlinkage long sys_paccept(int fd, struct sockaddr __user *upeer_sockaddr, int __user *upeer_addrlen, @@ -1565,7 +1564,6 @@ asmlinkage long sys_paccept(int fd, struct sockaddr __user *upeer_sockaddr, return do_accept(fd, upeer_sockaddr, upeer_addrlen, flags); } #endif -#endif asmlinkage long sys_accept(int fd, struct sockaddr __user *upeer_sockaddr, int __user *upeer_addrlen) diff --git a/trunk/scripts/kernel-doc b/trunk/scripts/kernel-doc index 44ee94d2ab76..ff787e6ff8ed 100755 --- a/trunk/scripts/kernel-doc +++ b/trunk/scripts/kernel-doc @@ -781,7 +781,6 @@ sub output_struct_xml(%) { print " \n"; print " Members\n"; - if ($#{$args{'parameterlist'}} >= 0) { print " \n"; foreach $parameter (@{$args{'parameterlist'}}) { ($parameter =~ /^#/) && next; @@ -799,9 +798,6 @@ sub output_struct_xml(%) { print " \n"; } print " \n"; - } else { - print " \n None\n \n"; - } print " \n"; output_section_xml(@_); diff --git a/trunk/sound/soc/at32/at32-pcm.c b/trunk/sound/soc/at32/at32-pcm.c index c83584f989a9..435f1daf177c 100644 --- a/trunk/sound/soc/at32/at32-pcm.c +++ b/trunk/sound/soc/at32/at32-pcm.c @@ -434,8 +434,7 @@ static int at32_pcm_suspend(struct platform_device *pdev, params = prtd->params; /* Disable the PDC and save the PDC registers */ - ssc_writex(params->ssc->regs, ATMEL_PDC_PTCR, - params->mask->pdc_disable); + ssc_writex(params->ssc->regs, PDC_PTCR, params->mask->pdc_disable); prtd->pdc_xpr_save = ssc_readx(params->ssc->regs, params->pdc->xpr); prtd->pdc_xcr_save = ssc_readx(params->ssc->regs, params->pdc->xcr); @@ -465,7 +464,7 @@ static int at32_pcm_resume(struct platform_device *pdev, ssc_writex(params->ssc->regs, params->pdc->xnpr, prtd->pdc_xnpr_save); ssc_writex(params->ssc->regs, params->pdc->xncr, prtd->pdc_xncr_save); - ssc_writex(params->ssc->regs, ATMEL_PDC_PTCR, params->mask->pdc_enable); + ssc_writex(params->ssc->regs, PDC_PTCR, params->mask->pdc_enable); return 0; } #else /* CONFIG_PM */