Mark Brown [Wed, 28 Mar 2012 20:40:42 +0000 (21:40 +0100)]
regulator: wm831x-dcdc: Specify supply names
Allows hookup via normal consumer mechanisms.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Wed, 28 Mar 2012 20:40:20 +0000 (21:40 +0100)]
regulator: wm831x-ldo: Set up supply names
Allows hookup via normal consumer mechanisms.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Sat, 21 Apr 2012 03:03:34 +0000 (11:03 +0800)]
regulator: tps65912: Convert to get_voltage_sel
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Thu, 19 Apr 2012 01:47:37 +0000 (09:47 +0800)]
regulator: max8998: Convert ot use devm_kzalloc
Also simplify the error handling to start unwind from the place
regulator_register fails.
No need to check rdev[i] is NULL or not before calling regulator_unregister.
regulator_unregister is safe if rdev is NULL,
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Thu, 19 Apr 2012 01:44:13 +0000 (09:44 +0800)]
regulator: max8997: Convert ot use devm_kzalloc
Also simplify the error handling to start unwind from the place
regulator_register fails.
No need to check rdev[i] is NULL or not before calling regulator_unregister.
regulator_unregister is safe if rdev is NULL,
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Wed, 18 Apr 2012 00:52:28 +0000 (08:52 +0800)]
regulator: Remove unneeded include of linux/delay.h from regulator drivers
All the drivers that need delay for the regulator voltage output voltage to
stabilize after being enabled or after being set to a new value has been
converted to implement enable_time and set_voltage_time_sel callbacks.
Then regulator core will take care of the necessary delay.
For the drivers that don't need the delay, don't need to include linux/delay.h.
This patch removes the unneeded include of linux/delay.h in regulator drivers.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Tue, 17 Apr 2012 15:49:28 +0000 (23:49 +0800)]
regulator: max8997: Remove empty set_suspend_enable callback implementation
Since commit
8ac0e95 "regulator: core: Support setting suspend_[mode|voltage]
if set_suspend_[en|dis]able is NULL", now the regulator core can properly
handle the case set_suspend_enable callback is NULL.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Tue, 17 Apr 2012 15:48:27 +0000 (23:48 +0800)]
regulator: max8997: Remove is_enabled callback implementation for max8997_charger_fixedstate_ops
If is_enabled callback is not implemented, the core assumes that the regulator
is on.
This is simpler than having a hack to retrun 1 in max8997_reg_is_enabled() if
max8997_get_enable_register() returns -EINVAL.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Fri, 13 Apr 2012 01:30:05 +0000 (09:30 +0800)]
regulator: s5m8767: Use DIV_ROUND_UP to calculate selector
Integer division may truncate the result.
Use DIV_ROUND_UP to ensure new voltage setting falls within specified range.
Also properly handle the case min_vol < desc->min to ensure we don't return
negative value for selector.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Fri, 20 Apr 2012 10:36:14 +0000 (18:36 +0800)]
regulator: max8952: Convert to get_voltage_sel
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Fri, 20 Apr 2012 10:33:52 +0000 (18:33 +0800)]
regulator: tps6507x: Convert to get_voltage_sel
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Thu, 19 Apr 2012 01:03:45 +0000 (09:03 +0800)]
regulator: virtual: Replace strict_strtol with kstrtol
strict_strtol is deprecated and results in a checkpatch warning.
Replace it with kstrtol.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Thu, 19 Apr 2012 03:15:58 +0000 (11:15 +0800)]
regulator: 88pm8607: Fix writting value to vol_reg in pm8607_set_voltage_sel
commit
4ca1e1d "regulator: Convert 88pm8607 to set_voltage_sel" accidentally
changed the value writing to vol_reg.
What we want is to write val instead of selector to vol_reg.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Wed, 18 Apr 2012 01:35:35 +0000 (09:35 +0800)]
regulator: virtual: Convert to use devm_* APIs
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Wed, 18 Apr 2012 01:34:34 +0000 (09:34 +0800)]
regulator: userspace-consumer: Convert to use devm_* APIs
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Wed, 11 Apr 2012 14:58:03 +0000 (22:58 +0800)]
regulator: Convert max8997 to set_voltage_time_sel
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Wed, 11 Apr 2012 14:56:11 +0000 (22:56 +0800)]
regulator: Convert max8997 to get_voltage_sel
Also rename get_current_limit and set_current_limit callbacks
to max8997_get_current_limit and max8997_set_current_limit for
better readability.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Tue, 17 Apr 2012 13:51:47 +0000 (14:51 +0100)]
mfd: Revert "mfd: add irq domain support for max8997 interrupts"
This reverts commit
98d8618af37728f6e18e84110ddb99987b47dd12 as it
breaks the build of the muic driver.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Tue, 17 Apr 2012 10:06:50 +0000 (18:06 +0800)]
regulator: max8660: Fix a memory leak due to missing devm_kzalloc conversion
commit 4d26f7 "regulator: max8660: Use devm_kzalloc()" missed to
replace kzalloc by devm_kzalloc. Fix it.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Thomas Abraham [Sat, 24 Mar 2012 09:49:49 +0000 (15:19 +0530)]
mfd: add irq domain support for max8997 interrupts
Add irq domain support for max8997 interrupts. The reverse mapping method
used is linear mapping since the sub-drivers of max8997 such as regulator
and charger drivers can use the max8997 irq_domain to get the linux irq
number for max8997 interrupts. All uses of irq_base in platform data and
max8997 driver private data are removed.
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Mon, 16 Apr 2012 08:54:24 +0000 (09:54 +0100)]
regulator: da9052: Directly include of.h
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Sun, 15 Apr 2012 10:29:29 +0000 (11:29 +0100)]
regulator: wm8994: Convert to set_voltage_sel()
There's no need to implement set_voltage() as there is only a very small
range of selectors for the regulators in the WM8994 and the voltages are
not expected to vary frequently at runtime.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Ying-Chun Liu (PaulLiu) [Fri, 13 Apr 2012 13:37:41 +0000 (21:37 +0800)]
regulator: da9052: add device tree support
This patch adds device tree support for dialog regulators
Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Liam Girdwood <lrg@ti.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: Ashish Jangam <ashish.jangam@kpitcummins.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Wed, 11 Apr 2012 15:08:27 +0000 (23:08 +0800)]
regulator: max8660: Use devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Wed, 11 Apr 2012 15:06:47 +0000 (23:06 +0800)]
regulator: max1586: Use devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Wed, 11 Apr 2012 15:05:49 +0000 (23:05 +0800)]
regulator: isl6271a-regulator: Use devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Wed, 11 Apr 2012 05:59:14 +0000 (13:59 +0800)]
regulator: Convert max8998 to set_voltage_time_sel
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Wed, 11 Apr 2012 05:58:09 +0000 (13:58 +0800)]
regulator: Convert max8998 to get_voltage_sel
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Wed, 11 Apr 2012 03:07:17 +0000 (11:07 +0800)]
regulator: twl-regulator: Use twlreg_grp helper function
Since the twlreg_grp helper function is there, use it.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Wed, 11 Apr 2012 03:05:57 +0000 (11:05 +0800)]
regulator: twl-regulator: Implement enable_time callback
Let regulator core do the necessary delay for us.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Fri, 13 Apr 2012 07:32:05 +0000 (15:32 +0800)]
regulator: Update regulator_register() API signature in Documentation
commit
c172708 "regulator: core: Use a struct to pass in regulator runtime
configuration" changed the regulator_register() API signature.
Update the Documentation accordingly to reflect the change in the function
signature.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Wed, 11 Apr 2012 09:19:12 +0000 (10:19 +0100)]
regulator: Appease smatch in regulator_register()
We don't support missing configs at all so segfaulting isn't that bad
but since we've got checks in the code move the dereference after them.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Wed, 11 Apr 2012 06:40:18 +0000 (14:40 +0800)]
regulator: Convert tps65xxx regulator drivers to use devm_kzalloc
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Tue, 10 Apr 2012 14:45:01 +0000 (22:45 +0800)]
regulator: Convert anatop to use a struct to pass in regulator runtime configuration
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Tue, 10 Apr 2012 15:07:52 +0000 (23:07 +0800)]
regulator: twl-regulator: Fix off-by-one vsel setting in twl6030smps_set_voltage
commit 268a1 "regulator: twl-regulator: Use DIV_ROUND_UP at appropriate places"
introduced an off-by-one bug for setting vsel.
The linear calculation code in twl6030smps_list_voltage() does subtract index
by 1 so we need the vsel++ after DIV_ROUND_UP.
The original code use this trick to differentiate if we are going to set the
voltage to 0 or the voltage falls within the linear calculation range.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Sat, 7 Apr 2012 15:31:44 +0000 (23:31 +0800)]
regulator: tps65023: Use devm_* APIs
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Sat, 7 Apr 2012 15:29:56 +0000 (23:29 +0800)]
regulator: tps62360: Convert to devm_regmap_init_i2c()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Sat, 7 Apr 2012 15:28:28 +0000 (23:28 +0800)]
regulator: max8649: Use devm_* APIs
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Mon, 9 Apr 2012 15:35:10 +0000 (23:35 +0800)]
regulator: twl-regulator: Use DIV_ROUND_UP at appropriate places
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Mon, 9 Apr 2012 14:32:49 +0000 (22:32 +0800)]
regulator: twl-regulator: Simplify the code matching regulator id
This patch makes the code easier to read.
Also add checking the case when no desc id is matched. This is required because
if no desc id is matched, the poiner info is pointed to twl_of_match[i].data
which may be not NULL. Checking info is NULL or not latter does not catch the
error.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Tue, 10 Apr 2012 06:21:01 +0000 (14:21 +0800)]
regulator: max8998: Use simple equation to get selector
It's more efficient to get the best selector by simple equation.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Tue, 10 Apr 2012 06:20:03 +0000 (14:20 +0800)]
regulator: max8997: Use simple equation to get selector
It's more efficient to get the best selector by simple equation.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Tue, 10 Apr 2012 06:22:38 +0000 (14:22 +0800)]
regulator: max8997: Remove n_bits from struct voltage_map_desc
The n_bits is only used in max8997_get_voltage_proper_val to check the valid
range for variable i.
Current code already ensures min_vol never greater than desc->max,
which means the variable i always in the valid range:
0 .. (desc->max - desc->min)/desc->step.
Thus we can remove the checking (i >= (1 << desc->n_bits) and then remove
n_bits from struct voltage_map_desc.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Tue, 10 Apr 2012 06:08:19 +0000 (14:08 +0800)]
regulator: Replace regulator_desc_[ldo|buck] by s5m8767_regulator_desc macro
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Sangbeom Kim <sbkim73@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Tue, 10 Apr 2012 06:07:15 +0000 (14:07 +0800)]
regulator: Use one s5m8767_ops for both LDOs and BUCKs
All the callback function implementation are the same for both LDOs and BUCKs.
Merge them to one s5m8767_ops.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Sangbeom Kim <sbkim73@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Tue, 10 Apr 2012 06:05:44 +0000 (14:05 +0800)]
regulator: Rework s5m8767_set_voltage to support both LDOs and BUCKs
s5m8767_set_voltage not only implement set_voltage callbacks for LDOs,
but also for BUCKs when s5m8767->buck_gpioindex is not set.
s5m8767_set_voltage_buck actually only for buck[2|3|4] when
s5m8767->buck_gpioindex is set.
Conditionally calling s5m8767_set_voltage in s5m8767_set_voltage_buck makes
the code hard to read.
I think merging s5m8767_set_voltage_buck and s5m8767_set_voltage actually
simplifies things. It's easy to use buck234_vol pointer to differentiate if
we need to control voltage for buck[2|3|4] by DVS GPIOs.
This patch reworks s5m8767_set_voltage to support both LDOx and BUCKx in all
cases.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Sangbeom Kim <sbkim73@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Tue, 10 Apr 2012 08:52:59 +0000 (09:52 +0100)]
Merge tag 'v3.4-rc2' into regulator-drivers
Linux 3.4-rc2 contains some fixes that further patches depend upon.
Axel Lin [Tue, 10 Apr 2012 05:51:06 +0000 (13:51 +0800)]
regulator: Fix build error for mc13783 and mc13892
Convert mc13783 and mc13892 to use a struct to pass in regulator runtime
configuration.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Tue, 10 Apr 2012 05:49:24 +0000 (13:49 +0800)]
regulator: Fix a typo in da903x.c
Fix below build errors which is introduced by commit
c172708
"regulator: core: Use a struct to pass in regulator runtime configuration".
CC drivers/regulator/da903x.o
drivers/regulator/da903x.c: In function 'da903x_regulator_probe':
drivers/regulator/da903x.c:541: error: 'conifg' undeclared (first use in this function)
drivers/regulator/da903x.c:541: error: (Each undeclared identifier is reported only once
drivers/regulator/da903x.c:541: error: for each function it appears in.)
make[2]: *** [drivers/regulator/da903x.o] Error 1
make[1]: *** [drivers/regulator] Error 2
make: *** [drivers] Error 2
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Tue, 10 Apr 2012 08:36:34 +0000 (09:36 +0100)]
regulator: Fix build of ab8500
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Tue, 3 Apr 2012 23:50:22 +0000 (00:50 +0100)]
regulator: core: Use a struct to pass in regulator runtime configuration
Rather than adding new arguments to regulator_register() every time we
want to add a new bit of dynamic information at runtime change the function
to take these via a struct. By doing this we avoid needing to do further
changes like the recent addition of device tree support which required each
regulator driver to be updated to take an additional parameter.
The regulator_desc which should (mostly) be static data is still passed
separately as most drivers are able to configure this statically at build
time.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Mon, 9 Apr 2012 11:30:21 +0000 (12:30 +0100)]
Merge branch 'regulator-register' into regulator-drivers
Linus Torvalds [Sun, 8 Apr 2012 01:30:41 +0000 (18:30 -0700)]
Linux 3.4-rc2
Linus Torvalds [Sat, 7 Apr 2012 16:56:00 +0000 (09:56 -0700)]
Merge tag 'regmap-3.4-fixes' of git://git./linux/kernel/git/broonie/regmap
Pull two more small regmap fixes from Mark Brown:
- Now we have users for it that aren't running Android it turns out
that regcache_sync_region() is much more useful to drivers if it's
exported for use by modules. Who knew?
- Make sure we don't divide by zero when doing debugfs dumps of
rbtrees, not visible up until now because everything was providing at
least some cache on startup.
* tag 'regmap-3.4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
regmap: prevent division by zero in rbtree_show
regmap: Export regcache_sync_region()
Linus Torvalds [Sat, 7 Apr 2012 16:53:33 +0000 (09:53 -0700)]
Merge branch 'kvm-updates/3.4' of git://git./virt/kvm/kvm
Pull a few KVM fixes from Avi Kivity:
"A bunch of powerpc KVM fixes, a guest and a host RCU fix (unrelated),
and a small build fix."
* 'kvm-updates/3.4' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
KVM: Resolve RCU vs. async page fault problem
KVM: VMX: vmx_set_cr0 expects kvm->srcu locked
KVM: PMU: Fix integer constant is too large warning in kvm_pmu_set_msr()
KVM: PPC: Book3S: PR: Fix preemption
KVM: PPC: Save/Restore CR over vcpu_run
KVM: PPC: Book3S HV: Save and restore CR in __kvmppc_vcore_entry
KVM: PPC: Book3S HV: Fix kvm_alloc_linear in case where no linears exist
KVM: PPC: Book3S: Compile fix for ppc32 in HIOR access code
Linus Torvalds [Sat, 7 Apr 2012 16:52:46 +0000 (09:52 -0700)]
Merge tag 'sh-for-linus' of git://github.com/pmundt/linux-sh
Pull SuperH fixes from Paul Mundt.
* tag 'sh-for-linus' of git://github.com/pmundt/linux-sh:
sh: fix clock-sh7757 for the latest sh_mobile_sdhi driver
serial: sh-sci: use serial_port_in/out vs sci_in/out.
sh: vsyscall: Fix up .eh_frame generation.
sh: dma: Fix up device attribute mismatch from sysdev fallout.
sh: dwarf unwinder depends on SHcompact.
sh: fix up fallout from system.h disintegration.
Linus Torvalds [Sat, 7 Apr 2012 16:51:36 +0000 (09:51 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jmorris/linux-security
Pull security layer fixlet from James Morris.
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
sysctl: fix write access to dmesg_restrict/kptr_restrict
Linus Torvalds [Sat, 7 Apr 2012 02:56:04 +0000 (19:56 -0700)]
Merge branch 'release' of git://git./linux/kernel/git/lenb/linux
Pull ACPI & Power Management patches from Len Brown:
"Two fixes for cpuidle merge-window changes, plus a URL fix in
MAINTAINERS"
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux:
MAINTAINERS: Update git url for ACPI
cpuidle: Fix panic in CPU off-lining with no idle driver
ACPI processor: Use safe_halt() rather than halt() in acpi_idle_play_dead()
Linus Torvalds [Sat, 7 Apr 2012 02:54:26 +0000 (19:54 -0700)]
Merge branch '3.4-rc-fixes' of git://git./linux/kernel/git/nab/target-pending
Pull target fixes from Nicholas Bellinger:
"Pull two tcm_fc fabric related fixes for -rc2:
Note that both have been CC'ed to stable, and patch #1 is the
important one that addresses a memory corruption bug related to FC
exchange timeouts + command abort.
Thanks again to MDR for tracking down this issue!"
* '3.4-rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
tcm_fc: Do not free tpg structure during wq allocation failure
tcm_fc: Add abort flag for gracefully handling exchange timeout
Mark Rustad [Tue, 3 Apr 2012 17:24:52 +0000 (10:24 -0700)]
tcm_fc: Do not free tpg structure during wq allocation failure
Avoid freeing a registered tpg structure if an alloc_workqueue call
fails. This fixes a bug where the failure was leaking memory associated
with se_portal_group setup during the original core_tpg_register() call.
Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Acked-by: Kiran Patil <Kiran.patil@intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Mark Rustad [Tue, 3 Apr 2012 17:24:41 +0000 (10:24 -0700)]
tcm_fc: Add abort flag for gracefully handling exchange timeout
Add abort flag and use it to terminate processing when an exchange
is timed out or is reset. The abort flag is used in place of the
transport_generic_free_cmd function call in the reset and timeout
cases, because calling that function in that context would free
memory that was in use. The aborted flag allows the lifetime to
be managed in a more normal way, while truncating the processing.
This change eliminates a source of memory corruption which
manifested in a variety of ugly ways.
(nab: Drop unused struct fc_exch *ep in ft_recv_seq)
Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Acked-by: Kiran Patil <Kiran.patil@intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Len Brown [Sat, 7 Apr 2012 01:48:59 +0000 (21:48 -0400)]
Merge branches 'idle-fix' and 'misc' into release
Igor Murzov [Fri, 30 Mar 2012 18:40:12 +0000 (22:40 +0400)]
MAINTAINERS: Update git url for ACPI
Signed-off-by: Igor Murzov <e-mail@date.by>
Signed-off-by: Len Brown <len.brown@intel.com>
Linus Torvalds [Sat, 7 Apr 2012 00:56:20 +0000 (17:56 -0700)]
Merge branch 'stable' of git://git./linux/kernel/git/cmetcalf/linux-tile
Pull arch/tile bug fixes from Chris Metcalf:
"This includes Paul Gortmaker's change to fix the <asm/system.h>
disintegration issues on tile, a fix to unbreak the tilepro ethernet
driver, and a backlog of bugfix-only changes from internal Tilera
development over the last few months.
They have all been to LKML and on linux-next for the last few days.
The EDAC change to MAINTAINERS is an oddity but discussion on the
linux-edac list suggested I ask you to pull that change through my
tree since they don't have a tree to pull edac changes from at the
moment."
* 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile: (39 commits)
drivers/net/ethernet/tile: fix netdev_alloc_skb() bombing
MAINTAINERS: update EDAC information
tilepro ethernet driver: fix a few minor issues
tile-srom.c driver: minor code cleanup
edac: say "TILEGx" not "TILEPro" for the tilegx edac driver
arch/tile: avoid accidentally unmasking NMI-type interrupt accidentally
arch/tile: remove bogus performance optimization
arch/tile: return SIGBUS for addresses that are unaligned AND invalid
arch/tile: fix finv_buffer_remote() for tilegx
arch/tile: use atomic exchange in arch_write_unlock()
arch/tile: stop mentioning the "kvm" subdirectory
arch/tile: export the page_home() function.
arch/tile: fix pointer cast in cacheflush.c
arch/tile: fix single-stepping over swint1 instructions on tilegx
arch/tile: implement panic_smp_self_stop()
arch/tile: add "nop" after "nap" to help GX idle power draw
arch/tile: use proper memparse() for "maxmem" options
arch/tile: fix up locking in pgtable.c slightly
arch/tile: don't leak kernel memory when we unload modules
arch/tile: fix bug in delay_backoff()
...
Linus Torvalds [Sat, 7 Apr 2012 00:54:53 +0000 (17:54 -0700)]
Merge tag 'stable/for-linus-3.4-rc1-tag' of git://git./linux/kernel/git/konrad/xen
Pull xen fixes from Konrad Rzeszutek Wilk:
"Two fixes for regressions:
* one is a workaround that will be removed in v3.5 with proper fix in
the tip/x86 tree,
* the other is to fix drivers to load on PV (a previous patch made
them only load in PVonHVM mode).
The rest are just minor fixes in the various drivers and some cleanup
in the core code."
* tag 'stable/for-linus-3.4-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
xen/pcifront: avoid pci_frontend_enable_msix() falsely returning success
xen/pciback: fix XEN_PCI_OP_enable_msix result
xen/smp: Remove unnecessary call to smp_processor_id()
xen/x86: Workaround 'x86/ioapic: Add register level checks to detect bogus io-apic entries'
xen: only check xen_platform_pci_unplug if hvm
Linus Torvalds [Sat, 7 Apr 2012 00:22:23 +0000 (17:22 -0700)]
Merge tag 'mmc-fixes-for-3.4-rc2' of git://git./linux/kernel/git/cjb/mmc
Pull MMC fixes from Chris Ball:
- Disable use of MSI in sdhci-pci, which caused multiple chipsets to
stop working in 3.4-rc1. I'll wait to turn this on again until we
have a chipset whitelist for it.
- Fix a libertas SDIO powered-resume regression introduced in 3.3;
thanks to Neil Brown and Rafael Wysocki for this fix.
- Fix module reloading on omap_hsmmc.
- Stop trusting the spec/card's specified maximum data timeout length,
and use three seconds instead. Previously we used 300ms.
Also cleanups and fixes for s3c, atmel, sh_mmcif and omap_hsmmc.
* tag 'mmc-fixes-for-3.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc: (28 commits)
mmc: use really long write timeout to deal with crappy cards
mmc: sdhci-dove: Fix compile error by including module.h
mmc: Prevent 1.8V switch for SD hosts that don't support UHS modes.
Revert "mmc: sdhci-pci: Add MSI support"
Revert "mmc: sdhci-pci: add quirks for broken MSI on O2Micro controllers"
mmc: core: fix power class selection
mmc: omap_hsmmc: fix module re-insertion
mmc: omap_hsmmc: convert to module_platform_driver
mmc: omap_hsmmc: make it behave well as a module
mmc: omap_hsmmc: trivial cleanups
mmc: omap_hsmmc: context save after enabling runtime pm
mmc: omap_hsmmc: use runtime put sync in probe error patch
mmc: sdio: Use empty system suspend/resume callbacks at the bus level
mmc: bus: print bus speed mode of UHS-I card
mmc: sdhci-pci: add quirks for broken MSI on O2Micro controllers
mmc: sh_mmcif: Simplify calculation of mmc->f_min
mmc: sh_mmcif: mmc->f_max should be half of the bus clock
mmc: sh_mmcif: double clock speed
mmc: block: Remove use of mmc_blk_set_blksize
mmc: atmel-mci: add support for odd clock dividers
...
Linus Torvalds [Fri, 6 Apr 2012 20:54:56 +0000 (13:54 -0700)]
Make the "word-at-a-time" helper functions more commonly usable
I have a new optimized x86 "strncpy_from_user()" that will use these
same helper functions for all the same reasons the name lookup code uses
them. This is preparation for that.
This moves them into an architecture-specific header file. It's
architecture-specific for two reasons:
- some of the functions are likely to want architecture-specific
implementations. Even if the current code happens to be "generic" in
the sense that it should work on any little-endian machine, it's
likely that the "multiply by a big constant and shift" implementation
is less than optimal for an architecture that has a guaranteed fast
bit count instruction, for example.
- I expect that if architectures like sparc want to start playing
around with this, we'll need to abstract out a few more details (in
particular the actual unaligned accesses). So we're likely to have
more architecture-specific stuff if non-x86 architectures start using
this.
(and if it turns out that non-x86 architectures don't start using
this, then having it in an architecture-specific header is still the
right thing to do, of course)
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Toshi Kani [Sun, 1 Apr 2012 03:37:02 +0000 (21:37 -0600)]
cpuidle: Fix panic in CPU off-lining with no idle driver
Fix a NULL pointer dereference panic in cpuidle_play_dead() during
CPU off-lining when no cpuidle driver is registered. A cpuidle
driver may be registered at boot-time based on CPU type. This patch
allows an off-lined CPU to enter HLT-based idle in this condition.
Signed-off-by: Toshi Kani <toshi.kani@hp.com>
Cc: Boris Ostrovsky <boris.ostrovsky@amd.com>
Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Tested-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Linus Torvalds [Fri, 6 Apr 2012 17:37:38 +0000 (10:37 -0700)]
Merge git://git./linux/kernel/git/davem/net
Pull networking updates from David Miller:
1) Fix inaccuracies in network driver interface documentation, from Ben
Hutchings.
2) Fix handling of negative offsets in BPF JITs, from Jan Seiffert.
3) Compile warning, locking, and refcounting fixes in netfilter's
xt_CT, from Pablo Neira Ayuso.
4) phonet sendmsg needs to validate user length just like any other
datagram protocol, fix from Sasha Levin.
5) Ipv6 multicast code uses wrong loop index, from RongQing Li.
6) Link handling and firmware fixes in bnx2x driver from Yaniv Rosner
and Yuval Mintz.
7) mlx4 erroneously allocates 4 pages at a time, regardless of page
size, fix from Thadeu Lima de Souza Cascardo.
8) SCTP socket option wasn't extended in a backwards compatible way,
fix from Thomas Graf.
9) Add missing address change event emissions to bonding, from Shlomo
Pongratz.
10) /proc/net/dev regressed because it uses a private offset to track
where we are in the hash table, but this doesn't track the offset
pullback that the seq_file code does resulting in some entries being
missed in large dumps.
Fix from Eric Dumazet.
11) do_tcp_sendpage() unloads the send queue way too fast, because it
invokes tcp_push() when it shouldn't. Let the natural sequence
generated by the splice paths, and the assosciated MSG_MORE
settings, guide the tcp_push() calls.
Otherwise what goes out of TCP is spaghetti and doesn't batch
effectively into GSO/TSO clusters.
From Eric Dumazet.
12) Once we put a SKB into either the netlink receiver's queue or a
socket error queue, it can be consumed and freed up, therefore we
cannot touch it after queueing it like that.
Fixes from Eric Dumazet.
13) PPP has this annoying behavior in that for every transmit call it
immediately stops the TX queue, then calls down into the next layer
to transmit the PPP frame.
But if that next layer can take it immediately, it just un-stops the
TX queue right before returning from the transmit method.
Besides being useless work, it makes several facilities unusable, in
particular things like the equalizers. Well behaved devices should
only stop the TX queue when they really are full, and in PPP's case
when it gets backlogged to the downstream device.
David Woodhouse therefore fixed PPP to not stop the TX queue until
it's downstream can't take data any more.
14) IFF_UNICAST_FLT got accidently lost in some recent stmmac driver
changes, re-add. From Marc Kleine-Budde.
15) Fix link flaps in ixgbe, from Eric W. Multanen.
16) Descriptor writeback fixes in e1000e from Matthew Vick.
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (47 commits)
net: fix a race in sock_queue_err_skb()
netlink: fix races after skb queueing
doc, net: Update ndo_start_xmit return type and values
doc, net: Remove instruction to set net_device::trans_start
doc, net: Update netdev operation names
doc, net: Update documentation of synchronisation for TX multiqueue
doc, net: Remove obsolete reference to dev->poll
ethtool: Remove exception to the requirement of holding RTNL lock
MAINTAINERS: update for Marvell Ethernet drivers
bonding: properly unset current_arp_slave on slave link up
phonet: Check input from user before allocating
tcp: tcp_sendpages() should call tcp_push() once
ipv6: fix array index in ip6_mc_add_src()
mlx4: allocate just enough pages instead of always 4 pages
stmmac: re-add IFF_UNICAST_FLT for dwmac1000
bnx2x: Clear MDC/MDIO warning message
bnx2x: Fix BCM57711+BCM84823 link issue
bnx2x: Clear BCM84833 LED after fan failure
bnx2x: Fix BCM84833 PHY FW version presentation
bnx2x: Fix link issue for BCM8727 boards.
...
Axel Lin [Thu, 5 Apr 2012 06:07:36 +0000 (14:07 +0800)]
regulator: Convert rc5t583 to set_voltage
Not every regulator driver should implement set_voltage_sel callback.
See commit
e8eef82
"regulator: Provide a selector based set_voltage_sel() operation".
For rc5t583, the regulator voltage can be mapped onto selector values with a
simple calculation, thus implement set_voltage is better than set_voltage_sel.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Jan Beulich [Mon, 2 Apr 2012 14:22:39 +0000 (15:22 +0100)]
xen/pcifront: avoid pci_frontend_enable_msix() falsely returning success
The original XenoLinux code has always had things this way, and for
compatibility reasons (in particular with a subsequent pciback
adjustment) upstream Linux should behave the same way (allowing for two
distinct error indications to be returned by the backend).
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Jan Beulich [Mon, 2 Apr 2012 14:32:22 +0000 (15:32 +0100)]
xen/pciback: fix XEN_PCI_OP_enable_msix result
Prior to 2.6.19 and as of 2.6.31, pci_enable_msix() can return a
positive value to indicate the number of vectors (less than the amount
requested) that can be set up for a given device. Returning this as an
operation value (secondary result) is fine, but (primary) operation
results are expected to be negative (error) or zero (success) according
to the protocol. With the frontend fixed to match the XenoLinux
behavior, the backend can now validly return zero (success) here,
passing the upper limit on the number of vectors in op->value.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Srivatsa S. Bhat [Thu, 22 Mar 2012 12:59:24 +0000 (18:29 +0530)]
xen/smp: Remove unnecessary call to smp_processor_id()
There is an extra and unnecessary call to smp_processor_id()
in cpu_bringup(). Remove it.
Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Konrad Rzeszutek Wilk [Tue, 20 Mar 2012 19:04:18 +0000 (15:04 -0400)]
xen/x86: Workaround 'x86/ioapic: Add register level checks to detect bogus io-apic entries'
The above mentioned patch checks the IOAPIC and if it contains
-1, then it unmaps said IOAPIC. But under Xen we get this:
BUG: unable to handle kernel NULL pointer dereference at
0000000000000040
IP: [<
ffffffff8134e51f>] xen_irq_init+0x1f/0xb0
PGD 0
Oops: 0002 [#1] SMP
CPU 0
Modules linked in:
Pid: 1, comm: swapper/0 Not tainted 3.2.10-3.fc16.x86_64 #1 Dell Inc. Inspiron
1525 /0U990C
RIP: e030:[<
ffffffff8134e51f>] [<
ffffffff8134e51f>] xen_irq_init+0x1f/0xb0
RSP: e02b:
ffff8800d42cbb70 EFLAGS:
00010202
RAX:
0000000000000000 RBX:
00000000ffffffef RCX:
0000000000000001
RDX:
0000000000000040 RSI:
00000000ffffffef RDI:
0000000000000001
RBP:
ffff8800d42cbb80 R08:
ffff8800d6400000 R09:
0000000000000000
R10:
0000000000000000 R11:
0000000000000000 R12:
00000000ffffffef
R13:
0000000000000001 R14:
0000000000000001 R15:
0000000000000010
FS:
0000000000000000(0000) GS:
ffff8800df5fe000(0000) knlGS:
0000000000000000
CS: e033 DS: 0000 ES: 0000 CR0:
000000008005003b
CR2:
0000000000000040 CR3:
0000000001a05000 CR4:
0000000000002660
DR0:
0000000000000000 DR1:
0000000000000000 DR2:
0000000000000000
DR3:
0000000000000000 DR6:
00000000ffff0ff0 DR7:
0000000000000400
Process swapper/0 (pid: 1, threadinfo
ffff8800d42ca000, task
ffff8800d42d0000)
Stack:
00000000ffffffef 0000000000000010 ffff8800d42cbbe0 ffffffff8134f157
ffffffff8100a9b2 ffffffff8182ffd1 00000000000000a0 00000000829e7384
0000000000000002 0000000000000010 00000000ffffffff 0000000000000000
Call Trace:
[<
ffffffff8134f157>] xen_bind_pirq_gsi_to_irq+0x87/0x230
[<
ffffffff8100a9b2>] ? check_events+0x12+0x20
[<
ffffffff814bab42>] xen_register_pirq+0x82/0xe0
[<
ffffffff814bac1a>] xen_register_gsi.part.2+0x4a/0xd0
[<
ffffffff814bacc0>] acpi_register_gsi_xen+0x20/0x30
[<
ffffffff8103036f>] acpi_register_gsi+0xf/0x20
[<
ffffffff8131abdb>] acpi_pci_irq_enable+0x12e/0x202
[<
ffffffff814bc849>] pcibios_enable_device+0x39/0x40
[<
ffffffff812dc7ab>] do_pci_enable_device+0x4b/0x70
[<
ffffffff812dc878>] __pci_enable_device_flags+0xa8/0xf0
[<
ffffffff812dc8d3>] pci_enable_device+0x13/0x20
The reason we are dying is b/c the call acpi_get_override_irq() is used,
which returns the polarity and trigger for the IRQs. That function calls
mp_find_ioapics to get the 'struct ioapic' structure - which along with the
mp_irq[x] is used to figure out the default values and the polarity/trigger
overrides. Since the mp_find_ioapics now returns -1 [b/c the IOAPIC is filled
with 0xffffffff], the acpi_get_override_irq() stops trying to lookup in the
mp_irq[x] the proper INT_SRV_OVR and we can't install the SCI interrupt.
The proper fix for this is going in v3.5 and adds an x86_io_apic_ops
struct so that platforms can override it. But for v3.4 lets carry this
work-around. This patch does that by providing a slightly different variant
of the fake IOAPIC entries.
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Igor Mammedov [Tue, 27 Mar 2012 17:31:08 +0000 (19:31 +0200)]
xen: only check xen_platform_pci_unplug if hvm
commit
b9136d207f08
xen: initialize platform-pci even if xen_emul_unplug=never
breaks blkfront/netfront by not loading them because of
xen_platform_pci_unplug=0 and it is never set for PV guest.
Signed-off-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Eric Dumazet [Fri, 6 Apr 2012 08:49:10 +0000 (10:49 +0200)]
net: fix a race in sock_queue_err_skb()
As soon as an skb is queued into socket error queue, another thread
can consume it, so we are not allowed to reference skb anymore, or risk
use after free.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Axel Lin [Fri, 6 Apr 2012 00:26:06 +0000 (08:26 +0800)]
regulator: max8649: Constify regulator_desc
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Fri, 6 Apr 2012 00:24:27 +0000 (08:24 +0800)]
regulator: max1586: Constify regulator_desc
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Fri, 6 Apr 2012 00:31:51 +0000 (08:31 +0800)]
regulator: tps65217: Constify regulator_desc
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: AnilKumar Ch <anilkumar@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Fri, 6 Apr 2012 00:30:42 +0000 (08:30 +0800)]
regulator: tps6105x: Constify regulator_desc
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Fri, 6 Apr 2012 00:29:49 +0000 (08:29 +0800)]
regulator: max8952: Constify regulator_desc
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Fri, 6 Apr 2012 00:26:59 +0000 (08:26 +0800)]
regulator: max8660: Constify regulator_desc
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Mon, 26 Mar 2012 01:30:06 +0000 (09:30 +0800)]
regulator: Convert twl4030ldo_set_voltage to set_voltage_sel
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Laxman Dewangan [Fri, 6 Apr 2012 05:28:33 +0000 (10:58 +0530)]
regulator: rc5t583: Correct MODULE LICENSE to GPL v2
Fixing build issue reported by Paul Gortmaker:
It appears this breaks linux-next allmodconfig build, because it
uses an uppercase V in the v2 of its MODULE_LICENSE.
FATAL: modpost: GPL-incompatible module rc5t583-regulator.ko uses
GPL-only symbol 'platform_driver_unregister'
make[2]: *** [__modpost] Error 1
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Fri, 6 Apr 2012 00:01:36 +0000 (08:01 +0800)]
regulator: rc5t583: Simplify RC5T583_REG macro
Simplify RC5T583_REG macro by removing _vout_reg and _ds_reg parameters.
The naming for vout_reg and deepsleep_reg can be replaced by:
.vout_reg = RC5T583_REG_##_id##DAC,
.deepsleep_reg = RC5T583_REG_##_id##DAC_DS,
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Eric Dumazet [Thu, 5 Apr 2012 22:17:46 +0000 (22:17 +0000)]
netlink: fix races after skb queueing
As soon as an skb is queued into socket receive_queue, another thread
can consume it, so we are not allowed to reference skb anymore, or risk
use after free.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ben Hutchings [Thu, 5 Apr 2012 14:40:25 +0000 (14:40 +0000)]
doc, net: Update ndo_start_xmit return type and values
Commit
dc1f8bf68b311b1537cb65893430b6796118498a ('netdev: change
transmit to limited range type') changed the required return type and
9a1654ba0b50402a6bd03c7b0fe9b0200a5ea7b1 ('net: Optimize
hard_start_xmit() return checking') changed the valid numerical
return values.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ben Hutchings [Thu, 5 Apr 2012 14:40:06 +0000 (14:40 +0000)]
doc, net: Remove instruction to set net_device::trans_start
Commit
08baf561083bc27a953aa087dd8a664bb2b88e8e ('net:
txq_trans_update() helper') made it unnecessary for most drivers to
set net_device::trans_start (or netdev_queue::trans_start).
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ben Hutchings [Thu, 5 Apr 2012 14:39:47 +0000 (14:39 +0000)]
doc, net: Update netdev operation names
Commits
d314774cf2cd5dfeb39a00d37deee65d4c627927 ('netdev: network
device operations infrastructure') and
008298231abbeb91bc7be9e8b078607b816d1a4a ('netdev: add more functions
to netdevice ops') moved and renamed net device operation pointers.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ben Hutchings [Thu, 5 Apr 2012 14:39:30 +0000 (14:39 +0000)]
doc, net: Update documentation of synchronisation for TX multiqueue
Commits
e308a5d806c852f56590ffdd3834d0df0cbed8d7 ('netdev: Add
netdev->addr_list_lock protection.') and
e8a0464cc950972824e2e128028ae3db666ec1ed ('netdev: Allocate multiple
queues for TX.') introduced more fine-grained locks.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ben Hutchings [Thu, 5 Apr 2012 14:39:10 +0000 (14:39 +0000)]
doc, net: Remove obsolete reference to dev->poll
Commit
bea3348eef27e6044b6161fd04c3152215f96411 ('[NET]: Make NAPI
polling independent of struct net_device objects.') removed the
automatic disabling of NAPI polling by dev_close(), and drivers
must now do this themselves.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ben Hutchings [Thu, 5 Apr 2012 14:38:49 +0000 (14:38 +0000)]
ethtool: Remove exception to the requirement of holding RTNL lock
Commit
e52ac3398c3d772d372b9b62ab408fd5eec96840 ('net: Use device
model to get driver name in skb_gso_segment()') removed the only
in-tree caller of ethtool ops that doesn't hold the RTNL lock.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Linus Torvalds [Fri, 6 Apr 2012 05:13:39 +0000 (22:13 -0700)]
Merge tag 'fixes-for-linus' of git://git./linux/kernel/git/arm/arm-soc
Pull "ARM: SoC fixes: from Olof Johansson:
"A bunch of fixes for regressions (and a few other problems) in
3.4-rc1:
- Fix for regression of mach/io.h cleanup on platforms with PCI or
PCMCIA (adding back the include file on those for now)
- AT91 fixes for usb and spi
- smsc911x ethernet fixes for i.MX
- smsc911x fixes for OMAP
- gpio fixes for Tegra
- A handful of build error and warning fixes for various platforms
- cpufreq kconfig dependencies, build and lowlevel debug fixes for
Samsung platforms
In other words, more or less the regular collection of -rc1/2 type
material. A few of them, in particular the smsc911x for OMAP series,
aren't technically regressions for 3.4, but they're valid fixes and
we're still relatively early in the rc cycle so it seems appropriate
to include them."
* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (60 commits)
ARM: fix __io macro for PCMCIA
ARM: EXYNOS: Fix compiler warning in dma.c file
ARM: EXYNOS: fix ISO C90 warning
ARM: OMAP2+: hwmod: Fix wrong SYSC_TYPE1_XXX_MASK bit definitions
ARM: OMAP2+: hwmod: Make omap_hwmod_softreset wait for reset status
ARM: OMAP2+: hwmod: Restore sysc after a reset
ARM: OMAP2+: omap_hwmod: Allow io_ring wakeup configuration for all modules
ARM: OMAP3: clock data: fill in some missing clockdomains
ARM: OMAP4: clock data: Force a DPLL clkdm/pwrdm ON before a relock
ARM: OMAP4: clock data: fix mult and div mask for USB_DPLL
ARM: OMAP2+: powerdomain: Wait for powerdomain transition in pwrdm_state_switch()
gpio: tegra: Iterate over the correct number of banks
gpio: tegra: fix register address calculations for Tegra30
EXYNOS: fix dependency for EXYNOS_CPUFREQ
ARM: at91: dt: remove unit-address part for memory nodes
ARM: at91: fix check of valid GPIO for SPI and USB
USB: ehci-atmel: add needed of.h header file
ARM: at91/NAND DT bindings: add comments
ARM: at91/at91sam9x5.dtsi: fix NAND ale/cle in DT file
USB: ohci-at91: trivial return code name change
...
Linus Torvalds [Fri, 6 Apr 2012 04:38:51 +0000 (21:38 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/lliubbo/blackfin
Pull a few blackfin compile fixes from Bob Liu.
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lliubbo/blackfin:
blackfin: update defconfig for bf527-ezkit
blackfin: gpio: fix compile error if !CONFIG_GPIOLIB
blackfin: fix L1 data A overflow link issue
Bob Liu [Thu, 5 Apr 2012 02:40:35 +0000 (10:40 +0800)]
blackfin: update defconfig for bf527-ezkit
To fix compile error:
drivers/usb/musb/blackfin.h:51:3: error: #error "Please use PIO mode in MUSB
driver on bf52x chip v0.0 and v0.1"
make[4]: *** [drivers/usb/musb/blackfin.o] Error 1
Signed-off-by: Bob Liu <lliubbo@gmail.com>
Bob Liu [Tue, 27 Mar 2012 03:27:15 +0000 (11:27 +0800)]
blackfin: gpio: fix compile error if !CONFIG_GPIOLIB
Add __gpio_get_value()/__gpio_set_value() to fix compile error if
CONFIG_GPIOLIB = n.
Signed-off-by: Bob Liu <lliubbo@gmail.com>
Mike Frysinger [Wed, 28 Mar 2012 03:43:02 +0000 (11:43 +0800)]
blackfin: fix L1 data A overflow link issue
This patch fix below compile error:
"bfin-uclinux-ld: L1 data A overflow!"
It is due to the recent lib/gen_crc32table.c change:
46c5801eaf86e83cb3a4142ad35188db5011fff0
crc32: bolt on crc32c
it added 8KiB more data to __cacheline_aligned which cause blackfin L1 data
cache overflow.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
Linus Torvalds [Fri, 6 Apr 2012 00:34:30 +0000 (17:34 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jikos/apm
Pull an APM fix from Jiri Kosina:
"One deadlock/race fix from Niel that got introduced when we were
moving away from freezer_*_count() to wait_event_freezable()."
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/apm:
APM: fix deadlock in APM_IOC_SUSPEND ioctl
Paul Walmsley [Mon, 12 Mar 2012 10:58:00 +0000 (04:58 -0600)]
mmc: use really long write timeout to deal with crappy cards
Several people have noticed that crappy SD cards take much longer to
complete multiple block writes than the 300ms that Linux specifies.
Try to work around this by using a three second write timeout instead.
This is a generalized version of a patch from Chase Maupin
<Chase.Maupin@ti.com>, whose patch description said:
* With certain SD cards timeouts like the following have been seen
due to an improper calculation of the dto value:
mmcblk0: error -110 transferring data, sector
4126233, nr 8,
card status 0xc00
* By removing the dto calculation and setting the timeout value
to the maximum specified by the SD card specification part A2
section 2.2.15 these timeouts can be avoided.
* This change has been used by beagleboard users as well as the
Texas Instruments SDK without a negative impact.
* There are multiple discussion threads about this but the most
relevant ones are:
* http://talk.maemo.org/showthread.php?p=
1000707#post1000707
* http://www.mail-archive.com/linux-omap@vger.kernel.org/msg42213.html
* Original proposal for this fix was done by Sukumar Ghoral of
Texas Instruments
* Tested using a Texas Instruments AM335x EVM
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Tested-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Alf Høgemark [Wed, 4 Apr 2012 16:27:09 +0000 (12:27 -0400)]
mmc: sdhci-dove: Fix compile error by including module.h
This patch fixes a compile error in drivers/mmc/host/sdhci-dove.c
by including the linux/module.h file.
Signed-off-by: Alf Høgemark <alf@i100.no>
Cc: <stable@vger.kernel.org>
Signed-off-by: Chris Ball <cjb@laptop.org>