aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-05-14tty: Fix LED error returnAlan Cox1-1/+1
3.4-rc introduced a regression when setting the LEDS. We do the right thing but then return an error code. Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=43144 Reported-by: Christian Casteyde Signed-off-by: Alan Cox <alan@linux/intel.com> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-05-14tty: Allow uart_register/unregister/registerAlan Cox1-0/+1
This is legitimate but because we don't clear the drv->state pointer in the unregister code causes a bogus BUG(). Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=42880 Signed-off-by: Alan Cox <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-05-10tty: move global ldisc idle waitqueue to the individual ldiscIvo Sieben2-3/+6
The global wait_queue that is used for line discipline idle handling is moved to a separate wait_queue for each line instance. This prevents unnecessary blocking on one line, because of idle handling on another line. Signed-off-by: Ivo Sieben <[email protected]> Acked-by: Alan Cox <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-05-09serial8250-em: Add DT supportMagnus Damm1-0/+7
Update the 8250_em driver to support DT. Signed-off-by: Magnus Damm <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-05-09serial8250-em: clk_get() IS_ERR() error handling fixMagnus Damm1-1/+2
Update the 8250_em driver to correctly handle the case where no clock is associated with the device. The return value of clk_get() needs to be checked with IS_ERR() to avoid NULL pointer referencing. Signed-off-by: Magnus Damm <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-05-09serial_core: Update buffer overrun statistics.Corbin Atkinson1-2/+4
Currently, serial drivers don't report buffer overruns. When a buffer overrun occurs, tty_insert_flip_char returns 0, and no attempt is made to insert that same character again (i.e. it is lost). This patch reports buffer overruns via the buf_overrun field in the port's icount structure. Signed-off-by: Corbin Atkinson <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-05-09tty: drop the pty lock during hangupAlan Cox1-0/+2
In theory we don't need it, in practice we are hitting some ill understood deadlock when we don't drop it. The old code dropped it here so we are not undoing anything problematic for pty. If pty could be unloaded it would be a problem but it can't. Signed-off-by: Alan Cox <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-05-08cris: fix missing tty arg in wait_event_interruptible_tty callPaul Gortmaker1-2/+2
Commit d29f3ef39be4eec0362b985305fc526d9be318cf "tty_lock: Localise the lock" added a tty arg to wait_event_interruptible_tty() but it missed this arch specific instance for cris, causing a compile failure. Cc: Mikael Starvik <[email protected]> Cc: Jesper Nilsson <[email protected]> Cc: Alan Cox <[email protected]> Cc: Arnd Bergmann <[email protected]> Signed-off-by: Paul Gortmaker <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-05-07tty/amiserial: Add missing argument for tty_unlock()Geert Uytterhoeven1-1/+1
commit d29f3ef39be4eec0362b985305fc526d9be318cf ("tty_lock: Localise the lock") missed that d3a7b83f865b46bb7b5e1ed18a129ce1af349db4 ("drivers/tty/amiserial.c: add missing tty_unlock") just added a new caller of tty_unlock(): drivers/tty/amiserial.c: In function ‘set_serial_info’: drivers/tty/amiserial.c:1077: error: too few arguments to function ‘tty_unlock’ Signed-off-by: Geert Uytterhoeven <[email protected]> Cc: Alan Cox <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-05-04tty_lock: Localise the lockAlan Cox15-103/+155
In each remaining case the tty_lock is associated with a specific tty. This means we can now lock on a per tty basis. We do need tty_lock_pair() for the pty case. Uglier but still a step in the right direction. [fixed up calls in 3 missing drivers - gregkh] Signed-off-by: Alan Cox <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-05-04pty: Lock the devpts bits privatelyAlan Cox1-4/+15
This is a private pty affair, we don't want to tangle it with the tty_lock any more as we know all the other non tty locking is now handled by the vfs so we too can move. Signed-off-by: Alan Cox <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-05-04tty_lock: undo the old tty_lock use on the cttyAlan Cox1-2/+7
get_current_tty has its own consistent locking. That means a pile of the tty lock cases are not needed. As get_current_tty also keeps a reference the tty object lifetime means we can propogate the lock removal out. Signed-off-by: Alan Cox <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-05-04serial8250-em: Emma Mobile UART driver V2Magnus Damm3-0/+187
This is V2 of the Emma Mobile 8250 platform driver. The hardware itself has according to the data sheet up to 64 byte FIFOs but at this point we only make use of the 16550 compatible mode. To support this piece of hardware the common UART registers need to be remapped, and the access size differences need to be handled. The DLL and DLM registers can due to offset collision not be remapped easily, and because of that this driver makes use of ->dl_read() and ->dl_write() callbacks. This in turn requires a registration function that takes 8250-specific paramenters. Future potential enhancements include DT support, early platform driver console and fine grained PM. Signed-off-by: Magnus Damm <[email protected]> Acked-by: Alan Cox <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-05-04Add missing call to uart_update_timeout()Lothar Waßmann1-0/+2
This patch fixes a problem reported here: http://article.gmane.org/gmane.linux.ports.arm.kernel/155242/match=auart Signed-off-by: Lothar Waßmann <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-05-04tty: mxser: local variables should not be exposed globallyH Hartley Sweeten1-1/+1
The variable 'mxser_port_ops' is only referenced in this file and should be marked static to prevent it from being exposed globally. Quites the sparse warning: warning: symbol 'mxser_port_ops' was not declared. Should it be static? Signed-off-by: H Hartley Sweeten <[email protected]> Cc: Jiri Slaby <[email protected]> Acked-by: Alan Cox <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-05-02serial8250: Introduce serial8250_register_8250_port()Magnus Damm2-32/+60
Introduce yet another 8250 registration function. This time it is serial8250_register_8250_port() and it allows us to register 8250 hardware instances using struct uart_8250_port. The new function makes it possible to register 8250 hardware that makes use of 8250 specific callbacks such as ->dl_read() and ->dl_write(). Signed-off-by: Magnus Damm <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Acked-by: Alan Cox <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-05-02serial8250: Clean up default map and dl codeMagnus Damm1-26/+12
Get rid of unused functions and macros now when Alchemy and RM9K are converted over to callbacks. Signed-off-by: Magnus Damm <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Acked-by: Alan Cox <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-05-02serial8250: Use dl_read()/dl_write() on RM9KMagnus Damm1-33/+29
Convert the 8250 RM9K support code to make use of the new dl_read()/dl_write() callbacks. Signed-off-by: Magnus Damm <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Acked-by: Alan Cox <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-05-02serial8250: Use dl_read()/dl_write() on AlchemyMagnus Damm1-41/+26
Convert the 8250 Alchemy support code to make use of the new dl_read()/dl_write() callbacks. Signed-off-by: Magnus Damm <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Acked-by: Alan Cox <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-05-02serial8250: Add dl_read()/dl_write() callbacksMagnus Damm2-53/+78
Convert serial_dl_read() and serial_dl_write() from macro to 8250 specific callbacks. This change makes it easier to support 8250 hardware with non-standard DLL and DLM register configurations such as Alchemy, RM9K and upcoming Emma Mobile UART hardware. Signed-off-by: Magnus Damm <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Acked-by: Alan Cox <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-05-018250.c: less than 2400 baud fix.Christian Melki1-4/+5
We noticed that we were loosing data at speed less than 2400 baud. It turned out our (TI16750 compatible) uart with 64 byte outgoing fifo was truncated to 16 byte (bit 5 sets fifo len) when modifying the fcr reg. The input code still fills the buffer with 64 bytes if I remember correctly and thus data is lost. Our fix was to remove whiping of the fcr content and just add the TRIGGER_1 which we want for latency. I can't see why this would not work on less than 2400 always, for all uarts ... Otherwise one would have to make sure the filling of the fifo re-checks the current state of available fifo size (urrk). Signed-off-by: Christian Melki <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-04-298250_pci: fix pch uart matchingArnaud Patard1-0/+18
The rules used to make 8250_pci "ignore" the PCH uarts are lacking pci subids entries, preventing it to match and thus is breaking serial port support for theses systems. This has been tested on a nanoETXexpress-TT, which has a specifici uart clock. Tested-by: Erwan Velu <[email protected]> [stable@: please apply to 3.0-stable, 3.2-stable and 3.3-stable] Cc: stable <[email protected]> Signed-off-by: Arnaud Patard <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-04-29TTY: n_tty, do not dereference user bufferJiri Slaby1-4/+5
copy_from_read_buf currently copies data to a user buffer and then checks if the data is single EOF. But it checks it by accessing the user buffer. First, the buffer may be changed by other threads of the user program already. Second, it accesses the buffer without any checks. It might be write-only for example. Fix this by inspecting contents of the tty (kernel) buffer instead. Note that "n == 1" is necessary, but not sufficient. But we check later that there is nothing left by "!tty->read_cnt" condition. There is still an issue with the current code that EOF being wrapped to the start of the circular buffer will result in an inappropriate losing of the EOF character. But this is not intended to be fixed by this patch. Signed-off-by: Jiri Slaby <[email protected]> Reported-by: Emil Goode <[email protected]> Cc: Howard Chu <[email protected]> Cc: Alan Cox <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-04-24vt: push the tty_lock down into the map handlingAlan Cox3-53/+96
When we do this it becomes clear the lock we should be holding is the vc lock, and in fact many of our other helpers are properly invoked this way. We don't at this point guarantee not to race the keyboard code but the results of that appear harmless and that was true before we started as well. We now have no users of tty_lock in the console driver... Signed-off-by: Alan Cox <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-04-23Merge 3.4-rc4 into tty-nextGreg Kroah-Hartman41-1605/+1191
This resolves the merge problem with: drivers/tty/serial/pch_uart.c Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-04-21Linux 3.4-rc4Linus Torvalds1-1/+1
2012-04-21sparc32,leon: add notify_cpu_starting()Yong Zhang1-0/+3
Otherwise cpu_active_mask will not set, which lead to other issue. Signed-off-by: Yong Zhang <[email protected]> Signed-off-by: Konrad Eisele <[email protected]> Reviewed-by: Srivatsa S. Bhat <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-04-21Merge tag 'fixes-for-linus' of ↵Linus Torvalds28-161/+80
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull "ARM: SoC fixes" from Olof Johansson: * at91, ux500, imx, omap and bcmring: - at91 fixes for =m driver build issues, irqdomain fixes and config dependency fixes - ux500 kconfig dependency fixes and a smp wakeup bugfix - imx idle bugfix and build fix due to irq domain changes - omap uart pinmux fixes, softreset regression revert and misc fixes - bcmring build error regression fix * ux500 and imx had some small defconfig updates in this branch * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (27 commits) ARM: bcmring: fix UART declarations ARM: imx: Fix imx5 idle logic bug ARM: imx27-dt: Fix build due to removal of irq_domain_add_simple() ARM: imx_v4_v5_defconfig: Add support for CONFIG_REGULATOR_FIXED_VOLTAGE ARM: OMAP1: DMTIMER: fix broken timer clock source selection ARM: OMAP: serial: Fix the ocp smart idlemode handling bug ARM: OMAP2+: UART: Fix incorrect population of default uart pads ARM: OMAP: sram: fix BUG in dpll code for !PM case dmaengine: Kconfig: fix Atmel at_hdmac entry USB: gadget/at91_udc: add gpio_to_irq() function to vbus interrupt USB: ohci-at91: change annotations for probe/remove functions leds-atmel-pwm.c: Make pwmled_probe() __devinit ARM: at91: fix at91sam9261ek Ethernet dm9000 irq ARM: at91: fix rm9200ek flash size ARM: at91: remove empty at91_init_serial function ARM: at91: fix typo in at91_pmc_base assembly declaration ARM: at91: Export at91_matrix_base ARM: at91: Export at91_pmc_base ARM: at91: Export at91_ramc_base ARM: at91: Export at91_st_base ...
2012-04-21Merge tag 'mmc-fixes-for-3.4-rc4' of ↵Linus Torvalds10-81/+86
git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc Pull MMC fixes from Chris Ball: - Build fix for omap_hsmmc with OF against 3.4-rc1. - Fix CONFIG_MMC_UNSAFE_RESUME semantics regression against 3.3, which broke hotplug card detection when UNSAFE_RESUME is set. - Fix a race condition in omap_hsmmc with runtime PM. - Fix two libertas SDIO-powered-resume regressions. - Small fixes for discard/sanitize, dw_mmc, cd-gpio and esdhc-imx. * tag 'mmc-fixes-for-3.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc: mmc: core: Do not pre-claim host in suspend mmc: dw_mmc: prevent NULL dereference for dma_ops mmc: unbreak sdhci-esdhc-imx on i.MX25 mmc: cd-gpio: Include header to pickup exported symbol prototypes mmc: sdhci: refine non-removable card checking for card detection mmc: dw_mmc: Fix switch from DMA to PIO mmc: remove MMC bus legacy suspend/resume method mmc: omap_hsmmc: Get rid of of_have_populated_dt() usage mmc: omap_hsmmc: build fix for CONFIG_OF=y and CONFIG_MMC_OMAP_HS=m mmc: fixes for eMMC v4.5 sanitize operation mmc: fixes for eMMC v4.5 discard operation
2012-04-21Merge branch 'v4l_for_linus' of ↵Linus Torvalds9-12/+71
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: - Fixes a regression at DVB core when switching from DVB-S2 to DVB-S on Kaffeine (Fedora 16 Bugzilla #812895); - Fixes a mutex unlock at an error condition at drx-k; - Fix winbond-cir set mode; - mt9m032: Fix a compilation breakage with some random Kconfig; - mt9m032: fix two dead locks; - xc5000: don't require an special firmware (that won't be provided by the vendor) just because the xtal frequency is different; - V4L DocBook: fix some typos at multi-plane formats description. * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: [media] xc5000: support 32MHz & 31.875MHz xtal using the 41.024.5 firmware [media] V4L: mt9m032: fix compilation breakage [media] V4L: DocBook: Fix typos in the multi-plane formats description [media] V4L: mt9m032: fix two dead-locks [media] rc-core: set mode for winbond-cir [media] drxk: Does not unlock mutex if sanity check failed in scu_command() [media] dvb_frontend: Fix a regression when switching back to DVB-S
2012-04-21Merge tag 'mfd-for-linus-3.4' of ↵Linus Torvalds20-238/+276
git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6 Pull MFD fixes from Samuel Ortiz: "We have 3 build fixes, a OMAP USB host PHY reset fix and the twl6040 conversion to an i2c driver. The latter may not sound like a fix but the twl6040 MFD driver won't probe without it, triggering an OMAP4 audio regression." * tag 'mfd-for-linus-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: mfd: Fix modular builds of rc5t583 regulator support mfd: Fix asic3_gpio_to_irq ARM: OMAP3: USB: Fix the EHCI ULPI PHY reset issue mfd: Convert twl6040 to i2c driver, and separate it from twl core mfd : Fix dbx500 compilation error
2012-04-21kill mm argument of vm_munmap()Al Viro8-11/+12
it's always current->mm Signed-off-by: Al Viro <[email protected]>
2012-04-21perfmon: kill some helpers and argumentsAl Viro1-9/+4
pfm_vm_munmap() is simply vm_munmap() and pfm_remove_smpl_mapping() always get current as the first argument. Signed-off-by: Al Viro <[email protected]>
2012-04-21aio: don't bother with unmapping when aio_free_ring() is coming from exit_aio()Al Viro1-1/+14
... since exit_mmap() is coming and it will munmap() everything anyway. In all other cases aio_free_ring() has ctx->mm == current->mm; moreover, all other callers of vm_munmap() have mm == current->mm, so this will allow us to get rid of mm argument of vm_munmap(). Signed-off-by: Al Viro <[email protected]>
2012-04-20mmc: core: Do not pre-claim host in suspendUlf Hansson1-35/+20
Since SDIO drivers may want to do some SDIO operations in their suspend callback functions, we must not keep the host claimed when calling them. Daniel Drake reported that libertas_sdio encountered a deadlock in its suspend function. Signed-off-by: Ulf Hansson <[email protected]> Tested-by: Daniel Drake <[email protected]> [stable@: please apply to 3.2-stable and 3.3-stable] Cc: stable <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-04-20mmc: dw_mmc: prevent NULL dereference for dma_opsJaehoon Chung1-1/+2
Now, dma_ops is assumed that use the IDMAC. But if dma_ops is assigned the pdata->dma_ops, we didn't ensure that callback function is defined. If the callback isn't defined, then we should run in PIO mode. Signed-off-by: Jaehoon Chung <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Acked-by: Will Newton <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-04-20mmc: unbreak sdhci-esdhc-imx on i.MX25Eric Bénard1-2/+1
This was broken by me in 37865fe91582582a6f6c00652f6a2b1ff71f8a78 ("mmc: sdhci-esdhc-imx: fix timeout on i.MX's sdhci") where more extensive tests would have shown that read or write of data to the card were failing (even if the partition table was correctly read). Signed-off-by: Eric Bénard <[email protected]> Acked-by: Wolfram Sang <[email protected]> Cc: stable <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-04-20mmc: cd-gpio: Include header to pickup exported symbol prototypesH Hartley Sweeten1-0/+1
Include the linux/mmc/cd-gpio.h header to pickup the prototypes for the two exported symbols. This quiets the sparse warnings: warning: symbol 'mmc_cd_gpio_request' was not declared. Should it be static? warning: symbol 'mmc_cd_gpio_free' was not declared. Should it be static? Signed-off-by: H Hartley Sweeten <[email protected]> Acked-by: Guennadi Liakhovetski <[email protected]> Acked-by: Venkatraman S <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-04-20mmc: sdhci: refine non-removable card checking for card detectionDaniel Drake1-1/+1
Commit c79396c191bc19 ("mmc: sdhci: prevent card detection activity for non-removable cards") disables card detection where the cards are marked as non-removable. This makes sense, but the implementation detail of calling mmc_card_is_removable() causes some problems, because mmc_card_is_removable() is overloaded with CONFIG_MMC_UNSAFE_RESUME semantics. In the OLPC XO case, we need CONFIG_MMC_UNSAFE_RESUME because our root filesystem is stored on SD, but we also have external SD card slots where we want automatic card detection. Refine the check to only apply to hosts marked as MMC_CAP_NONREMOVABLE, which is defined to mean that the card is *really* nonremovable. This could be revisited in future if we find a way to improve CONFIG_MMC_UNSAFE_RESUME semantics. Signed-off-by: Daniel Drake <[email protected]> Acked-by: Chuanxiao Dong <[email protected]> [stable@: please apply to 3.3-stable] Cc: stable <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-04-20mmc: dw_mmc: Fix switch from DMA to PIOSeungwon Jeon1-1/+3
When dw_mci_pre_dma_transfer returns failure in some reasons, dw_mci_submit_data will prepare to switch the PIO mode from DMA. After switching to PIO mode, DMA(IDMAC in particular) is still enabled. This makes the corruption in handling interrupt and the driver lock-up. Signed-off-by: Seungwon Jeon <[email protected]> Acked-by: Will Newton <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-04-20mmc: remove MMC bus legacy suspend/resume methodChuanxiao Dong3-18/+10
MMC bus is using legacy suspend/resume method, which is not compatible if runtime pm callbacks are used. In this scenario, MMC bus suspend/resume callbacks cannot be called when system entering S3. So change to use the new defined dev_pm_ops for system sleeping mode. Tested on AM335x Platform. Solves major issue/crash reported at http://www.mail-archive.com/[email protected]/msg65425.html Signed-off-by: Chuanxiao Dong <[email protected]> Tested-by: Hebbar, Gururaja <[email protected]> Acked-by: Linus Walleij <[email protected]> Acked-by: Ulf Hansson <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-04-20VM: add "vm_mmap()" helper functionLinus Torvalds15-97/+87
This continues the theme started with vm_brk() and vm_munmap(): vm_mmap() does the same thing as do_mmap(), but additionally does the required VM locking. This uninlines (and rewrites it to be clearer) do_mmap(), which sadly duplicates it in mm/mmap.c and mm/nommu.c. But that way we don't have to export our internal do_mmap_pgoff() function. Some day we hopefully don't have to export do_mmap() either, if all modular users can become the simpler vm_mmap() instead. We're actually very close to that already, with the notable exception of the (broken) use in i810, and a couple of stragglers in binfmt_elf. Signed-off-by: Linus Torvalds <[email protected]>
2012-04-20VM: add "vm_munmap()" helper functionLinus Torvalds8-33/+25
Like the vm_brk() function, this is the same as "do_munmap()", except it does the VM locking for the caller. Signed-off-by: Linus Torvalds <[email protected]>
2012-04-20mmc: omap_hsmmc: Get rid of of_have_populated_dt() usageRajendra Nayak1-2/+2
of_have_populated_dt() is not expected to be used in drivers but instead only in early platform init code. Drivers on the other hand should rely on dev->of_node or of_match_device(). Besides usage of of_have_populated_dt() also throws up build error as below which was reported by Balaji TK, when omap_hsmmc is built as a module. ERROR: "allnodes" [drivers/mmc/host/omap_hsmmc.ko] undefined! make[1]: *** [__modpost] Error 1 make: *** [modules] Error 2 So get rid of all of_have_populated_dt() usage in omap_hsmmc driver and instead use dev->of_node to make the same dicisions as earlier. Signed-off-by: Rajendra Nayak <[email protected]> Reported-by: Benoit Cousson <[email protected]> Cc: Sebastian Andrzej Siewior <[email protected]> Acked-by: Rob Herring <[email protected]> Reviewed-by: Balaji T K <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-04-20mmc: omap_hsmmc: build fix for CONFIG_OF=y and CONFIG_MMC_OMAP_HS=mChris Ball1-1/+1
Commit 46856a68dc ("mmc: omap_hsmmc: Convert hsmmc driver to use device tree") introduced in 3.4-rc1 has a missing semi-colon, causing: drivers/mmc/host/omap_hsmmc.c:1745: error: expected ',' or ';' before 'extern' Reported-by: Russell King <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-04-20mmc: fixes for eMMC v4.5 sanitize operationAdrian Hunter2-16/+40
eMMC v4.5 sanitize operation erases all copies of unmapped data. However trim or erase operations must be used first to unmap the required sectors. That was not being done. Fixes apply to linux 3.2 on. Signed-off-by: Adrian Hunter <[email protected]> Cc: <[email protected]> Acked-by: Jaehoon Chung <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-04-20mmc: fixes for eMMC v4.5 discard operationAdrian Hunter2-4/+5
eMMC v4.5 discard operation is significantly different from the existing trim operation because it is not guaranteed to work with the new sanitize operation. Consequently mmc_can_trim() is separated from mmc_can_discard(). Also the new discard operation does not result in the sectors being set to all-zeros, so discard_zeroes_data must not be set. In addition, the new discard has the same timeout as trim, but from v4.5 trim is defined to use the hc timeout. The timeout calculation is adjusted accordingly. Fixes apply to linux 3.2 on. Signed-off-by: Adrian Hunter <[email protected]> Cc: <[email protected]> Acked-by: Jaehoon Chung <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-04-20VM: add "vm_brk()" helper functionLinus Torvalds6-45/+31
It does the same thing as "do_brk()", except it handles the VM locking too. It turns out that all external callers want that anyway, so we can make do_brk() static to just mm/mmap.c while at it. Signed-off-by: Linus Torvalds <[email protected]>
2012-04-20Merge tag 'for-torvalds-20120418' of ↵Linus Torvalds2-5/+24
git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pinctrl fixes from Linus Walleij: - Fixed compilation errors and warnings - Stricter checks on the ops vtable * tag 'for-torvalds-20120418' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: implement pinctrl_check_ops pinctrl: include <linux/bug.h> to prevent compile errors pinctrl: fix compile error if not select PINMUX support
2012-04-20Merge tag 'tty-3.4-rc4' of ↵Linus Torvalds3-8/+14
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull 3 tiny tty bugfixes from Greg Kroah-Hartman. * tag 'tty-3.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: drivers/tty/amiserial.c: add missing tty_unlock pch_uart: Fix dma channel unallocated issue ARM: clps711x: serial driver hungs are a result of call disable_irq within ISR