firefly-linux-kernel-4.4.55.git
13 years agoinclude/gpio.h: remove remaining __must_check-annotiations
Wolfram Sang [Fri, 14 Jan 2011 08:34:29 +0000 (09:34 +0100)]
include/gpio.h: remove remaining __must_check-annotiations

Commit 5f829e405ec4e96f711165a4a7b55c271d4363e2 (gpiolib: add missing functions
to generic fallback) also introduced two.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Greg KH <gregkh@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoRevert update for dirty_ratio for memcg.
KAMEZAWA Hiroyuki [Fri, 14 Jan 2011 05:56:53 +0000 (14:56 +0900)]
Revert update for dirty_ratio for memcg.

The flags added by commit db16d5ec1f87f17511599bc77857dd1662b5a22f
has no user now. We believe we'll use it soon but considering
patch reviewing, the change itself should be folded into incoming
set of "dirty ratio for memcg" patches.

So, it's better to drop this change from current mainline tree.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Reviewed-by: Greg Thelen <gthelen@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agorevert documentaion update for memcg's dirty ratio.
KAMEZAWA Hiroyuki [Fri, 14 Jan 2011 06:04:21 +0000 (15:04 +0900)]
revert documentaion update for memcg's dirty ratio.

Subjct: Revert memory cgroup dirty_ratio Documentation.

The commit ece72400c2a27a3d726cb0854449f991d9fcd2da adds documentation
for memcg's dirty ratio. But the function is not implemented yet.
Remove the documentation for avoiding confusing users.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Reviewed-by: Greg Thelen <gthelen@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years ago[SCSI] sd,sr: kill compat SDEV_MEDIA_CHANGE event
Tejun Heo [Tue, 28 Dec 2010 15:20:47 +0000 (16:20 +0100)]
[SCSI] sd,sr: kill compat SDEV_MEDIA_CHANGE event

SDEV_MEDIA_CHANGE event was first added by commit a341cd0f (SCSI: add
asynchronous event notification API) for SATA AN support and then
extended to cover generic media change events by commit 285e9670
([SCSI] sr,sd: send media state change modification events).

This event was mapped to block device in userland with all properties
stripped to simulate CHANGE event on the block device, which, in turn,
was used to trigger further userspace action on media change.

The recent addition of disk event framework kept this event for
backward compatibility but it turns out to be unnecessary and causes
erratic and inefficient behavior.  The new disk event generates proper
events on the block devices and the compat events are mapped to block
device with all properties stripped, so the block device ends up
generating multiple duplicate events for single actual event.

This patch removes the compat event generation from both sr and sd as
suggested by Kay Sievers.  Both existing and newer versions of udev
and the associated tools will behave better with the removal of these
events as they from the beginning were expecting events on the block
devices.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years ago[SCSI] sd: implement sd_check_events()
Tejun Heo [Sat, 18 Dec 2010 17:42:23 +0000 (18:42 +0100)]
[SCSI] sd: implement sd_check_events()

Replace sd_media_change() with sd_check_events().

* Move media removed logic into set_media_not_present() and
  media_not_present() and set sdev->changed iff an existing media is
  removed or the device indicates UNIT_ATTENTION.

* Make sd_check_events() sets sdev->changed if previously missing
  media becomes present.

* Event is reported only if sdev->changed is set.

This makes media presence event reported if scsi_disk->media_present
actually changed or the device indicated UNIT_ATTENTION.  For backward
compatibility, SDEV_EVT_MEDIA_CHANGE is generated each time
sd_check_events() detects media change event.

[jejb: fix boot failure]
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Jens Axboe <jaxboe@fusionio.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
13 years agopower_supply: Add MAX17042 Fuel Gauge Driver
MyungJoo Ham [Fri, 14 Jan 2011 05:46:11 +0000 (14:46 +0900)]
power_supply: Add MAX17042 Fuel Gauge Driver

The MAX17042 is a fuel gauge with an I2C interface for lithium-ion
betteries. Unlike its predecessor MAX17040, MAX17042 uses 16bit
registers. Besides, MAX17042 has much more features than MAX17040; e.g.,
a thermistor, current and current accumulation measurement, battery
internal resistance estimate, average values of measurement, and others.

This patch implements a driver for MAX17042.
In this initial release, we have implemented the most basic features of
a fuel gauge: measure the battery capacity and voltage.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
13 years agoMerge branch 'rcu/next' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck...
Ingo Molnar [Fri, 14 Jan 2011 14:30:16 +0000 (15:30 +0100)]
Merge branch 'rcu/next' of git://git./linux/kernel/git/paulmck/linux-2.6-rcu into core/urgent

13 years agokernel: fix hlist_bl again
Russell King [Fri, 14 Jan 2011 13:12:45 +0000 (13:12 +0000)]
kernel: fix hlist_bl again

__d_rehash is dereferencing an almost-NULL pointer on my ARM926.
CONFIG_SMP=n and CONFIG_DEBUG_SPINLOCK=y.

The faulting instruction is:    strne   r3, [r2, #4]
and as can be seen from the register dump below, r2 is 0x00000001, hence
the faulting 0x00000005 address.

__d_rehash is essentially:

       spin_lock_bucket(b);
       entry->d_flags &= ~DCACHE_UNHASHED;
       hlist_bl_add_head_rcu(&entry->d_hash, &b->head);
       spin_unlock_bucket(b);

which is:

       bit_spin_lock(0, (unsigned long *)&b->head.first);
       entry->d_flags &= ~DCACHE_UNHASHED;
       hlist_bl_add_head_rcu(&entry->d_hash, &b->head);
       __bit_spin_unlock(0, (unsigned long *)&b->head.first);

bit_spin_lock(0, ptr) sets bit 0 of *ptr, in this case b->head.first if
CONFIG_SMP or CONFIG_DEBUG_SPINLOCK is set:

#if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK)
       while (unlikely(test_and_set_bit_lock(bitnum, addr))) {
               while (test_bit(bitnum, addr)) {
                       preempt_enable();
                       cpu_relax();
                       preempt_disable();
               }
       }
#endif

So, b->head.first starts off NULL, and becomes a non-NULL (address 1).
hlist_bl_add_head_rcu() does this:

static inline void hlist_bl_add_head_rcu(struct hlist_bl_node *n,
                                       struct hlist_bl_head *h)
{
       first = hlist_bl_first(h);
       n->next = first;
       if (first)
               first->pprev = &n->next;

It is the store to first->pprev which is faulting.

hlist_bl_first():

static inline struct hlist_bl_node *hlist_bl_first(struct hlist_bl_head *h)
{
       return (struct hlist_bl_node *)
               ((unsigned long)h->first & ~LIST_BL_LOCKMASK);
}

but:
#if defined(CONFIG_SMP)
#define LIST_BL_LOCKMASK        1UL
#else
#define LIST_BL_LOCKMASK        0UL
#endif

So, we have one piece of code which sets bit 0 of addresses, and another
bit of code which doesn't clear it before dereferencing the pointer if
!CONFIG_SMP && CONFIG_DEBUG_SPINLOCK.  With the patch below, I can again
sucessfully boot the kernel on my Versatile PB/926 platform.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agorcu: avoid pointless blocked-task warnings
Paul E. McKenney [Wed, 12 Jan 2011 22:18:11 +0000 (14:18 -0800)]
rcu: avoid pointless blocked-task warnings

If the RCU callback-processing kthread has nothing to do, it parks in
a wait_event().  If RCU remains idle for more than two minutes, the
kernel complains about this.  This commit changes from wait_event()
to wait_event_interruptible() to prevent the kernel from complaining
just because RCU is idle.

Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Tested-by: Thomas Weber <weber@corscience.de>
Tested-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agorcu: demote SRCU_SYNCHRONIZE_DELAY from kernel-parameter status
Paul E. McKenney [Fri, 7 Jan 2011 10:33:47 +0000 (02:33 -0800)]
rcu: demote SRCU_SYNCHRONIZE_DELAY from kernel-parameter status

Because the adaptive synchronize_srcu_expedited() approach has
worked very well in testing, remove the kernel parameter and
replace it by a C-preprocessor macro.  If someone finds problems
with this approach, a more complex and aggressively adaptive
approach might be required.

Longer term, SRCU will be merged with the other RCU implementations,
at which point synchronize_srcu_expedited() will be event driven,
just as synchronize_sched_expedited() currently is.  At that point,
there will be no need for this adaptive approach.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
13 years agoASoC: WL1273 FM radio: Fix breakage with MFD API changes
Matti J. Aaltonen [Thu, 13 Jan 2011 13:22:45 +0000 (15:22 +0200)]
ASoC: WL1273 FM radio: Fix breakage with MFD API changes

These changes are needed to keep up with the changes in the
MFD core and V4L2 parts of the wl1273 FM radio driver.

Use function pointers instead of exported functions for I2C IO.
Also move all preprocessor constants from the wl1273.h to
include/linux/mfd/wl1273-core.h.

Signed-off-by: Matti J. Aaltonen <matti.j.aaltonen@nokia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoMerge branch 'for-rmk' of git://git.pengutronix.de/git/imx/linux-2.6 into devel-stable
Russell King [Fri, 14 Jan 2011 12:12:42 +0000 (12:12 +0000)]
Merge branch 'for-rmk' of git://git.pengutronix.de/git/imx/linux-2.6 into devel-stable

13 years agoARM: fix wrongly patched constants
Russell King [Fri, 14 Jan 2011 12:06:26 +0000 (12:06 +0000)]
ARM: fix wrongly patched constants

e3d9c625 (ARM: CPU hotplug: fix hard-coded control register constants)
changed the wrong constants in the hotplug assembly code.  Fix this.

Reported-by: viresh kumar <viresh.kumar@st.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agomfd: ab8500-core chip version cut 2.0 support
Mattias Wallin [Tue, 7 Dec 2010 10:20:47 +0000 (11:20 +0100)]
mfd: ab8500-core chip version cut 2.0 support

This patch adds support for chip version 2.0 or cut 2.0.
One new interrupt latch register - latch 12 - is introduced.

Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Flag WM831x /IRQ as a wake source
Mark Brown [Wed, 5 Jan 2011 17:56:01 +0000 (17:56 +0000)]
mfd: Flag WM831x /IRQ as a wake source

The WM831x can generate wake events, some unconditionally, so flag
the primary IRQ as a wake source in order to help the CPU treat the
/IRQ signal appropriately.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Convert WM831x away from legacy I2C PM operations
Mark Brown [Wed, 5 Jan 2011 15:12:39 +0000 (15:12 +0000)]
mfd: Convert WM831x away from legacy I2C PM operations

Since the legacy bus PM operations are deprecated move the suspend
method over to dev_pm_ops.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agoregulator: Support MAX8998/LP3974 DVS-GPIO
MyungJoo Ham [Tue, 11 Jan 2011 11:20:05 +0000 (12:20 +0100)]
regulator: Support MAX8998/LP3974 DVS-GPIO

The previous driver did not support BUCK1-DVS3, BUCK1-DVS4, and
BUCK2-DVS2 modes. This patch adds such modes and an option to block
setting buck1/2 voltages out of the preset values.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Support LP3974 RTC
MyungJoo Ham [Tue, 4 Jan 2011 05:17:39 +0000 (14:17 +0900)]
mfd: Support LP3974 RTC

The first releases of LP3974 have a large delay in RTC registers,
which requires 2 seconds of delay after writing to a rtc register
(recommended by National Semiconductor's engineers)
before reading it.

If "rtc_delay" field of the platform data is true, the rtc driver
assumes that such delays are required. Although we have not seen
LP3974s without requiring such delays, we assume that such LP3974s
will be released soon (or they have done so already) and they are
supported by "lp3974" without setting "rtc_delay" at the platform
data.

This patch adds delays with msleep when writing values to RTC registers
if the platform data has rtc_delay set.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agoi2c: Convert SCx200 driver from using raw PCI to platform device
Andres Salomon [Fri, 31 Dec 2010 04:27:33 +0000 (20:27 -0800)]
i2c: Convert SCx200 driver from using raw PCI to platform device

The SCx200 ACB driver supports ISA hardware as well as PCI.  The PCI
hardware is CS5535/CS5536 based, and the device that it grabs is handled by
the cs5535-mfd driver. This converts the SCx200 driver to use a
platform_driver rather than the previous PCI hackery.

The driver used to manually track the iface list (via linked list); now it
only does this for ISA devices.  PCI ifaces are handled through standard
driver model lists.

It's unclear what happens in case of errors in the old ISA code; rather than
pretending the code actually cares, I've dropped the (implicit) ignorance
of return values and marked it with a comment.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agox86: OLPC: convert olpc-xo1 driver from pci device to platform device
Andres Salomon [Mon, 29 Nov 2010 23:45:06 +0000 (15:45 -0800)]
x86: OLPC: convert olpc-xo1 driver from pci device to platform device

The cs5535-mfd driver now takes care of the PCI BAR handling; this
means the olpc-xo1 driver shouldn't be touching the PCI device at all.

This patch uses both cs5535-acpi and cs5535-pms platform devices rather
than a single platform device because the cs5535-mfd driver may be used
by other CS5535 platform-specific drivers; OLPC doesn't get to dictate
that ACPI and PMS will always be used together.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: MAX8998/LP3974 hibernation support
MyungJoo Ham [Thu, 23 Dec 2010 08:53:36 +0000 (17:53 +0900)]
mfd: MAX8998/LP3974 hibernation support

This patch makes the driver to save and restore register values
for hibernation.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd/ab8500: remove spi support
Sundar Iyer [Fri, 24 Dec 2010 10:52:08 +0000 (11:52 +0100)]
mfd/ab8500: remove spi support

Since the Ab8500 v1.0, the SPI support is deprecated on the HW.

Signed-off-by: Sundar Iyer <sundar.iyer@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Remove ARCH_U8500 dependency from AB8500
Mark Brown [Sat, 11 Dec 2010 13:07:49 +0000 (13:07 +0000)]
mfd: Remove ARCH_U8500 dependency from AB8500

While it is vanishingly unlikely that the device will be deployed on other
architectures removing the dependency facilitates build testing when doing
generic work on both the MFD core for the device and the subsystem drivers.

There appears to be no actual code dependency.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomisc: Make AB8500_PWM driver depend on U8500 due to PWM breakage
Mark Brown [Mon, 20 Dec 2010 12:28:11 +0000 (12:28 +0000)]
misc: Make AB8500_PWM driver depend on U8500 due to PWM breakage

Since we don't have a PWM API every PWM driver ends up exporting its
own version and we need to limit the platforms we try to build them on
in order to avoid multiple definitions. As the AB8500 is normally a
companion chip for the U8500 CPU depend on that architecture.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Add __devexit annotation for vx855_remove
Axel Lin [Mon, 20 Dec 2010 02:02:06 +0000 (10:02 +0800)]
mfd: Add __devexit annotation for vx855_remove

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Harald Welte <HaraldWelte@viatech.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: twl6030 irq_data conversion.
Lennert Buytenhek [Mon, 13 Dec 2010 12:31:18 +0000 (13:31 +0100)]
mfd: twl6030 irq_data conversion.

Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agogpio: Fix cs5535 printk warnings
Joe Perches [Mon, 20 Dec 2010 10:28:40 +0000 (11:28 +0100)]
gpio: Fix cs5535 printk warnings

drivers/gpio/cs5535-gpio.c: In function 'cs5535_gpio_probe':
drivers/gpio/cs5535-gpio.c:269: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'resource_size_t'
drivers/gpio/cs5535-gpio.c:269: warning: format '%x' expects type 'unsigned int', but argument 4 has type 'resource_size_t'

Use vsprintf extension %pR to format resource.

Original-patch-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomisc: Fix cs5535 printk warnings
Joe Perches [Mon, 20 Dec 2010 10:26:19 +0000 (11:26 +0100)]
misc: Fix cs5535 printk warnings

drivers/misc/cs5535-mfgpt.c: In function 'cs5535_mfgpt_probe':
drivers/misc/cs5535-mfgpt.c:320: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'resource_size_t'
drivers/misc/cs5535-mfgpt.c:320: warning: format '%x' expects type 'unsigned int', but argument 4 has type 'resource_size_t'

Use vsprintf extension %pR to format resource.

Original-patch-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Convert Wolfson MFD drivers to use irq_data accessor function
Mark Brown [Sat, 11 Dec 2010 13:21:21 +0000 (13:21 +0000)]
mfd: Convert Wolfson MFD drivers to use irq_data accessor function

Actually makes the code larger rathe rthan smaller but does provide some
isolation against core API changes.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Convert TWL4030 to new irq_ APIs
Mark Brown [Sun, 12 Dec 2010 12:51:39 +0000 (12:51 +0000)]
mfd: Convert TWL4030 to new irq_ APIs

The genirq core is being updated to pass struct irq_data to irq_chip
operations. Update the TWL4030 driver to the new APIs.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Convert tps6586x driver to new irq_ API
Mark Brown [Sun, 12 Dec 2010 12:39:28 +0000 (12:39 +0000)]
mfd: Convert tps6586x driver to new irq_ API

The genirq core is being updated to supply struct irq_data to irq_chip
operations rather than an irq number. Update the tps6586x driver to the
new APIs.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Convert tc6393xb driver to new irq_ APIs
Mark Brown [Sun, 12 Dec 2010 12:34:04 +0000 (12:34 +0000)]
mfd: Convert tc6393xb driver to new irq_ APIs

The genirq core is being update to pass struct irq_data to irq_chip rather
than an irq number to operations. Update tc6393 to the new API.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Ian Molton <ian@mnementh.co.uk>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Convert t7166xb driver to new irq_ API
Mark Brown [Sun, 12 Dec 2010 12:18:58 +0000 (12:18 +0000)]
mfd: Convert t7166xb driver to new irq_ API

The genirq core is being updated to pass struct irq_data rather than an
irq number to irq_chip operations. Update the t7166xb driver to the new
APIs.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Ian Molton <ian@mnementh.co.uk>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Convert SMTPE driver to new irq_ APIs
Mark Brown [Sun, 12 Dec 2010 12:01:08 +0000 (12:01 +0000)]
mfd: Convert SMTPE driver to new irq_ APIs

The genirq core is being updated to supply struct irq_data to irq_chip
operations rather than an irq number. Update the SMTPE driver to the new
APIs.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Convert MAX8998 driver to irq_ API
Mark Brown [Sat, 11 Dec 2010 18:31:03 +0000 (18:31 +0000)]
mfd: Convert MAX8998 driver to irq_ API

The genirq core is being updated to pass struct irq_data to interrupt
operations, update the MAX8998 driver to the new API.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Convert max8925 to new irq_ API
Mark Brown [Sat, 11 Dec 2010 18:20:55 +0000 (18:20 +0000)]
mfd: Convert max8925 to new irq_ API

The genirq infrastructure is being converted to pass struct irq_data rather
than an irq number to irq_chip operations, update max8925 to the new APIs.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Convert jz4740-adc to new irq_ methods
Mark Brown [Sun, 12 Dec 2010 19:08:30 +0000 (20:08 +0100)]
mfd: Convert jz4740-adc to new irq_ methods

Convert the jz4740-adc driver to use the recently introduced IRQ API
variants which are passed struct irq_data rather than an IRQ number.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Convert HTC I2C CPLD driver to irq_ API
Mark Brown [Sat, 11 Dec 2010 16:44:11 +0000 (16:44 +0000)]
mfd: Convert HTC I2C CPLD driver to irq_ API

The genirq core is being converted to pass a struct irq_data to interrupt
operations rather than an IRQ number.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Cory Maccarrone <darkstar6262@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Convert HTC EGPIO driver to irq_ API
Mark Brown [Sat, 11 Dec 2010 16:43:59 +0000 (16:43 +0000)]
mfd: Convert HTC EGPIO driver to irq_ API

The genirq core is being converted to pass a struct irq_data to interrupt
operations rather than an IRQ number.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Convert ezx-pcap to new irq_ methods
Lennert Buytenhek [Mon, 13 Dec 2010 12:30:09 +0000 (13:30 +0100)]
mfd: Convert ezx-pcap to new irq_ methods

Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Convert AB8500 to new irq_ methods
Mark Brown [Sat, 11 Dec 2010 13:16:08 +0000 (13:16 +0000)]
mfd: Convert AB8500 to new irq_ methods

The genirq core is being converted to supply struct irq_data to chips
rather than the interrupt number.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Mattias Wallin <mattias.wallin@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Convert AB3500 to new irq_ APIs
Mark Brown [Sat, 11 Dec 2010 13:14:12 +0000 (13:14 +0000)]
mfd: Convert AB3500 to new irq_ APIs

The genirq core is being updated to pass struct irq_data rather than irq
numbers into chip drivers. As part of the update assignments to NULL for
unused operations are removed, these are not needed and the genirq docs
should be good enough.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Mattias Wallin <mattias.wallin@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Convert ASIC3 to new irq_ APIs
Mark Brown [Sat, 11 Dec 2010 13:08:57 +0000 (13:08 +0000)]
mfd: Convert ASIC3 to new irq_ APIs

The interrupt controller APIs are being updated to pass a struct irq_data
rather than the interrupt number.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Ian Molton <ian@mnementh.co.uk>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Convert 88PM860x driver to new irq_ APIs
Mark Brown [Sat, 11 Dec 2010 12:31:31 +0000 (12:31 +0000)]
mfd: Convert 88PM860x driver to new irq_ APIs

The interrupt controller APIs are being updated to pass a struct irq_data
rather than the interrupt number.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Staticise internal functions in HTC I2CCPLD driver
Mark Brown [Sat, 11 Dec 2010 16:44:49 +0000 (16:44 +0000)]
mfd: Staticise internal functions in HTC I2CCPLD driver

Most of these are GPIO operations, though a couple are just internal only
functions.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Cory Maccarrone <darkstar6262@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Use NULL to initialise NULL pointers in ab8500-debugfs
Mark Brown [Mon, 13 Dec 2010 14:06:47 +0000 (14:06 +0000)]
mfd: Use NULL to initialise NULL pointers in ab8500-debugfs

Partly for coding style reasons, but mostly because sparse warns on it.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Mattias Wallin <mattias.wallin@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Correct ASIC3 IRQ_OWM resource setup
Mark Brown [Sat, 11 Dec 2010 13:00:34 +0000 (13:00 +0000)]
mfd: Correct ASIC3 IRQ_OWM resource setup

We should specify both a start and an end for the IRQ range rather than
initialise the start twice.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Staticise unexported symbols in ASIC3
Mark Brown [Sat, 11 Dec 2010 12:59:35 +0000 (12:59 +0000)]
mfd: Staticise unexported symbols in ASIC3

There's no use of either of these outside of the driver so they can be
declared static.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Remove tps6586x device ID check
Stephen Warren [Thu, 9 Dec 2010 17:30:11 +0000 (10:30 -0700)]
mfd: Remove tps6586x device ID check

... and convert it to a dev_info print at probe time.

There are many variants of this chip with different values of VERSIONCRC.
The set of values is large, and not useful to enumerate. All are SW
compatible. The difference lies in default settings of the various power
rails, and other similar differences. The driver, or clients of the
driver, shouldn't be affected by this, since all rails should be
programmed into the desired state in all cases for correct operation.

Derived-from-code-by: Andrew Chew <achew@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Fix twl_probe section mismatch warning in mfd/twl-core.c
Bryan Wu [Wed, 8 Dec 2010 02:42:04 +0000 (10:42 +0800)]
mfd: Fix twl_probe section mismatch warning in mfd/twl-core.c

Fix the following section mismatch warning when building
omap2plus_defconfig:

WARNING: vmlinux.o(.data+0x47d7c): Section mismatch in reference
from the variable twl_driver to the function .init.text:twl_probe()

Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: ab8500-core ioresources irq for subdrivers added
Mattias Wallin [Thu, 2 Dec 2010 14:40:31 +0000 (15:40 +0100)]
mfd: ab8500-core ioresources irq for subdrivers added

This patch adds the ioresources used by subdrivers to
retrieve their interrupt.

Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: ab8500-core wake up from suspend
Mattias Wallin [Thu, 2 Dec 2010 14:10:27 +0000 (15:10 +0100)]
mfd: ab8500-core wake up from suspend

This patch makes the system wake up from suspend when an
ab8500 interrupt occur. This can for example be USB cable
insert or an RTC alarm.

Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Export ab8500 chip id to sysfs
Mattias Wallin [Thu, 2 Dec 2010 14:09:36 +0000 (15:09 +0100)]
mfd: Export ab8500 chip id to sysfs

This patch adds a file into sysfs for reading out chip id.
It has been requested for modem silent reboot.

Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com>
Signed-off-by: Ludovic Barre <ludovic.barre@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: ab8500-core improved error handling in get_chip_id
Mattias Wallin [Thu, 2 Dec 2010 14:08:32 +0000 (15:08 +0100)]
mfd: ab8500-core improved error handling in get_chip_id

We check for dev before dereferencing it.

Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agogpio/misc: Add MODULE_ALIAS entries for CS5535 functions
Andres Salomon [Thu, 2 Dec 2010 03:55:10 +0000 (19:55 -0800)]
gpio/misc: Add MODULE_ALIAS entries for CS5535 functions

This adds MODULE_ALIAS entries to the various cs5535 subdevice modules; this
allows the modules to automatically be loaded when cs5535-mfd loads.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomisc: Convert cs5535-mfgpt from pci device to platform device
Andres Salomon [Sat, 23 Oct 2010 07:41:14 +0000 (00:41 -0700)]
misc: Convert cs5535-mfgpt from pci device to platform device

The cs5535-mfd driver now takes care of the PCI BAR handling; this
simplifies the mfgpt driver a bunch.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agogpio: Convert cs5535 from pci device to platform device
Andres Salomon [Sat, 23 Oct 2010 07:41:09 +0000 (00:41 -0700)]
gpio: Convert cs5535 from pci device to platform device

The cs5535-mfd driver now takes care of the PCI BAR handling; this
simplifies the gpio driver a lot.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Fix cs5535 warning on x86-64
Andres Salomon [Tue, 30 Nov 2010 21:54:39 +0000 (13:54 -0800)]
mfd: Fix cs5535 warning on x86-64

ARRAY_SIZE() returns size_t; use %zu instead of %d so that we don't
get warnings on x86-64.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Implement runtime PM for WM8994 core driver
Mark Brown [Fri, 26 Nov 2010 17:19:35 +0000 (17:19 +0000)]
mfd: Implement runtime PM for WM8994 core driver

Allow the WM8994 to completely power off, including disabling the LDOs
if they are software controlled, when it goes idle. The CODEC subdevice
controls activity for the MFD as a whole.

If the GPIOs need to be used while the device is active runtime PM
should be disabled for the device by machine specific code.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Provide pm_runtime_no_callbacks flag in cell data
Mark Brown [Fri, 26 Nov 2010 17:19:34 +0000 (17:19 +0000)]
mfd: Provide pm_runtime_no_callbacks flag in cell data

Allow MFD cells to have pm_runtime_no_callbacks() called on them during
registration. This causes the runtime PM framework to ignore them,
allowing use of runtime PM to suspend the device as a whole even if
not all drivers for the MFD can usefully implement runtime PM. For
example, RTCs are likely to run continuously regardless of the power
state of the system.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Fix ab8500-debug indentation errors
Mattias Wallin [Fri, 26 Nov 2010 12:06:39 +0000 (13:06 +0100)]
mfd: Fix ab8500-debug indentation errors

Replace spaces with proper tabs.

Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Convert WM8994 to new irq_ interrupt methods
Mark Brown [Wed, 24 Nov 2010 18:01:44 +0000 (18:01 +0000)]
mfd: Convert WM8994 to new irq_ interrupt methods

Kernel 2.6.37 adds new interrupt methods which take a struct irq_data
rather than an irq number. Convert over to these as they will become
mandatory in future.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Convert WM835x to new irq_ interrupt methods
Mark Brown [Wed, 24 Nov 2010 18:01:43 +0000 (18:01 +0000)]
mfd: Convert WM835x to new irq_ interrupt methods

Kernel 2.6.37 adds new interrupt methods which take a struct irq_data
rather than an irq number. Convert over to these as they will become
mandatory in future.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Convert WM831x to new irq_ interrupt methods
Mark Brown [Wed, 24 Nov 2010 18:01:42 +0000 (18:01 +0000)]
mfd: Convert WM831x to new irq_ interrupt methods

Kernel 2.6.37 adds new interrupt methods which take a struct irq_data
rather than an irq number. Convert over to these as they will become
mandatory in future.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Add WM8326 support
Mark Brown [Wed, 24 Nov 2010 18:01:41 +0000 (18:01 +0000)]
mfd: Add WM8326 support

The WM8326 is a high performance variant of the WM832x series with
no software visible differences.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Simplify WM832x subdevice instantiation
Mark Brown [Wed, 24 Nov 2010 18:01:40 +0000 (18:01 +0000)]
mfd: Simplify WM832x subdevice instantiation

All the current WM832x devices have the same set of subdevices so can
just use multiple case statements with a single body.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Use printf extension %pR for struct resource
Joe Perches [Fri, 12 Nov 2010 21:37:56 +0000 (13:37 -0800)]
mfd: Use printf extension %pR for struct resource

Using %pR standardizes the struct resource output.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Add cs5535-mfd driver for AMD Geode's CS5535/CS5536 support
Andres Salomon [Fri, 26 Nov 2010 10:52:35 +0000 (11:52 +0100)]
mfd: Add cs5535-mfd driver for AMD Geode's CS5535/CS5536 support

Add an MFD driver to handle the ISA device on CS5535 and CS5536
southbridges. This ISA bridge is actually multiple devices: GPIOs,
MFGPTs, etc.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Don't open-code mc13xxx_unlock
Uwe Kleine-König [Thu, 11 Nov 2010 15:47:50 +0000 (16:47 +0100)]
mfd: Don't open-code mc13xxx_unlock

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Include <linux/gpio.h> instead of <asm/gpio.h>
Axel Lin [Wed, 10 Nov 2010 07:49:41 +0000 (15:49 +0800)]
mfd: Include <linux/gpio.h> instead of <asm/gpio.h>

As warned by checkpatch.pl, use #include <linux/gpio.h> instead
of <asm/gpio.h>.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Include <linux/io.h> instead of <asm/io.h>
Axel Lin [Wed, 10 Nov 2010 07:47:51 +0000 (15:47 +0800)]
mfd: Include <linux/io.h> instead of <asm/io.h>

As warned by checkpatch.pl, use #include <linux/io.h> instead of <asm/io.h>

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Update WARN uses
Joe Perches [Sat, 30 Oct 2010 21:08:32 +0000 (14:08 -0700)]
mfd: Update WARN uses

Remove KERN_<level>.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agoe1000e: consistent use of Rx/Tx vs. RX/TX/rx/tx in comments/logs
Bruce Allan [Fri, 31 Dec 2010 06:10:01 +0000 (06:10 +0000)]
e1000e: consistent use of Rx/Tx vs. RX/TX/rx/tx in comments/logs

Some minor comment errors and whitespace issues discovered while looking
into this are also addressed.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoe1000e: update Copyright for 2011
Bruce Allan [Tue, 4 Jan 2011 01:16:44 +0000 (01:16 +0000)]
e1000e: update Copyright for 2011

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoe1000: Avoid unhandled IRQ
Jesse Brandeburg [Thu, 13 Jan 2011 07:48:13 +0000 (07:48 +0000)]
e1000: Avoid unhandled IRQ

If hardware asserted an interrupt and driver is down,
then there is nothing to do so return IRQ_HANDLED
instead of IRQ_NONE. Returning IRQ_NONE in above
situation causes screaming IRQ on virtual machines.

CC: Andy Gospodarek <gospo@redhat.com>
Signed-off-by: Tushar Dave <tushar.n.dave@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agodrm/i915: Disable GPU semaphores on SandyBridge mobile
Chris Wilson [Fri, 14 Jan 2011 09:46:38 +0000 (09:46 +0000)]
drm/i915: Disable GPU semaphores on SandyBridge mobile

Hopefully, this is a temporary measure whilst the root cause is
understood. At the moment, we experience a hard hang whilst looping
urbanterror that has been identified as a result of the use of
semaphores, but so far only on SNB mobile.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=32752
Tested-by: mengmeng.meng@intel.com
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agoALSA: hda - More coverage for odd-number channels elimination for HDMI
Takashi Iwai [Fri, 14 Jan 2011 09:33:26 +0000 (10:33 +0100)]
ALSA: hda - More coverage for odd-number channels elimination for HDMI

The commit ad09fc9d2156f3d37537b34418a6b79309013d33 didn't cover the
case for Intel and Nvidia HDMIs, where hdmi_pcm_open() is called.
Put the hw_constraint there, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: hda - Store PCM parameters properly in HDMI open callback
Takashi Iwai [Fri, 14 Jan 2011 09:30:46 +0000 (10:30 +0100)]
ALSA: hda - Store PCM parameters properly in HDMI open callback

In hdmi_pcm_open(), the evaluated PCM hw parameters are stored in
hinfo, but these aren't properly set back to the current runtime
record since these have been set beforehand in azx_pcm_open().
This patch fixes the behavior.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoARM mxs: clkdev related compile fixes
Sascha Hauer [Thu, 13 Jan 2011 15:59:25 +0000 (16:59 +0100)]
ARM mxs: clkdev related compile fixes

Since commit

6d803ba (ARM: 6483/1: arm & sh: factorised duplicated clkdev.c)

platforms need to select CLKDEV_LOOKUP instead of COMMON_CLKDEV and need
to include <linux/clkdev.h>.

Cc: Shawn Guo <shawn.guo@freescale.com>
Cc: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: 6624/1: fix dependency for CONFIG_SMP_ON_UP
Nicolas Pitre [Fri, 14 Jan 2011 06:33:24 +0000 (07:33 +0100)]
ARM: 6624/1: fix dependency for CONFIG_SMP_ON_UP

This depends on !XIP_KERNEL and not !XIP.

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoARM: 6623/1: Thumb-2: Fix out-of-range offset for Thumb-2 in proc-v7.S
Dave Martin [Thu, 13 Jan 2011 23:43:01 +0000 (00:43 +0100)]
ARM: 6623/1: Thumb-2: Fix out-of-range offset for Thumb-2 in proc-v7.S

Commit d30e45e (ARM: pgtable: switch order of Linux vs hardware page tables)
introduced a pre-increment addressing offset which is out of range for
Thumb-2.  Thumb-2 only permits offsets <256.  So split the intruction in
two for Thumb-2.

Signed-off-by: Dave Martin <dave.martin@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoALSA: hda - Rearrange fixup struct in patch_realtek.c
Takashi Iwai [Fri, 14 Jan 2011 08:55:32 +0000 (09:55 +0100)]
ALSA: hda - Rearrange fixup struct in patch_realtek.c

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: oxygen: Xonar DG: fix CS4245 register writes
Clemens Ladisch [Fri, 14 Jan 2011 07:07:50 +0000 (08:07 +0100)]
ALSA: oxygen: Xonar DG: fix CS4245 register writes

Accidentally exchanging register addresses and register values leads to
many strange errors ...

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoARM i.MX mx31_3ds: Fix MC13783 regulator names
Sascha Hauer [Fri, 14 Jan 2011 08:44:02 +0000 (09:44 +0100)]
ARM i.MX mx31_3ds: Fix MC13783 regulator names

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agocgroups: Fix a lockdep warning at cgroup removal
Li Zefan [Fri, 14 Jan 2011 03:34:34 +0000 (11:34 +0800)]
cgroups: Fix a lockdep warning at cgroup removal

Commit 2fd6b7f5 ("fs: dcache scale subdirs") forgot to annotate a dentry
lock, which caused a lockdep warning.

Reported-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
13 years agofs: namei fix ->put_link on wrong inode in do_filp_open
Nick Piggin [Fri, 14 Jan 2011 08:42:43 +0000 (08:42 +0000)]
fs: namei fix ->put_link on wrong inode in do_filp_open

J. R. Okajima noticed that ->put_link is being attempted on the
wrong inode, and suggested the way to fix it. I changed it a bit
according to Al's suggestion to keep an explicit link path around.

Signed-off-by: Nick Piggin <npiggin@kernel.dk>
13 years agoALSA: hda - Suppress the odd number of channels for HDMI
Takashi Iwai [Fri, 14 Jan 2011 08:42:27 +0000 (09:42 +0100)]
ALSA: hda - Suppress the odd number of channels for HDMI

It looks like that HDMI codecs don't support the odd number of channels
although HD-audio spec doesn't have the restriction.  Add the
hw_constraint to limit to only the even number of channels.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agospi: Enable SPI driver for S5P6440 and S5P6450
Abhilash Kesavan [Wed, 12 Jan 2011 06:00:23 +0000 (15:00 +0900)]
spi: Enable SPI driver for S5P6440 and S5P6450

This patch enables the existing S3C64XX series SPI driver for S5P64X0
and removed dependency on EXPERIMENTAL because we don't need it now.

v3: Changed dependency of S3C64XX_DMA
v2: Removed dependency on EXPERIMENTAL

Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
Acked-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
13 years agoblock cfq: compensate preempted queue even if it has no slice assigned
Shaohua Li [Fri, 14 Jan 2011 07:41:03 +0000 (08:41 +0100)]
block cfq: compensate preempted queue even if it has no slice assigned

If a queue is preempted before it gets slice assigned, the queue doesn't get
compensation, which looks unfair. For such queue, we compensate it for a whole
slice.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
13 years agoblock cfq: make queue preempt work for queues from different workload
Shaohua Li [Fri, 14 Jan 2011 07:41:02 +0000 (08:41 +0100)]
block cfq: make queue preempt work for queues from different workload

I got this:
             fio-874   [007]  2157.724514:   8,32   m   N cfq874 preempt
             fio-874   [007]  2157.724519:   8,32   m   N cfq830 slice expired t=1
             fio-874   [007]  2157.724520:   8,32   m   N cfq830 sl_used=1 disp=0 charge=1 iops=0 sect=0
             fio-874   [007]  2157.724521:   8,32   m   N cfq830 set_active wl_prio:0 wl_type:0
             fio-874   [007]  2157.724522:   8,32   m   N cfq830 Not idling. st->count:1

cfq830 is an async queue, and preempted by a sync queue cfq874. But since we
have cfqg->saved_workload_slice mechanism, the preempt is a nop.
Looks currently our preempt is totally broken if the two queues are not from
the same workload type.
Below patch fixes it. This will might make async queue starvation, but it's
what our old code does before cgroup is added.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
13 years agommc: sdhci-of: fix build on non-powerpc platforms
Rob Herring [Tue, 16 Nov 2010 20:33:52 +0000 (14:33 -0600)]
mmc: sdhci-of: fix build on non-powerpc platforms

Explicitly include err.h, of_address.h and of_irq.h.
Make use of machine_is() conditional on PPC.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
13 years agor8169: keep firmware in memory.
françois romieu [Thu, 13 Jan 2011 13:07:53 +0000 (13:07 +0000)]
r8169: keep firmware in memory.

The firmware agent is not available during resume. Loading the firmware
during open() (see eee3a96c6368f47df8df5bd4ed1843600652b337) is not
enough.

close() is run during resume through rtl8169_reset_task(), whence the
mildly natural release of firmware in the driver removal method instead.

It will help with http://bugs.debian.org/609538. It will not avoid
the 60 seconds delay when:
- there is no firmware
- the driver is loaded and the device is not up before a suspend/resume

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Tested-by: Jarek Kamiński <jarek@vilo.eu.org>
Cc: Hayes <hayeswang@realtek.com>
Cc: Ben Hutchings <benh@debian.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonetdev: tilepro: Use is_unicast_ether_addr helper
Tobias Klauser [Wed, 12 Jan 2011 22:15:08 +0000 (22:15 +0000)]
netdev: tilepro: Use is_unicast_ether_addr helper

Use is_unicast_ether_addr from linux/etherdevice.h instead of custom
macros.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoetherdevice.h: Add is_unicast_ether_addr function
Tobias Klauser [Wed, 12 Jan 2011 22:14:56 +0000 (22:14 +0000)]
etherdevice.h: Add is_unicast_ether_addr function

From a check for !is_multicast_ether_addr it is not always obvious that
we're checking for a unicast address. So add this helper function to
make those code paths easier to read.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Acked-by: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoks8695net: Use default implementation of ethtool_ops::get_link
Ben Hutchings [Thu, 13 Jan 2011 07:52:51 +0000 (07:52 +0000)]
ks8695net: Use default implementation of ethtool_ops::get_link

This is completely untested as I don't have an ARM build environment.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoks8695net: Disable non-working ethtool operations
Ben Hutchings [Thu, 13 Jan 2011 07:50:14 +0000 (07:50 +0000)]
ks8695net: Disable non-working ethtool operations

Some ethtool operations can only be implemented for the WAN port, and
not all such operations are allowed to return an error code such as
-EOPNOTSUPP.  Therefore, define two separate ethtool_ops structures
for WAN and non-WAN ports; simplify and rename the WAN-only functions.

This is completely untested as I don't have an ARM build environment.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoUSB CDC NCM: Don't deref NULL in cdc_ncm_rx_fixup() and don't use uninitialized variable.
Jesper Juhl [Thu, 13 Jan 2011 11:40:11 +0000 (11:40 +0000)]
USB CDC NCM: Don't deref NULL in cdc_ncm_rx_fixup() and don't use uninitialized variable.

skb_clone() dynamically allocates memory and may fail. If it does it
returns NULL. This means we'll dereference a NULL pointer in
drivers/net/usb/cdc_ncm.c::cdc_ncm_rx_fixup().
As far as I can tell, the proper way to deal with this is simply to goto
the error label.

Furthermore gcc complains that 'skb' may be used uninitialized:
  drivers/net/usb/cdc_ncm.c: In function ‘cdc_ncm_rx_fixup’:
  drivers/net/usb/cdc_ncm.c:922:18: warning: ‘skb’ may be used uninitialized in this function
and I believe it is right. On the line where we
  pr_debug("invalid frame detected (ignored)" ...
we are using the local variable 'skb' but nothing has ever been assigned
to that variable yet. I believe the correct fix for that is to use
'skb_in' instead.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agovxge: Remember to release firmware after upgrading firmware
Jesper Juhl [Thu, 13 Jan 2011 10:25:20 +0000 (10:25 +0000)]
vxge: Remember to release firmware after upgrading firmware

Regardless of whether the firmware update being performed by
vxge_fw_upgrade() is a success or not we must still remember to always
release_firmware() before returning.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Ram Vepa <ram.vepa@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonetdev: bfin_mac: Remove is_multicast_ether_addr use in netdev_for_each_mc_addr
Joe Perches [Wed, 12 Jan 2011 18:08:04 +0000 (18:08 +0000)]
netdev: bfin_mac: Remove is_multicast_ether_addr use in netdev_for_each_mc_addr

Remove code that has no effect.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipsec: update MAX_AH_AUTH_LEN to support sha512
Nicolas Dichtel [Thu, 13 Jan 2011 11:51:03 +0000 (11:51 +0000)]
ipsec: update MAX_AH_AUTH_LEN to support sha512

icv_truncbits is set to 256 for sha512, so update
MAX_AH_AUTH_LEN to 64.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>