Dmitry Eremin-Solenikov [Wed, 16 Dec 2009 00:46:14 +0000 (16:46 -0800)]
rtc: ds1307 make it possible to share an irq
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>
Linus Walleij [Wed, 16 Dec 2009 00:46:13 +0000 (16:46 -0800)]
rtc: remove __raw_* accessors from PL031 RTC
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>
Piotr Ziecik [Wed, 16 Dec 2009 00:46:12 +0000 (16:46 -0800)]
rtc: add driver for BQ32000 I2C RTC
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>
Mark A. Greer [Wed, 16 Dec 2009 00:46:11 +0000 (16:46 -0800)]
rtc: make rtc-omap driver ioremap its register space
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>
Uwe Kleine-König [Wed, 16 Dec 2009 00:46:09 +0000 (16:46 -0800)]
rtc: add Freescale MC13783 RTC driver
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>
Mark Brown [Wed, 16 Dec 2009 00:46:09 +0000 (16:46 -0800)]
rtc: convert WM8350 RTC driver to dev_pm_ops
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>
Saeed Bishara [Wed, 16 Dec 2009 00:46:08 +0000 (16:46 -0800)]
rtc-mv: add support for Alarm
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>
Werner Almesberger [Wed, 16 Dec 2009 00:46:07 +0000 (16:46 -0800)]
rtc: pcf50633: manage RTC alarm "pending" flag
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>
John Kacur [Wed, 16 Dec 2009 00:46:06 +0000 (16:46 -0800)]
efirtc: explicitly set llseek to no_llseek
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>
Atsushi Nemoto [Wed, 16 Dec 2009 00:46:04 +0000 (16:46 -0800)]
rtc: do not use container_of macro as an argument for to_platform_device
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>
Atsushi Nemoto [Wed, 16 Dec 2009 00:46:04 +0000 (16:46 -0800)]
rtc-stk17ta8: fix races around device registration
- 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>
Atsushi Nemoto [Wed, 16 Dec 2009 00:46:02 +0000 (16:46 -0800)]
rtc-ds1742: fix races around device registration
* 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>
Atsushi Nemoto [Wed, 16 Dec 2009 00:46:01 +0000 (16:46 -0800)]
rtc-ds1553: fix races around device registration
* 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>
Atsushi Nemoto [Wed, 16 Dec 2009 00:46:00 +0000 (16:46 -0800)]
rtc-tx4939: fix races around device registration
* 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>
Atsushi Nemoto [Wed, 16 Dec 2009 00:45:58 +0000 (16:45 -0800)]
rtc-ds1511: fix races around device registration
- 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>
Herton Ronaldo Krzesinski [Wed, 16 Dec 2009 00:45:56 +0000 (16:45 -0800)]
rtc-cmos: convert RTC_AIE/RTC_UIE to rtc irq API
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>
Alessandro Zummo [Wed, 16 Dec 2009 00:45:53 +0000 (16:45 -0800)]
rtc: fix driver data issues in several rtc drivers
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>
Maxim Levitsky [Wed, 16 Dec 2009 00:45:52 +0000 (16:45 -0800)]
rtc: disable hpet emulation on suspend
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>
Ian Kent [Wed, 16 Dec 2009 00:45:51 +0000 (16:45 -0800)]
autofs4: always use lookup for lookup
We need to be able to cope with the directory mutex being held during
->d_revalidate() in some cases, but not all cases, and not necessarily by
us. Because we need to release the mutex when we call back to the daemon
to do perform a mount we must be sure that it is us who holds the mutex so
we must redirect mount requests to ->lookup() if the mutex is held.
Signed-off-by: Ian Kent <raven@themaw.net>
Cc: Sage Weil <sage@newdream.net>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Andreas Dilger <adilger@sun.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Yehuda Saheh <yehuda@newdream.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Ian Kent [Wed, 16 Dec 2009 00:45:50 +0000 (16:45 -0800)]
autofs4: rename dentry to expiring in autofs4_lookup_expiring()
In autofs4_lookup_expiring() a declaration within the list traversal loop
uses a declaration that has the same name as the function parameter.
Signed-off-by: Ian Kent <raven@themaw.net>
Cc: Sage Weil <sage@newdream.net>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Andreas Dilger <adilger@sun.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Yehuda Saheh <yehuda@newdream.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Ian Kent [Wed, 16 Dec 2009 00:45:49 +0000 (16:45 -0800)]
autofs4: rename dentry to active in autofs4_lookup_active()
In autofs4_lookup_active() a declaration within the list traversal loop
uses a declaration that has the same name as the function parameter.
Signed-off-by: Ian Kent <raven@themaw.net>
Cc: Sage Weil <sage@newdream.net>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Andreas Dilger <adilger@sun.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Yehuda Saheh <yehuda@newdream.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Ian Kent [Wed, 16 Dec 2009 00:45:48 +0000 (16:45 -0800)]
autofs4: eliminate d_unhashed in path walk checks
We unhash the dentry (in a subsequent patch) in ->d_revalidate() in order
to send mount requests to ->lookup(). But then we can not rely on
d_unhased() to give reliable results because it may be called at any time
by any code path. The d_unhashed() function is used by __simple_empty()
in the path walking callbacks but autofs mount point dentrys should have
no directories at all so a list_empty() on d_subdirs should be (and is)
sufficient.
Signed-off-by: Ian Kent <raven@themaw.net>
Cc: Sage Weil <sage@newdream.net>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Andreas Dilger <adilger@sun.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Yehuda Saheh <yehuda@newdream.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Ian Kent [Wed, 16 Dec 2009 00:45:47 +0000 (16:45 -0800)]
autofs4: cleanup active and expire lookup
The lookup functions for active and expiring dentrys use parameters that
can be easily obtained on entry so we change the call to to take just the
dentry. This makes the subsequent change, to send all lookups to
->lookup(), a bit cleaner.
Signed-off-by: Ian Kent <raven@themaw.net>
Cc: Sage Weil <sage@newdream.net>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Andreas Dilger <adilger@sun.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Yehuda Saheh <yehuda@newdream.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Ian Kent [Wed, 16 Dec 2009 00:45:46 +0000 (16:45 -0800)]
autofs4: renamer unhashed to active in autofs4_lookup()
Rename the variable unhashed to active in autofs4_lookup() to better
reflect its usage.
Signed-off-by: Ian Kent <raven@themaw.net>
Cc: Sage Weil <sage@newdream.net>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Andreas Dilger <adilger@sun.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Yehuda Saheh <yehuda@newdream.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Ian Kent [Wed, 16 Dec 2009 00:45:45 +0000 (16:45 -0800)]
autofs4: use autofs_info for pending flag
Eliminate the use of the d_lock spin lock by using the autofs super block
info spin lock. This reduces the number of spin locks we use by one and
makes the code for the following patch (to redirect ->d_revalidate() to
->lookup()) a little simpler.
Signed-off-by: Ian Kent <raven@themaw.net>
Cc: Sage Weil <sage@newdream.net>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Andreas Dilger <adilger@sun.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Yehuda Saheh <yehuda@newdream.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Ian Kent [Wed, 16 Dec 2009 00:45:44 +0000 (16:45 -0800)]
autofs4: use helper function for need mount check
Define simple helper function for checking if we need to trigger a mount.
Signed-off-by: Ian Kent <raven@themaw.net>
Cc: Sage Weil <sage@newdream.net>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Andreas Dilger <adilger@sun.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Yehuda Saheh <yehuda@newdream.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Ian Kent [Wed, 16 Dec 2009 00:45:43 +0000 (16:45 -0800)]
autofs4: use helper functions for expiring list
Define some simple helper functions for adding and deleting entries on the
expiring dentry list.
Signed-off-by: Ian Kent <raven@themaw.net>
Cc: Sage Weil <sage@newdream.net>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Andreas Dilger <adilger@sun.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Yehuda Saheh <yehuda@newdream.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Ian Kent [Wed, 16 Dec 2009 00:45:42 +0000 (16:45 -0800)]
autofs4: use helper functions for active list handling
Define some simple helper functions for adding and deleting entries on the
active (and unhashed) dentry list.
Signed-off-by: Ian Kent <raven@themaw.net>
Cc: Sage Weil <sage@newdream.net>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Andreas Dilger <adilger@sun.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Yehuda Saheh <yehuda@newdream.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Clemens Ladisch [Wed, 16 Dec 2009 00:45:39 +0000 (16:45 -0800)]
vt: make the default cursor shape configurable
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>
Alexey Dobriyan [Wed, 16 Dec 2009 00:45:39 +0000 (16:45 -0800)]
proc: rename de_get() to pde_get() and inline it
* de_get() is trivial -- make inline, save a few bits of code, drop
"refcount is 0" check -- it should be done in some generic refcount
code, don't recall it's was helpful
* rename GET and PUT functions to pde_get(), pde_put() for cool prefix!
* remove obvious and incorrent comments
* in remove_proc_entry() use pde_put(), when I fixed PDE refcounting to
be normal one, remove_proc_entry() was supposed to do "-1" and code now
reflects that.
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>
Barry Song [Wed, 16 Dec 2009 00:45:34 +0000 (16:45 -0800)]
timecompare: fix half-Y2K38 problem in timecompare_update while calculating offset
ktime will overflow from 03:14:07 UTC on Tuesday, 19 January 2038,
ktime_add() in timecompare_update() will overflow a half earlier. As a
result, wrong offset will be gotten, then cause some strange problems.
Signed-off-by: Barry Song <21cnbao@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Patrick Ohly <patrick.ohly@intel.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
KAMEZAWA Hiroyuki [Wed, 16 Dec 2009 00:45:33 +0000 (16:45 -0800)]
oom-kill: fix NUMA constraint check with nodemask
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>
KOSAKI Motohiro [Wed, 16 Dec 2009 00:45:32 +0000 (16:45 -0800)]
oom-kill: show virtual size and rss information of the killed process
In a typical oom analysis scenario, we frequently want to know whether the
killed process has a memory leak or not at the first step. This patch
adds vsz and rss information to the oom log to help this analysis. To
save time for the debugging.
example:
===================================================================
rsyslogd invoked oom-killer: gfp_mask=0x201da, order=0, oom_adj=0
Pid: 1308, comm: rsyslogd Not tainted 2.6.32-rc6 #24
Call Trace:
[<
ffffffff8132e35b>] ?_spin_unlock+0x2b/0x40
[<
ffffffff810f186e>] oom_kill_process+0xbe/0x2b0
(snip)
492283 pages non-shared
Out of memory: kill process 2341 (memhog) score 527276 or a child
Killed process 2341 (memhog) vsz:1054552kB, anon-rss:970588kB, file-rss:4kB
===========================================================================
^
|
here
[rientjes@google.com: fix race, add pid & comm to message]
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Stephen Rothwell [Tue, 15 Dec 2009 05:33:10 +0000 (16:33 +1100)]
mfd: compile fix for twl4030 renaming
Caused by commit
0b83ddebc6e884dc0221358cf68c461520fbdd8e ("MFD:
twl4030: add twl4030_codec MFD as a new child to the core") interacting
with commit
b07682b6056eb6701f8cb86aa5800e6f2ea7919b ("mfd: Rename
twl4030* driver files to enable re-use").
This file seems to have been missed in the renaming.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Tue, 15 Dec 2009 17:12:43 +0000 (09:12 -0800)]
Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
* 'for-linus' of git://oss.sgi.com/xfs/xfs:
xfs: event tracing support
xfs: change the xfs_iext_insert / xfs_iext_remove
xfs: cleanup bmap extent state macros
Linus Torvalds [Tue, 15 Dec 2009 17:12:01 +0000 (09:12 -0800)]
Merge git://git./linux/kernel/git/agk/linux-2.6-dm
* git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm: (80 commits)
dm snapshot: use merge origin if snapshot invalid
dm snapshot: report merge failure in status
dm snapshot: merge consecutive chunks together
dm snapshot: trigger exceptions in remaining snapshots during merge
dm snapshot: delay merging a chunk until writes to it complete
dm snapshot: queue writes to chunks being merged
dm snapshot: add merging
dm snapshot: permit only one merge at once
dm snapshot: support barriers in snapshot merge target
dm snapshot: avoid allocating exceptions in merge
dm snapshot: rework writing to origin
dm snapshot: add merge target
dm exception store: add merge specific methods
dm snapshot: create function for chunk_is_tracked wait
dm snapshot: make bio optional in __origin_write
dm mpath: reject messages when device is suspended
dm: export suspended state to targets
dm: rename dm_suspended to dm_suspended_md
dm: swap target postsuspend call and setting suspended flag
dm crypt: add plain64 iv
...
Linus Torvalds [Tue, 15 Dec 2009 17:11:28 +0000 (09:11 -0800)]
Merge branch 'for-2.6.33' of git://git.kernel.dk/linux-2.6-block
* 'for-2.6.33' of git://git.kernel.dk/linux-2.6-block:
cfq: set workload as expired if it doesn't have any slice left
Fix a CFQ crash in "for-2.6.33" branch of block tree
cfq: Remove wait_request flag when idle time is being deleted
cfq-iosched: commenting non-obvious initialization
cfq-iosched: Take care of corner cases of group losing share due to deletion
cfq-iosched: Get rid of cfqq wait_busy_done flag
cfq: Optimization for close cooperating queue searching
block,xd: Delay allocation of DMA buffers until device is known
drbd: Following the hmac change to SHASH (see linux commit
8bd1209cfff)
cfq-iosched: reduce write depth only if sync was delayed
Linus Torvalds [Tue, 15 Dec 2009 17:11:05 +0000 (09:11 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ALSA: ac97_codec - increase timeout for analog sections to 5 second
ASoC: Correct code taking the size of a pointer
ALSA: hda - Add PCI IDs for Nvidia G2xx-series
ALSA: sound/isa/gus: Correct code taking the size of a pointer
ALSA: hda: Fix max PCM level to 0 dB for AD1981_HP
ALSA: hda: Use ALC260_WILL quirk for another Acer model (0x1025007f)
Linus Torvalds [Tue, 15 Dec 2009 17:02:01 +0000 (09:02 -0800)]
Merge branch 'core-locking-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip
* 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (26 commits)
clockevents: Convert to raw_spinlock
clockevents: Make tick_device_lock static
debugobjects: Convert to raw_spinlocks
perf_event: Convert to raw_spinlock
hrtimers: Convert to raw_spinlocks
genirq: Convert irq_desc.lock to raw_spinlock
smp: Convert smplocks to raw_spinlocks
rtmutes: Convert rtmutex.lock to raw_spinlock
sched: Convert pi_lock to raw_spinlock
sched: Convert cpupri lock to raw_spinlock
sched: Convert rt_runtime_lock to raw_spinlock
sched: Convert rq->lock to raw_spinlock
plist: Make plist debugging raw_spinlock aware
bkl: Fixup core_lock fallout
locking: Cleanup the name space completely
locking: Further name space cleanups
alpha: Fix fallout from locking changes
locking: Implement new raw_spinlock
locking: Convert raw_rwlock functions to arch_rwlock
locking: Convert raw_rwlock to arch_rwlock
...
Linus Torvalds [Tue, 15 Dec 2009 17:01:00 +0000 (09:01 -0800)]
Merge git://git./linux/kernel/git/hskinnemoen/avr32-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6:
avr32: update default configurations for ATNGW100, ATSTK1002 and ATSTK1006
avr32: add default configurations for ATNGW100 mkII and EVKLCD10X
avr32: add support for ATNGW100 mkII board
avr32: convert to asm-generic/hardirq.h
avr32: add two new at91 to cpu.h definition
avr32: clean up linker script using standard macros.
avr32: MRMT: correct setup of SPI slaves
avr32: function for independently setting up SPI slaves
avr32: re-instate MCI WP/CD pin assignments for ATNGW100
Linus Torvalds [Tue, 15 Dec 2009 17:00:19 +0000 (09:00 -0800)]
Merge git://git./linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
sparc64: Fix clock event multiplier printf format.
sparc64: Use clock{source,events}_calc_mult_shift().
sparc64: Use free_bootmem_late() in mdesc_lmb_free().
sparc: Add alignment and emulation fault perf events.
sparc64: Add syscall tracepoint support.
sparc: Stop trying to be so fancy and use __builtin_{memcpy,memset}()
sparc: Use __builtin_object_size() to validate the buffer size for copy_from_user()
sparc64: Add some missing __kprobes annotations to kernel fault paths.
sparc64: Use kprobes_built_in() to avoid ifdefs in fault_64.c
sparc: Validate that kprobe address is 4-byte aligned.
sparc64: Don't specify IRQF_SHARED for LDC interrupts.
sparc64: Fix stack debugging IRQ stack regression.
sparc64: Fix overly strict range type matching for PCI devices.
Linus Torvalds [Tue, 15 Dec 2009 16:59:33 +0000 (08:59 -0800)]
Merge git://git.infradead.org/battery-2.6
* git://git.infradead.org/battery-2.6:
power_supply_sysfs: Handle -ENODATA in a special way
wm831x_backup: Remove unused variables
gta02: Set pcf50633 charger_reference_current_ma
pcf50633: Query charger status directly
pcf50633: Properly reenable charging when the supply conditions change
pcf50633: Get rid of charging restart software auto-triggering
pcf50633: introduces battery charging current control
pcf50633: Add ac power supply class to the charger
wm831x: Factor out WM831x backup battery charger
Linus Torvalds [Tue, 15 Dec 2009 16:58:13 +0000 (08:58 -0800)]
Merge git://git./linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
USB: Close usb_find_interface race v3
Revert "USB: Close usb_find_interface race"
Samu Onkalo [Tue, 15 Dec 2009 02:01:46 +0000 (18:01 -0800)]
lis3: update documentation to match latest changes
[akpm@linux-foundation.org: s/q/g/ (Randy)]
Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com>
Acked-by: Éric Piel <Eric.Piel@tremplin-utc.net>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Samu Onkalo [Tue, 15 Dec 2009 02:01:46 +0000 (18:01 -0800)]
lis3: scale output values to mg
Report output values as 1/1000 of earth gravity.
Output values from lis3 can be read from sysfs position entry and from
input device. Input device can be accessed as event device and as
joystick device. Joystick device can be in two modes. Meaning of the
output values varies from case to case depending on the chip type and
configuration (scale). Only joystick interface in JS_CORR_BROKEN mode
returned somehow similar output values in different configurations.
Joystick device is in that state by default in case of lis3.
Position sysfs entry, input event device and raw joystick device have been
little bit broken since meaning of the output values has been varied
between 12 and 8 bit devices. Applications which relayed on those methods
failed if the chip is different than the expected one.
This patch converts output values to mean similar thing in different
configurations. Both 8 and 12 bit devices reports now same acceleration
values. If somebody implements full scale support to the driver, output
values will still mean the same. Scaling factor and input device range
must be updated in that case.
Joystick interface in JS_CORR_BROKEN mode is not touched by this patch.
All other interfaces have different scale after this change. For 12 bit
device scaling factor is 0.977 which keeps scaled and unscaled values are
quite close to each others. For 8 bit device, scaled values are 18 times
bigger than unscaled values.
Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com>
Acked-by: Éric Piel <Eric.Piel@tremplin-utc.net>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Samu Onkalo [Tue, 15 Dec 2009 02:01:44 +0000 (18:01 -0800)]
lis3: sysfs entry for setting chip measurement rate
It is possible to read position information at the chip measurement rate
via sysfs. This patch adds possibility to configure chip measurement
rate.
Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com>
Signed-off-by: Éric Piel <Eric.Piel@tremplin-utc.net>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Samu Onkalo [Tue, 15 Dec 2009 02:01:43 +0000 (18:01 -0800)]
lis3lv02d: remove calibaration functionality
Chip is calibrated by the manufacturer. There is no need to calibarate it
at driver level. If the chip is used as a joystick, calibaration can be
done using joystick device calibration mechanism.
Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com>
Acked-by: Éric Piel <Eric.Piel@tremplin-utc.net>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Samu Onkalo [Tue, 15 Dec 2009 02:01:43 +0000 (18:01 -0800)]
lis3: selftest support
Implement selftest feature as specified by chip manufacturer. Control:
read selftest sysfs entry
Response: "OK x y z" or "FAIL x y z"
where x, y, and z are difference between selftest mode and normal mode.
Test is passed when values are within acceptance limit values.
Acceptance limits are provided via platform data. See chip spesifications
for acceptance limits. If limits are not properly set, OK / FAIL decision
is meaningless. However, userspace application can still make decision
based on the numeric x, y, z values.
Selftest is meant for HW diagnostic purposes. It is not meant to be
called during normal use of the chip. It may cause false interrupt
events. Selftest mode delays polling of the normal results but it doesn't
cause wrong values. Chip must be in static state during selftest. Any
acceration during the test causes most probably failure.
Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com>
Acked-by: Éric Piel <Eric.Piel@tremplin-utc.net>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Samu Onkalo [Tue, 15 Dec 2009 02:01:41 +0000 (18:01 -0800)]
lis3lv02d: proper power on sequence
Lis3 accelerometer sensors have quite long power on delay (up to 125
ms). This patch adds necessary delay to power on sequence for currently
supported lis3 chips.
Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com>
Tested-by: Éric Piel <eric.piel@tremplin-utc.net>
Acked-by: Éric Piel <eric.piel@tremplin-utc.net>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Éric Piel [Tue, 15 Dec 2009 02:01:40 +0000 (18:01 -0800)]
lis3: fix show rate for 8 bits chips
Originally the driver was only targeted to 12bits sensors. When support
for 8bits sensors was added, some slight difference in the registers were
overlooked. This should fix it, both for initialization, and for
displaying the rate.
Reported-by: Kalhan Trisal <kalhan.trisal@intel.com>
Reported-by: Christoph Plattner <christoph.plattner@gmx.at>
Tested-by: Christoph Plattner <christoph.plattner@gmx.at>
Tested-by: Samu Onkalo <samu.p.onkalo@nokia.com>
Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Éric Piel [Tue, 15 Dec 2009 02:01:39 +0000 (18:01 -0800)]
lis3: update documentation and comments
Most of the documentation and comments were written when the driver was
only supporting one type of chip, only via ACPI/HP. Update the info to
the much clearer understanding that we have now.
Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Samu Onkalo [Tue, 15 Dec 2009 02:01:39 +0000 (18:01 -0800)]
lis3lv02d: correct memory leak in module unload
polled input device itself was not free'd.
Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com>
Tested-by: Éric Piel <eric.piel@tremplin-utc.net>
Acked-by: Éric Piel <eric.piel@tremplin-utc.net>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Samu Onkalo [Tue, 15 Dec 2009 02:01:38 +0000 (18:01 -0800)]
lis3lv02d: send sync event
Send input_sync after each measurement round. This helps userspace to
detect which reported values belongs to the same measurement.
Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com>
Tested-by: Éric Piel <eric.piel@tremplin-utc.net>
Acked-by: Éric Piel <eric.piel@tremplin-utc.net>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Daniel J Blueman [Tue, 15 Dec 2009 02:01:37 +0000 (18:01 -0800)]
hwmon: w83627ehf updates
Add control of fan minimum turn-on output levels, decoupling it from the
fan turn-off output level. Add control of rate of change of fan output
level. These in turn allow lower turn-off rotor speed and smoother
transitions for better thermal and acoustic control authority. Add
support for constant fan speed and proportional-response operations modes.
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Daniel J Blueman <daniel.blueman@gmail.com>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: David Hubbard <david.c.hubbard@gmail.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Samu Onkalo [Tue, 15 Dec 2009 02:01:35 +0000 (18:01 -0800)]
lis3lv02d: axis remap and resource setup/release
Add the possibility to remap axes via platform data. Function pointers
for resource setup and release purposes
Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com>
Acked-by: Éric Piel <eric.piel@tremplin-utc.net>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: "Trisal, Kalhan" <kalhan.trisal@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Joakim Tjernlund [Tue, 15 Dec 2009 02:01:33 +0000 (18:01 -0800)]
crc32: minor optimizations and cleanup
Move common crc body to new function crc32_body() cleaup and micro
optimize crc32_body for speed and less size.
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Magnus Damm [Tue, 15 Dec 2009 02:01:33 +0000 (18:01 -0800)]
mmc: let tmio-mmc use dev_name() with request_irq()
Improve the /proc/interrupts output so the irq number can be mapped to
platform device on boards with multiple tmio_mmc instances.
Signed-off-by: Magnus Damm <damm@opensource.se>
Cc: <linux-mmc@vger.kernel.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cliff Cai [Tue, 15 Dec 2009 02:01:32 +0000 (18:01 -0800)]
mmc: Blackfin SD Host Controller Driver
Add SD host driver for Blackfin BF54x and BF51x.
[akpm@linux-foundation.org: fix layout, c99 warning]
Signed-off-by: Cliff Cai <cliffcai.sh@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Nicolas Ferre [Tue, 15 Dec 2009 02:01:31 +0000 (18:01 -0800)]
mmc: atmel-mci: new MCI2 module support in atmel-mci driver
This new revision of the IP adds some improvements to the MCI already
present in several Atmel SOC.
Some new registers are added and a particular way of handling DMA
interaction lead to a new sequence in function call which is backward
compatible: On MCI2, we must set the DMAEN bit to enable the DMA
handshaking interface. This must happen before the data transfer command
is sent.
A new function is able to differentiate MCI2 code and is based on
knowledge of processor id (cpu_is_xxx()).
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Nicolas Ferre [Tue, 15 Dec 2009 02:01:30 +0000 (18:01 -0800)]
atmel-mci: change use of dma slave interface
Allow the use of another DMA controller driver in atmel-mci sd/mmc driver.
This adds a generic dma_slave pointer to the mci platform structure where
we can store DMA controller information. In atmel-mci we use information
provided by this structure to initialize the driver (with new helper
functions that are architecture dependant).
This also adds at32/avr32 chip modifications to cope with this new access
method.
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Ben Hutchings [Tue, 15 Dec 2009 02:01:29 +0000 (18:01 -0800)]
mmc: add module parameter to set whether cards are assumed removable
Some people run general-purpose distribution kernels on netbooks with
a card that is physically non-removable or logically non-removable
(e.g. used for /home) and cannot be cleanly unmounted during suspend.
Add a module parameter to set whether cards are assumed removable or
non-removable, with the default set by CONFIG_MMC_UNSAFE_RESUME.
In general, it is not possible to tell whether a card present in an MMC
slot after resume is the same that was there before suspend. So there are
two possible behaviours, each of which will cause data loss in some cases:
CONFIG_MMC_UNSAFE_RESUME=n (default): Cards are assumed to be removed
during suspend. Any filesystem on them must be unmounted before suspend;
otherwise, buffered writes will be lost.
CONFIG_MMC_UNSAFE_RESUME=y: Cards are assumed to remain present during
suspend. They must not be swapped during suspend; otherwise, buffered
writes will be flushed to the wrong card.
Currently the choice is made at compile time and this allows that to be
overridden at module load time.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: Wouter van Heyst <larstiq@larstiq.dyndns.org>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Ben Dooks [Tue, 15 Dec 2009 02:01:27 +0000 (18:01 -0800)]
s3cmci: convert missed s3c2410_gpio calls to gpiolib calls
Convert two missed s3c2410 specific gpio calls to gpiolib calls.
Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Simtec Linux Team <linux@simtec.co.uk>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Nicolas Pitre [Tue, 15 Dec 2009 02:01:26 +0000 (18:01 -0800)]
sdhci: add support for the SysKonnect CardBus2SDIO adapter
This is still in use especially to develop SDIO device drivers on laptop
machines which are lacking SDIO slots. This adapter supports SDIO cards
only due to lack of 136-bit response capability.
Signed-off-by: Nicolas Pitre <nico@marvell.com>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Ladislav Michl [Tue, 15 Dec 2009 02:01:24 +0000 (18:01 -0800)]
mmci-omap: remove bogus check for host->iclk
Remove check for host->iclk being NULL from error path since we already
know it is non-null and use return value from clk_get.
Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Acked-by: Tony Lindgren <tony@atomide.com>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Chaithrika U S [Tue, 15 Dec 2009 02:01:23 +0000 (18:01 -0800)]
davinci: mmc: add cpufreq support
Add cpufreq support to MMC driver. The clock divider value has to be
modified according to the controller input frequency.
Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Cc: Linus Walleij <linus.ml.walleij@gmail.com>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Sudhakar Rajashekhara [Tue, 15 Dec 2009 02:01:22 +0000 (18:01 -0800)]
mmc: davinci: modify data types of EDMA related variables
Currently DaVinci EDMA driver supports multiple EDMA channel controller
instances. edma_alloc_channel() api returns a 32 bit value which has the
channel controller number in MSB and the EDMA channel number in LSB. The
variables which store the value returned by edma_alloc_channel() have to
be 32 bit wide now.
Signed-off-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Acked-by: Vipin Bhandari <vipin.bhandari@ti.com>
Cc: Purshotam Kumar <purushotam@ti.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Vipin Bhandari [Tue, 15 Dec 2009 02:01:21 +0000 (18:01 -0800)]
DaVinci: MMC: MMC/SD controller driver for DaVinci family
Add support for MMC/SD controller driver for all DaVinci family SoC. This
patch supports davinci family SoC's DM6446, DM355, DM365 and
DA830/OMAPL137.
The patch has been tested on DM355 EVM.
The MMCSD controller specifications for DM355 can be found at
http://focus.ti.com/general/docs/litabsmultiplefilelist.tsp?literatureNumber=spruee2c
Signed-off-by: Vipin Bhandari <vipin.bhandari@ti.com>
Signed-off-by: Purshotam Kumar <purushotam@ti.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Julia Lawall [Tue, 15 Dec 2009 02:01:20 +0000 (18:01 -0800)]
drivers/mmc: Move dereference after NULL test
If the NULL test on mrq is needed, then the derefernce 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: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Albert Herranz [Tue, 15 Dec 2009 02:01:19 +0000 (18:01 -0800)]
sdio: rework cis tuple parsing
Rework the current CIS tuple parsing code, reusing the existing
infrastructure and providing an easy way to add new CISTPL_FUNCE parsers
by TPLFE_TYPE.
Valid known CIS tuples are now silently queued for the SDIO function
driver when not parsed/processed (-EILSEQ) by the SDIO core. Unknown CIS
tuples (-ENOENT) are queued too for the SDIO function driver without
aborting the initialization, but emit a warning in the kernel log.
CISTPL_FUNCE tuples can be "whitelisted" now by adding a matching entry to
the cis_tpl_funce_list table.
Signed-off-by: Albert Herranz <albert_herranz@yahoo.es>
Acked-by: Pierre Ossman <pierre@ossman.eu>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Uwe Kleine-König [Tue, 15 Dec 2009 02:01:17 +0000 (18:01 -0800)]
mxcmmc: fix error path in mxcmci_probe
After a failing allocation of mmc or a failed ioremap in mxcmci_probe host was
used uninitialized.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Pierre Ossman <pierre@ossman.eu>
Cc: Martin Fuzzey <mfuzzey@gmail.com>
Cc: Pierre Ossman <drzeus@drzeus.cx>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Mike Frysinger [Tue, 15 Dec 2009 02:01:16 +0000 (18:01 -0800)]
firmware: only allow EDD on x86
Rather than have the EDD depend on !ia64 (and assuming that only ia64,
x86, x86_64 will be including this Kconfig), have EDD depend on the only
arches which can support this code. This should allow all other arches to
cleanly include the firmware Kconfig.
Also simplify the x86 string used by FIRMWARE_MEMMAP to match EDD.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Matt Domsch <Matt_Domsch@dell.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
KOSAKI Motohiro [Tue, 15 Dec 2009 02:01:15 +0000 (18:01 -0800)]
Subject: Re: [PATCH] strstrip incorrectly marked __must_check
Recently, We marked strstrip() as must_check. because it was frequently
misused and it should be checked. However, we found one exception.
scsi/ipr.c intentionally ignore return value of strstrip. Because it
wishes to keep the whitespace at the beginning.
Thus we need to keep with and without checked whitespace trim function.
This patch adds a new strim() and changes ipr.c to use it.
[akpm@linux-foundation.org: coding-style fixes]
Suggested-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Joe Perches [Tue, 15 Dec 2009 02:01:14 +0000 (18:01 -0800)]
efi.h: use %pUl to print UUIDs
Shrinks vmlinux
without:
$ size vmlinux
text data bss dec hex filename
6975863 679652
1359668 9015183 898f8f vmlinux
with:
$ size vmlinux
text data bss dec hex filename
6975639 679652
1359668 9014959 898eaf vmlinux
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Jeff Garzik <jgarzik@redhat.com>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Joe Perches [Tue, 15 Dec 2009 02:01:13 +0000 (18:01 -0800)]
fs/ubifs: use %pUB to print UUIDs
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Artem Bityutskiy <dedekind@infradead.org>
Cc: Adrian Hunter <adrian.hunter@nokia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Joe Perches [Tue, 15 Dec 2009 02:01:13 +0000 (18:01 -0800)]
fs/gfs2/sys.c: use %pUB to print UUIDs
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Steven Whitehouse <swhiteho@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Joe Perches [Tue, 15 Dec 2009 02:01:12 +0000 (18:01 -0800)]
drivers/md/md.c: use %pU to print UUIDs
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Joe Perches [Tue, 15 Dec 2009 02:01:11 +0000 (18:01 -0800)]
drivers/firmware/dmi_scan.c: use %pUB to print UUIDs
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Jeff Garzik <jgarzik@redhat.com>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Joe Perches [Tue, 15 Dec 2009 02:01:11 +0000 (18:01 -0800)]
random.c: use %pU to print UUIDs
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Joe Perches [Tue, 15 Dec 2009 02:01:10 +0000 (18:01 -0800)]
fs/xfs/xfs_log_recover.c: use %pU to print UUIDs
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Alex Elder <aelder@sgi.com>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Joe Perches [Tue, 15 Dec 2009 02:01:09 +0000 (18:01 -0800)]
lib/vsprintf.c: add %pU to print UUID/GUIDs
UUID/GUIDs are somewhat common in kernel source.
Standardize the printed style of UUID/GUIDs by using
another extension to %p.
%pUb:
01020304-0506-0708-090a-
0b0c0d0e0f10
%pUB:
01020304-0506-0708-090A-
0B0C0D0E0F10 (upper case)
%pUl:
04030201-0605-0807-090a-
0b0c0d0e0f10
%pUL:
04030201-0605-0807-090A-
0B0C0D0E0F10 (upper case)
%pU defaults to %pUb
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Jeff Garzik <jgarzik@redhat.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Alex Elder <aelder@sgi.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Artem Bityutskiy <dedekind@infradead.org>
Cc: Adrian Hunter <adrian.hunter@nokia.com>
Cc: Steven Whitehouse <swhiteho@redhat.com>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Matt Mackall <mpm@selenic.com>
Cc: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
André Goddard Rosa [Tue, 15 Dec 2009 02:01:08 +0000 (18:01 -0800)]
parser: remove unnecessary strlen()
No functional change. Cache strlen() result to avoid recalculating it up
to 3 times on the worst case.
Reduces code size a little by 32 bytes:
text data bss dec hex filename
1385 0 0 1385 569 lib/parser.o-BEFORE
1353 0 0 1353 549 lib/parser.o-AFTER
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
André Goddard Rosa [Tue, 15 Dec 2009 02:01:06 +0000 (18:01 -0800)]
tree-wide: convert open calls to remove spaces to skip_spaces() lib function
Makes use of skip_spaces() defined in lib/string.c for removing leading
spaces from strings all over the tree.
It decreases lib.a code size by 47 bytes and reuses the function tree-wide:
text data bss dec hex filename
64688 584 592 65864 10148 (TOTALS-BEFORE)
64641 584 592 65817 10119 (TOTALS-AFTER)
Also, while at it, if we see (*str && isspace(*str)), we can be sure to
remove the first condition (*str) as the second one (isspace(*str)) also
evaluates to 0 whenever *str == 0, making it redundant. In other words,
"a char equals zero is never a space".
Julia Lawall tried the semantic patch (http://coccinelle.lip6.fr) below,
and found occurrences of this pattern on 3 more files:
drivers/leds/led-class.c
drivers/leds/ledtrig-timer.c
drivers/video/output.c
@@
expression str;
@@
( // ignore skip_spaces cases
while (*str && isspace(*str)) { \(str++;\|++str;\) }
|
- *str &&
isspace(*str)
)
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Cc: Julia Lawall <julia@diku.dk>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Neil Brown <neilb@suse.de>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: David Howells <dhowells@redhat.com>
Cc: <linux-ext4@vger.kernel.org>
Cc: Samuel Ortiz <samuel@sortiz.org>
Cc: Patrick McHardy <kaber@trash.net>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
André Goddard Rosa [Tue, 15 Dec 2009 02:01:04 +0000 (18:01 -0800)]
string: on strstrip(), first remove leading spaces before running over str
... so that strlen() iterates over a smaller string comprising of the
remaining characters only.
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
André Goddard Rosa [Tue, 15 Dec 2009 02:01:04 +0000 (18:01 -0800)]
string: factorize skip_spaces and export it to be generally available
On the following sentence:
while (*s && isspace(*s))
s++;
If *s == 0, isspace() evaluates to ((_ctype[*s] & 0x20) != 0), which
evaluates to ((0x08 & 0x20) != 0) which equals to 0 as well.
If *s == 1, we depend on isspace() result anyway. In other words,
"a char equals zero is never a space", so remove this check.
Also, *s != 0 is most common case (non-null string).
Fixed const return as noticed by Jan Engelhardt and James Bottomley.
Fixed unnecessary extra cast on strstrip() as noticed by Jan Engelhardt.
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Andrew Morton [Tue, 15 Dec 2009 02:01:02 +0000 (18:01 -0800)]
drivers/scsi/sym53c8xx_2/sym_glue.c: rename skip_spaces() to sym_skip_spaces()
To avoid a collision with the newly-added kernel-wide skip_spaces().
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
André Goddard Rosa [Tue, 15 Dec 2009 02:01:02 +0000 (18:01 -0800)]
ctype: constify read-only _ctype string
While at it, use tabs to indent the comments.
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
André Goddard Rosa [Tue, 15 Dec 2009 02:01:01 +0000 (18:01 -0800)]
vsprintf: reuse almost identical simple_strtoulX() functions
The difference between simple_strtoul() and simple_strtoull() is just
the size of the variable used to keep track of the sum of characters
converted to numbers:
unsigned long simple_strtoul() {...}
unsigned long long simple_strtoull(){...}
Both are same size on my Core 2/gcc 4.4.1.
Overflow condition is not checked on both functions, so an extremely large
string can break these functions so that they don't even notice it.
As we do not care for overflowing on these functions, always keep the sum
using the larger variable around (unsigned long long) on simple_strtoull()
and cast it to (unsigned long) on simple_strtoul(), which then becomes
just a wrapper around simple_strtoull().
Code size decreases by 304 bytes:
text data bss dec hex filename
15534 0 8 15542 3cb6 vsprintf.o (ex lib/lib.a-BEFORE)
15230 0 8 15238 3b86 vsprintf.o (ex lib/lib.a-AFTER)
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
André Goddard Rosa [Tue, 15 Dec 2009 02:01:00 +0000 (18:01 -0800)]
vsprintf: factor out skip_space code in a separate function
When converting more caller sites, the inline decision will be left up to gcc.
It decreases code size:
text data bss dec hex filename
15710 0 8 15718 3d66 vsprintf.o (ex lib/lib.a-BEFORE)
15534 0 8 15542 3cb6 vsprintf.o (ex lib/lib.a-AFTER)
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
André Goddard Rosa [Tue, 15 Dec 2009 02:00:59 +0000 (18:00 -0800)]
vsprintf: move local vars to block local vars and remove unneeded ones
Cleanup by moving variables closer to the scope where they're used in fact.
Also, remove unneeded ones.
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
André Goddard Rosa [Tue, 15 Dec 2009 02:00:59 +0000 (18:00 -0800)]
vsprintf: reduce code size by avoiding extra check
No functional change, just refactor the code so that it avoid checking
"if (hi)" two times in a sequence, taking advantage of previous check made.
It also reduces code size:
text data bss dec hex filename
15726 0 8 15734 3d76 vsprintf.o (ex lib/lib.a-BEFORE)
15710 0 8 15718 3d66 vsprintf.o (ex lib/lib.a-AFTER)
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
André Goddard Rosa [Tue, 15 Dec 2009 02:00:58 +0000 (18:00 -0800)]
vsprintf: use TOLOWER whenever possible
It decreases code size as well:
text data bss dec hex filename
15758 0 8 15766 3d96 vsprintf.o (ex lib/lib.a-BEFORE)
15726 0 8 15734 3d76 vsprintf.o (ex lib/lib.a-TOLOWER)
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
André Goddard Rosa [Tue, 15 Dec 2009 02:00:57 +0000 (18:00 -0800)]
vsprintf: give it some care to please checkpatch.pl
Most relevant complaints were addressed.
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
André Goddard Rosa [Tue, 15 Dec 2009 02:00:56 +0000 (18:00 -0800)]
vsprintf: pre-calculate final string length for later use
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
André Goddard Rosa [Tue, 15 Dec 2009 02:00:55 +0000 (18:00 -0800)]
vsprintf: factorize "(null)" string
This patchset reduces lib/lib.a code size by 482 bytes on my Core 2 with
gcc 4.4.1 even considering that it exports a newly defined function
skip_spaces() to drivers:
text data bss dec hex filename
64867 840 592 66299 102fb (TOTALS-lib.a-BEFORE)
64641 584 592 65817 10119 (TOTALS-lib.a-AFTER)
and implements some code tidy up.
Besides reducing lib.a size, it converts many in-tree drivers to use the
newly defined function, which makes another small reduction on kernel size
overall when those drivers are used.
This patch:
Change "<NULL>" to "(null)", unifying 3 equal strings.
glibc also uses "(null)" for the same purpose.
It decreases code size by 7 bytes:
text data bss dec hex filename
15765 0 8 15773 3d9d vsprintf.o (ex lib/lib.a-BEFORE)
15758 0 8 15766 3d96 vsprintf.o (ex lib/lib.a-AFTER)
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Joe Perches [Tue, 15 Dec 2009 02:00:54 +0000 (18:00 -0800)]
MAINTAINERS: Update file patterns for WOLFSON MICROELECTRONICS PMIC DRIVERS
One of the includes pointed to a non-existent directory
Add Documentation/hwmon/wm83??
Add sound/soc/codecs/wm(8350|8400).h files
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Joe Perches [Tue, 15 Dec 2009 02:00:53 +0000 (18:00 -0800)]
MAINTAINERS: remove file pattern from KERNEL VIRTUAL MACHINE (KVM) FOR AMD-V
Commit
6c8166a77c98f473eb91e96a61c3cf78ac617278 ("KVM: SVM: Fold kvm_svm.h
info svm.c") folded this file away.
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Avi Kivity <avi@redhat.com>
Cc: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Joe Perches [Tue, 15 Dec 2009 02:00:52 +0000 (18:00 -0800)]
MAINTAINERS: rename PALM TREO section and file patterns
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Tomas Cech <sleep_walker@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
KOSAKI Motohiro [Tue, 15 Dec 2009 02:00:52 +0000 (18:00 -0800)]
MAINTAINERS: mark cifs mailing list as "moderated for non-subscribers"
If non-subscribers post bug report to CIFS mailing list, they will get
following messages.
Your mail to 'linux-cifs-client' with the subject
[PATCH x/x] cifs: xxxxxxxxxxxxx
Is being held until the list moderator can review it for approval.
The reason it is being held:
Post by non-member to a members-only list
Either the message will get posted to the list, or you will receive
notification of the moderator's decision. If you would like to cancel
this posting, please visit the following URL:
members-only list should be written as so in MAINTAINERS file.
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Steve French <sfrench@samba.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Joe Perches [Tue, 15 Dec 2009 02:00:50 +0000 (18:00 -0800)]
scripts/get_maintainer.pl: support multiple VCSs - add mercurial
Restructure a bit for multiple version control systems support.
Use a hash for each supported VCS that contains the commands
and patterns used to find commits, logs, and signers.
--git command line options are still used for hg except for
--git-since. Use --hg-since instead.
The number of commits can differ for git and hg, so --rolestats
might be different.
Style changes: Use common push style push(@foo...), simplify a return
Bumped version to 0.23.
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Marti Raudsepp <marti@juffo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Joe Perches [Tue, 15 Dec 2009 02:00:49 +0000 (18:00 -0800)]
scripts/get_maintainer.pl: fix --non with --git-blame and cleanups
Fix email matching without name --n and --git-blame
Using --non and --git-blame caused maintainer signature
matching to fail. Fixed that by adding 3rd argument to
sub format_email to control show/hide name portion of address
Slurp -f file instead of reading line-by-line for K: pattern matching.
Suggested by Wolfram Sang as more efficient
Refactor git command execution
Break into 2 functions, execute/analyze
Share code between --git and --git-blame
Don't warn multiple times when git isn't installed
Improve stats reporting
--git-min-percent and -- rolestats now count the total number of commits
for either the period of --git-since or if using --git-blame the commits
used by the current file and calculate commit % as
# of commits signed / total commits * 100
Code style cleaning
Use consistent sub foo { my (args...) = @_;
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Ben Hutchings <ben@decadent.org.uk>
Cc: Greg KH <greg@kroah.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>