summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2009-12-16pnpbios: convert to seq_fileAlexey Dobriyan
Convert code away from ->read_proc/->write_proc interfaces. Switch to proc_create()/proc_create_data() which make addition of proc entries reliable wrt NULL ->proc_fops, NULL ->data and so on. Problem with ->read_proc et al is described here commit 786d7e1612f0b0adb6046f19b906609e4fe8b1ba "Fix rmmod/read/write races in /proc entries" Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Adam Belay <abelay@mit.edu> Cc: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16intelfb: fix setting of active pipe with LVDS displaysKrzysztof Helt
The intelfb driver sets color map depending on currently active pipe. However, if an LVDS display is attached (like in laptop) the active pipe variable is never set. The default value is PIPE_A and can be wrong. Set up the pipe variable during driver initialization after hardware state was read. Also, the detection of the active display (and hence the pipe) is wrong. The pipes are assigned to so called planes. Both pipes are always enabled on my laptop but only one plane is enabled (the plane A for the CRT or the plane B for the LVDS). Change active pipe detection code to take into account a status of the plane assigned to each pipe. The problem is visible in the 8 bpp mode if colors above 15 are used. The first 16 color entries are displayed correctly. The graphics chip description is here (G45 vol. 3): http://intellinuxgraphics.org/documentation.html Addresses http://bugzilla.kernel.org/show_bug.cgi?id=13285 Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Cc: Michal Suchanek <hramrach@centrum.cz> Cc: Dean Menezes <samanddeanus@yahoo.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16viafb: cosmetic cleanup of function integrated_lvds_enable()Harald Welte
A humble attempt to simplify the coding style to improve readability Signed-off-by: Harald Welte <HaraldWelte@viatech.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Joseph Chan <JosephChan@via.com.tw> Cc: Scott Fang <ScottFang@viatech.com.cn> Cc: Krzysztof Helt <krzysztof.h1@poczta.fm> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16matroxfb: fix problems with display stabilityAlan Cox
Regression caused in 2.6.23 and then despite repeated requests never fixed or dealt with (Petr promised to sort it in 2008 but seems to have forgotten). Enough is enough - remove the problem line that was added. If it upsets someone they've had two years to deal with it and at the very least it'll rattle their cage and wake them up. Addresses http://bugzilla.kernel.org/show_bug.cgi?id=9709 Signed-off-by: Alan Cox <alan@linux.intel.com> Reported-by: Damon <account@bugzilla.kernel.org.juxtaposition.net> Tested-by: Ruud van Melick <rvm1974@raketnet.nl> Cc: Petr Vandrovec <VANDROVE@vc.cvut.cz> Cc: Pekka Enberg <penberg@cs.helsinki.fi> Cc: Paul A. Clarke <pc@us.ibm.com> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16davinci: fb: add framebuffer blank operationChaithrika U S
Implement frame buffer blank operation feature for DA8xx/OMAP-L1xx driver. Signed-off-by: Chaithrika U S <chaithrika@ti.com> Cc: Kevin Hilman <khilman@deeprootsystems.com> Cc: Krzysztof Helt <krzysztof.h1@poczta.fm> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16davinci: fb : add suspend/resume suuport for DA8xx/OMAP-L1xx fb driverChaithrika U S
Suspend/resume support DA8xx/OMAP-L1xx frame buffer driver. This feature has been tested on DA850/OMAP-L138 EVM. For the purpose of testing, the patch series[1] which adds suspend support for DA850/OMAP-L138 SoC was applied. [1] http://patchwork.kernel.org/patch/60260/ Signed-off-by: Chaithrika U S <chaithrika@ti.com> Cc: Kevin Hilman <khilman@deeprootsystems.com> Cc: Krzysztof Helt <krzysztof.h1@poczta.fm> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16davinci: fb: update the driver in preparation for addition of power ↵Chaithrika U S
management features Add a helper function to enable raster. Also add one member in the private data structure to track the current blank status, another function pointer which takes in the platform specific callback function to control panel power. These updates will help in adding suspend/resume and frame buffer blank operation features. Signed-off-by: Chaithrika U S <chaithrika@ti.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16clps711xfb: convert to proc_fopsAlexey Dobriyan
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16drivers/video/via/viafbdev.c: fix oops with no /procDan Carpenter
Fixed a typo: missing *. This would lead to a kernel oops if the kernel was compiled without support for the /proc file system. Found with a static checker. Compile tested. Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Joseph Chan <JosephChan@via.com.tw> Cc: Scott Fang <ScottFang@viatech.com.cn> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16sm501: implement acceleration featuresVincent Sanders
This patch provides the acceleration entry points for the SM501 framebuffer driver. This patch provides the sync, copyarea and fillrect entry points, using the SM501's 2D acceleration engine to perform the operations in-chip rather than across the bus. Signed-off-by: Ben Dooks <ben@simtec.co.uk> Signed-off-by: Simtec Linux Team <linux@simtec.co.uk> Signed-off-by: Vincent Sanders <vince@simtec.co.uk> Cc: Krzysztof Helt <krzysztof.h1@poczta.fm> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16sm501: fix use of old <asm/io.h> instead of <linux/io.h>Ben Dooks
Fix the old style use of <asm/io.h> by replacing it with <linux/io.h>. Signed-off-by: Ben Dooks <ben@simtec.co.uk> Signed-off-by: Simtec Linux Team <linux@simtec.co.uk> Cc: Vincent Sanders <vince@simtec.co.uk> Cc: Krzysztof Helt <krzysztof.h1@poczta.fm> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16sm501: fix missing uses of resource_size()Ben Dooks
There are several places in the SM501 fb driver that could do with using resource_size() to calculate the size of a resource. Also fix a bug where request_mem_region() is being passed one too few bytes when requesting the register memory region, which was causing the following in /proc/iomem: 13e80000-13e8ffff : sm501-fb.0 13e80000-13e8fffe : sm501-fb fixed, this reads: 13e80000-13e8ffff : sm501-fb.0 13e80000-13e8ffff : sm501-fb Signed-off-by: Ben Dooks <ben@simtec.co.uk> Signed-off-by: Simtec Linux Team <linux@simtec.co.uk> Cc: Vincent Sanders <vince@simtec.co.uk> Cc: Krzysztof Helt <krzysztof.h1@poczta.fm> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16i810fb: fix stack explodingKrzysztof Helt
Alan Cox has found that the i810fb function "uses a whopping 2.5K of stack". Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Reported-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16lxfb: add copyright/license infoAndres Salomon
The GRUB folks requested copyright/license info for lxfb.h, so here it is. Signed-off-by: Andres Salomon <dilinger@collabora.co.uk> Cc: Jordan Crouse <jordan@cosmicpenguin.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16davinci: fb: add cpufreq supportChaithrika U S
Add cpufreq support for DA8xx/OMAP-L1xx frame buffer driver Signed-off-by: Chaithrika U S <chaithrika@ti.com> Cc: Krzysztof Helt <krzysztof.h1@poczta.fm> Cc: Kevin Hilman <khilman@deeprootsystems.com> Cc: Dave Jones <davej@codemonkey.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16davinci: fb: calculate the clock divider from pixel clock infoChaithrika U S
The clock divider value can be calculated from the pixel clock value for the panel. This gives more flexiblity to the driver to change the divider value on the fly as in the case of cpufreq feature- support for which will be added shortly. Signed-off-by: Chaithrika U S <chaithrika@ti.com> Cc: Sudhakar Rajashekhara <sudhakar.raj@ti.com> Cc: Steve Chen <schen@mvista.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16mb862xxfb: add acceleration support for Coral-P/Coral-PA. * imageblt * ↵Valentin Sitdikov
copyarea * fillrect [akpm@linux-foundation.org: clean up comments, remove do-nothing tests, use min()] [akpm@linux-foundation.org: fix Alexandr's email address] [akpm@linux-foundation.org: export mb862xxfb_init_accel] Signed-off-by: Valentin Sitdikov <valentin.sitdikov@siemens.com> Cc: Krzysztof Helt <krzysztof.h1@poczta.fm> Cc: Anatolij Gustschin <agust@denx.de> Signed-off-by: Alexander Shishkin <virtuoso@slind.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16drivers/video: Move dereference after NULL testJulia Lawall
If the NULL test on fbi is needed, then the dereference should be after the NULL test. A simplified version of the semantic match that detects this problem is as follows (http://coccinelle.lip6.fr/): // <smpl> @match exists@ expression x, E; identifier fld; @@ * x->fld ... when != \(x = E\|&x\) * x == NULL // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Cc: Krzysztof Helt <krzysztof.h1@poczta.fm> Cc: Eric Miao <eric.y.miao@gmail.com> Cc: Daniel Mack <daniel@caiaq.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16fbdev: add palette register check to several driversKrzysztof Helt
Add check if palette register number is in correct range for few drivers which miss it. The regno value comes indirectly from user space. Two drivers has converted check from BUG_ON() macro to just return an error (non-zero value). Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16fbdev: drop custom atoi from drivers/video/modedb.cAndy Shevchenko
Kernel has simple_strtol() implementation which could be used as atoi(). Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com> Cc: Krzysztof Helt <krzysztof.h1@poczta.fm> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16fbdev: TV_PALN bit set twice in sisfb_detect_VB_connect()Roel Kluin
The TV_PALN bit was tested twice, replace one by TV_PALM. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Cc: Thomas Winischhofer <thomas@winischhofer.net> Cc: Krzysztof Helt <krzysztof.h1@poczta.fm> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16fbdev: bfin-t350mcqb-fb: fix LCD dimensionsMichael Hennerich
The height/width framebuffer members need to be set in millimeters so that software can do proper scaling. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16fbdev: bfin-t350mcqb-fb: handle all resources in suspend/resumeMichael Hennerich
The LCD commands DMA/timers as well as PPI which we need to save/restore. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16fbdev: bfin-lq035q1-fb: new Blackfin Landscape LCD EZ-Extender driverMichael Hennerich
Framebuffer driver for the Landscape LCD EZ-Extender (ADZS-BFLLCD-EZEXT) http://docs.blackfin.uclinux.org/doku.php?id=hw:cards:landscape_lcd_ez-extender Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16gpiolib: add support for changing value polarity in sysfsJani Nikula
Drivers may use gpiolib sysfs as part of their public user space interface. The GPIO number and polarity might change from board to board. The gpio_export_link() call can be used to hide the GPIO number from user space. Add support for also hiding the GPIO line polarity changes from user space. Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16gpio: add GPIO driver for the Timberdale FPGARichard Röjfors
A GPIO driver for the Timberdale FPGA found on the Intel Atom board Russellville. The GPIO driver also has an IRQ-chip to support interrupts on the pins. Signed-off-by: Richard Röjfors <richard.rojfors@mocean-labs.com> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16gpio: fix test on unsigned in lnw_irq_type()Roel Kluin
The wrong test was used, gpio is unsigned and it had an off-by-one. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Cc: Alek Du <alek.du@intel.com> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16ARM: NUC900: add RTC driver support for nuc910 and nuc920Wan ZongShun
Signed-off-by: Wan ZongShun <mcuos.com@gmail.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Hu Ruihuan <specter118@gmail.com> Cc: Russell King <rmk@arm.linux.org.uk> Cc: "jack wang" <jack_wang@usish.com> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16rtc-x1205: unconditionally set date when setting clockJohannes Weiner
All callsites of x1205_set_datetime() want the date to be set as well, so remove the flag parameter and set it unconditionally. Signed-off-by: Johannes Weiner <jw@emlix.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Paul Gortmaker <p_gortmaker@yahoo.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16rtc-vr41xx: use resource_size()Yoichi Yuasa
Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16rtc: ds1307 make it possible to share an irqDmitry Eremin-Solenikov
It's possible to have RTC irq shared with other device (e.g. mpc8349e-mitx board shares ds1339 irq with phy one). Handle this in driver. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16rtc: remove __raw_* accessors from PL031 RTCLinus Walleij
This switches __raw_[read|write]l() for plain [read|write]l in the PL031 RTC driver. The sister driver for PL030 use the simple accessors as most PrimeCell drivers. Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16rtc: add driver for BQ32000 I2C RTCPiotr Ziecik
This patch adds basic support for Texas Instruments BQ32000 I2C RTC. Only time reading/writing is implemented. Advanced features, such as trickle charger and crystal calibration are not supported. Signed-off-by: Piotr Ziecik <kosmo@semihalf.com> Signed-off-by: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16rtc: make rtc-omap driver ioremap its register spaceMark A. Greer
The rtc-omap driver currently assumes that the rtc's registers are at a fixed address and already mapped into virtual memory space. Remove those assumptions so the same driver can be used for similar devices that reside at different physical addresses (e.g., TI's DA8xx/OMAP-L13x SoC's). Also allow the possibility for the timer and alarm interrupts to use the same IRQ. Signed-off-by: Mark A. Greer <mgreer@mvista.com> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Kevin Hilman <khilman@deeprootsystems.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16rtc: add Freescale MC13783 RTC driverUwe Kleine-König
This driver provides support for the RTC part integrated into the Freescale MC13783 PMIC and bases on patch created earlier by Sascha Hauer. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Valentin Longchamp <valentin.longchamp@epfl.ch> Cc: Paul Gortmaker <p_gortmaker@yahoo.com> Signed-off-by: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16rtc: convert WM8350 RTC driver to dev_pm_opsMark Brown
Convert WM8350 RTC driver to dev_pm_ops Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16rtc-mv: add support for AlarmSaeed Bishara
This patch adds the Alarm support, this mode enabled when adding IORESOURCE_IRQ to the platform device resources. The patch also enables the wakeup mode, so the wakealarm sysfs file (under /sys/class/rtc/rtcX/) can be used to configure the alarm clock. Signed-off-by: Saeed Bishara <saeed@marvell.com> Signed-off-by: Nicolas Pitre <nico@marvell.com> Signed-off-by: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16rtc: pcf50633: manage RTC alarm "pending" flagWerner Almesberger
Add setting and clearing of the "pending" flag of the RTC alarm. The semantics follow the UEFI specification 2.2 available at http://www.uefi.org/specs/, i.e., the "pending" flag is cleared by disabling the alarm, but not by any other condition (such as the passing of time, a successful wakeup, or setting of a new alarm.) Signed-off-by: Werner Almesberger <werner@openmoko.org> Signed-off-by: Paul Fertser <fercerpav@gmail.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Paul Gortmaker <p_gortmaker@yahoo.com> Cc: Balaji Rao <balajirrao@openmoko.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16efirtc: explicitly set llseek to no_llseekJohn Kacur
Now that we've removed the BKL here, let's explicitly set llseek to no_llseek since the default llseek is not used here. The default_llseek function still contains the BKL. When we are auditing code to see if we can remove the BKL, this is one of the hidden considerations we need to take into account. i.e., is there syncronization between code that has the BKL and llseek. At the same time we remove the BKL it would be a good idea to do indicate when no llseek function is required, so we don't have to revisit this code again, when we are trying to determine if we can remove the BKL from the default_llseek. Signed-off-by: John Kacur <jkacur@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16rtc: do not use container_of macro as an argument for to_platform_deviceAtsushi Nemoto
The to_platform_device macro itself uses container_of macro. Nested use of container_of macro causes following sparse warnings: rtc-ds1553.c:259:3: warning: symbol '__mptr' shadows an earlier one rtc-ds1553.c:259:3: originally declared here Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Cc: Alessandro Zummo <alessandro.zummo@towertech.it> Cc: David Brownell <david-b@pacbell.net> Cc: Andrew Sharp <andy.sharp@lsi.com> Cc: Thomas Hommel <thomas.hommel@gefanuc.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16rtc-stk17ta8: fix races around device registrationAtsushi Nemoto
- Call dev_set_drvdata before rtc device creation. - Use its own spinlock instead of rtc->irq_lock. Because pdata->rtc must be initialized to use the irq_lock (pdata->rtc->irq_lock). There is a small window which rtc methods can be called before pdata->rtc is initialized. And there is no need use the irq_lock to protect hardware registers. The driver's own spinlock shoule be enough. - Check pdata->rtc before calling rtc_update_irq. - Use alarm_irq_enable and remove ioctl routine. - Use devres APIs and simplify error/remove path. These fixes are ported from ds1553 driver and just compile-tested only. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Cc: Alessandro Zummo <alessandro.zummo@towertech.it> Cc: Thomas Hommel <thomas.hommel@gefanuc.com> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16rtc-ds1742: fix races around device registrationAtsushi Nemoto
* Call dev_set_drvdata before rtc device creation * Use devres APIs and simplify error/remove path Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Acked-by: Alessandro Zummo <a.zummo@towertech.it> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16rtc-ds1553: fix races around device registrationAtsushi Nemoto
* Call dev_set_drvdata before rtc device creation * Use its own spinlock instead of rtc->irq_lock * Check pdata->rtc before calling rtc_update_irq * Use {alarm,update}_irq_enable and remove ioctl routine * Use devres APIs and simplify error/remove path Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Acked-by: Alessandro Zummo <a.zummo@towertech.it> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16rtc-tx4939: fix races around device registrationAtsushi Nemoto
* Use its own spinlock instead of rtc->irq_lock * Check pdata->rtc before calling rtc_update_irq * Disable interrupt after rtc_device_unregister Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Acked-by: Alessandro Zummo <a.zummo@towertech.it> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16rtc-ds1511: fix races around device registrationAtsushi Nemoto
- Call dev_set_drvdata before rtc device creation. - Use its own spinlock instead of rtc->irq_lock. Because pdata->rtc must be initialized to use the irq_lock (pdata->rtc->irq_lock). There is a small window which rtc methods can be called before pdata->rtc is initialized. And there is no need use the irq_lock to protect hardware registers. The driver's own spinlock shoule be enough. - Check pdata->rtc before calling rtc_update_irq. - Use {alarm,update}_irq_enable and remove ioctl routine. - Use devres APIs and simplify error/remove path. These fixes are ported from ds1553 driver and just compile-tested only. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Cc: Andrew Sharp <andy.sharp@lsi.com> Cc: Thomas Hommel <thomas.hommel@gefanuc.com> Cc: David Brownell <david-b@pacbell.net> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16rtc-cmos: convert RTC_AIE/RTC_UIE to rtc irq APIHerton Ronaldo Krzesinski
Drop ioctl function that handles RTC_AIE/RTC_UIE, and use instead the rtc subsystem API (alarm_irq_enable/update_irq_enable callbacks). Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16rtc: fix driver data issues in several rtc driversAlessandro Zummo
Herton Ronaldo Krzesinski recently raised up, and fixed, an issue with the rtc_cmos driver, which was referring to an inconsistent driver data. This patch ensures that driver data registration happens before rtc_device_register(). Signed-off-by: Alessandro Zummo <a.zummo@towertech.it> Acked-by: Thomas Hommel <thomas.hommel@gefanuc.com> Acked-by: Hans-Christian Egtvedt <hcegtvedt@atmel.com> Acked-by: Paul Mundt <lethal@linux-sh.org> Cc: David S. Miller <davem@davemloft.net> Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Cc: Andrew Sharp <andy.sharp@onstor.com> Cc: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Cc: Alexander Bigga <ab@mycable.de> Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Cc: Mark Zhan <rongkai.zhan@windriver.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16rtc: disable hpet emulation on suspendMaxim Levitsky
I noticed that rtc wont generate interrupts after a resume from disk. Here hpet rtc emulation is used. Problem is that rtc hpet comparator, isn't reinitialized after resume. Easiest way to solve this, is always mask all hpet interrupts on suspend This is triggered, when suspending with alarm set. Otherwise, hpet driver will think it doesn't need to reinitialize the rtc comparator, thus rtc interrupts won't work. This emulation isn't need for wakealarm. Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com> Cc: David Brownell <david-b@pacbell.net> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16vt: make the default cursor shape configurableClemens Ladisch
For embedded systems, the blinking cursor at startup time can be annoying and unintended. Add a new kernel parameter to change the default cursor shape. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Cc: Daniel Mack <daniel@caiaq.de> Acked-by: Pavel Machek <pavel@ucw.cz> Cc: David Newall <davidn@davidnewall.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Greg Kroah-Hartman <gregkh@suse.de> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16oom-kill: fix NUMA constraint check with nodemaskKAMEZAWA Hiroyuki
Fix node-oriented allocation handling in oom-kill.c I myself think of this as a bugfix not as an ehnancement. In these days, things are changed as - alloc_pages() eats nodemask as its arguments, __alloc_pages_nodemask(). - mempolicy don't maintain its own private zonelists. (And cpuset doesn't use nodemask for __alloc_pages_nodemask()) So, current oom-killer's check function is wrong. This patch does - check nodemask, if nodemask && nodemask doesn't cover all node_states[N_HIGH_MEMORY], this is CONSTRAINT_MEMORY_POLICY. - Scan all zonelist under nodemask, if it hits cpuset's wall this faiulre is from cpuset. And - modifies the caller of out_of_memory not to call oom if __GFP_THISNODE. This doesn't change "current" behavior. If callers use __GFP_THISNODE it should handle "page allocation failure" by itself. - handle __GFP_NOFAIL+__GFP_THISNODE path. This is something like a FIXME but this gfpmask is not used now. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hioryu@jp.fujitsu.com> Acked-by: David Rientjes <rientjes@google.com> Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: Christoph Lameter <cl@linux-foundation.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>