Commit Graph

322204 Commits (dedae957a41b4f4523199f7a822ee4e5735640b0)

Author SHA1 Message Date
Randy Dunlap dedae957a4 regulator: fix kernel-doc warnings in drivers/regulator/core.c
Fix regulator kernel-doc warnings:

Warning(drivers/regulator/core.c:2308): No description found for parameter 'rdev'
Warning(drivers/regulator/core.c:2308): Excess function parameter 'regulator' description in 'regulator_set_voltage_time_sel'

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Cc:	Liam Girdwood <lrg@ti.com>
Cc:	Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-28 11:00:30 -07:00
Linus Walleij a0a7014cd4 regulator: ab8500: provide per-regulator shift
This encodes the voltage shifts (the number of bits to shift
the register to get to the selector) into the regulator info.
We have several new variants of the AB8500 so this varies a
lot.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-28 11:00:30 -07:00
Stephen Warren db55168265 regulator: max8907: fix compile error when !CONFIG_OF
Fix the following:

  CC [M]  drivers/regulator/max8907-regulator.o
drivers/regulator/max8907-regulator.c: In function 'max8907_regulator_probe':
drivers/regulator/max8907-regulator.c:297:12: error: 'max8907_matches' undeclared (first use in this function)

by removing direct references to max8907_matches[], which only exists when
CONFIG_OF is defined.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-28 11:00:29 -07:00
Axel Lin 0764ef5916 regulator: max8907: Properly set pmic pointer in max8907_regulator_remove()
Add missing platform_get_drvdata() call in max8907_regulator_remove(), this
fixes below build warning:

  CC [M]  drivers/regulator/max8907-regulator.o
drivers/regulator/max8907-regulator.c: In function 'max8907_regulator_remove':
drivers/regulator/max8907-regulator.c:353:23: warning: 'pmic' is used uninitialized in this function [-Wuninitialized]

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-28 11:00:29 -07:00
Axel Lin 7305608bc8 regulator: max8907: Fix n_voltages for MAX8907B SD1
For linear voltage mapping, the n_voltages is (max - min) / step + 1

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-28 11:00:28 -07:00
Stephen Rothwell 8f52a5800a regulator: using kfree() requires including slab.h
Fixes this build error:

drivers/regulator/twl-regulator.c: In function 'twlreg_probe':
drivers/regulator/twl-regulator.c:1229:3: error: implicit declaration of function 'kfree' [-Werror=implicit-function-declaration]

Also added string.h for kmemdup().

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-28 11:00:28 -07:00
Gyungoh Yoo ffee19091a regulator: add MAX8907 driver
The MAX8907 is an I2C-based power-management IC containing voltage
regulators, a reset controller, a real-time clock, and a touch-screen
controller.

The original driver was written by:
* Gyungoh Yoo <jack.yoo@maxim-ic.com>

Various fixes and enhancements by:
* Jin Park <jinyoungp@nvidia.com>
* Tom Cherry <tcherry@nvidia.com>
* Prashant Gaikwad <pgaikwad@nvidia.com>
* Dan Willemsen <dwillemsen@nvidia.com>
* Laxman Dewangan <ldewangan@nvidia.com>

During upstreaming, I (swarren):
* Converted to regmap.
* Allowed probing from device tree.
* Reworked the regulator driver to be represented as a single device that
  provides multiple regulators, rather than as a device per regulator.
* Replaced many regulator ops with standard functions.
* Added ability to specify supplies for each regulator.
* Removed the WLED regulator. If/when we expose this in the driver, it
  should be a backlight object not a regulator object.
* Renamed from max8907c->max8907, since the driver covers at least the
  C and B revisions.
* General cleanup.

Signed-off-by: Gyungoh Yoo <jack.yoo@maxim-ic.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-28 11:00:28 -07:00
Arnd Bergmann 0ffff5a60f regulator: twl: make twl_info tables const
I currently carry the series to make of_device_id->data const in the
arm-soc tree, which fixes a number of issues, but leaves one new
compiler warning about the twl-regulator driver:

drivers/regulator/twl-regulator.c: In function 'twlreg_probe':
drivers/regulator/twl-regulator.c:1130:8: warning: assignment discards 'const'
qualifier from pointer target type [enabled by default]
drivers/regulator/twl-regulator.c:1139:9: warning: assignment discards 'const'
qualifier from pointer target type [enabled by default]

The warning indicates that the driver takes a static table with
initialization data for each regulator, modifies the data in place
and passes a pointer to that structure to the regulator_register
function. This is probably ok because a system contains only one
instance of each regulator, but it's still bad style because any
driver should be written to support multiple instances of the same
hardware.

This patch changes the code to dynamically allocate the memory
we pass to the regulator core so the table can be constant.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-28 11:00:28 -07:00
Axel Lin f9cfbde723 regulator: twl: Remove get_voltage implementation for single voltage regulators
This is not required after commit f7df20ec
"regulator: core: Use list_voltage() to read single voltage regulators"

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-28 11:00:28 -07:00
Axel Lin 9c7fde4e80 regulator: isl6271a: Remove get_voltage implementation for isl_fixed_ops
This is not required after commit f7df20ec
"regulator: core: Use list_voltage() to read single voltage regulators"

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-28 11:00:27 -07:00
Axel Lin 0d3fb582dc regulator: ab8500: Remove get_voltage implementation for ab8500_regulator_fixed_ops
This is not required after commit f7df20ec
"regulator: core: Use list_voltage() to read single voltage regulators"

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-28 11:00:27 -07:00
Axel Lin 88348effd6 regulator: ab3100: Remove get_voltage implementation for regulator_ops_fixed
This is not required after commit f7df20ec
"regulator: core: Use list_voltage() to read single voltage regulators"

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-28 11:00:27 -07:00
Axel Lin b571dc38d4 regulator: mc13xxx: Remove get_voltage implementation for single voltage regulators
This is not required after commit f7df20ec
"regulator: core: Use list_voltage() to read single voltage regulators"

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-28 11:00:27 -07:00
Axel Lin 89009e1888 regulator: Update comment for set_current_limit callback of struct regulator_ops
The regulators should be tending to the maximum in the available range and
consumers should specify the widest range possible.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-28 11:00:27 -07:00
Axel Lin 19d23c21a6 regulator: da9052: set_current_limit should select the maximum current in specific range
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-28 11:00:26 -07:00
Axel Lin 4e1d67eddf regulator: lp872x: set_current_limit should select the maximum current in specific range
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-28 11:00:26 -07:00
Axel Lin 73f4f3d376 regulator: tps6524x: set_current_limit should select the maximum current in specific range
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-28 11:00:26 -07:00
Axel Lin 422294deee regulator: wm831x-dcdc: set_current_limit should select the maximum current in specific range
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-28 11:00:26 -07:00
Axel Lin cb44cdeacd regulator: max77686: Use array to save pointer to rdev
MAX77686_REGULATORS is known in compile time.
Use array to save pointer to rdev makes the code simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-28 11:00:26 -07:00
Axel Lin 2c58e2669f regulator: max77686: initialize of_node param for regulator register
Initialize config.of_node for regulator before registering.
This is needed for DT based regulator support.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-28 11:00:25 -07:00
Axel Lin 7fee2afb53 regulator: ab8500: Set enable enable_time in regulator_desc
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-28 11:00:25 -07:00
Axel Lin 4001376ef2 regulator: wm8400: Simplify set REGULATOR_MODE_IDLE mode in wm8400_dcdc_set_mode
To set REGULATOR_MODE_IDLE mode, what we do is to clear DC1_ACTIVE and
DC1_SLEEP bits, this can be done in one wm8400_set_bits() call.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-28 11:00:25 -07:00
Axel Lin 363506cd71 regulator: wm831x-ldo: Check return value of wm831x_reg_read()
wm831x_reg_read() returns negative error code on failure.
This prevents using the error code as the value read.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-28 11:00:25 -07:00
Axel Lin 7c7475c009 regulator: tps6586x: Convert to regulator_[enable|disable|is_enabled|get_voltage_sel]_regmap
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-28 11:00:25 -07:00
Axel Lin 0f4c46d2e2 regulator: Use BUCK_FPWM_[MASK|SHIFT] macros to replace buck_pmap table
Below is the buck_pmap mapping table:

BUCK1:  mask = 1 << 0,  shift = 0
BUCK2:  mask = 1 << 1,  shift = 1
BUCK3:  mask = 1 << 2,  shift = 2
BUCK4:  mask = 1 << 3,  shift = 3

The mask and shift can be easily calculated by:
        mask = 1 << BUCK_ID
        shift = BUCK_ID

This patch defines BUCK_FPWM_MASK and BUCK_FPWM_SHIFT macros to replace
buck_pmap mapping table.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Tested-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-28 11:00:24 -07:00
Axel Lin c42ea5cdfb regulator: lp8788-buck: Remove lp8788_set_default_dvs_ctrl_mode function
We already know the mask in lp8788_init_dvs() function, and we can update
the corresponding bit for default_dvs_mode in lp8788_init_dvs() function.
This function looks not necessary to me.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Tested-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-28 11:00:24 -07:00
Axel Lin 74c8cfdaa6 regulator: lp8788-ldo: Set n_voltages to 1 for fixed voltage
For fixed voltage, the n_voltages should be 1 rather than 0.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-28 11:00:24 -07:00
Axel Lin f1dcf9e4ed regulator: mc13892: Convert mc13892_sw_regulator_ops to get_voltage_sel
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-28 11:00:24 -07:00
Axel Lin 8db98440fa regulator: mc13892: Simplify implementation of mc13892_sw_regulator_set_voltage_sel()
Use mc13xxx_reg_rmw rather than a mc13xxx_reg_read and a mc13xxx_reg_write calls.

This logic to set MC13892_SWITCHERS0_SWxHI bit is pretty simple:

if (volt > 1375000)
        set MC13892_SWITCHERS0_SWxHI bit
else if (volt < 1100000)
        clear MC13892_SWITCHERS0_SWxHI bit
else
        leave MC13892_SWITCHERS0_SWxHI bit untouched

We already know the selector, so we don't need to calculate the selector again.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-28 11:00:24 -07:00
Axel Lin 825d105910 regulator: mc13892: Make mc13892_powermisc_rmw() lock protected
Then we can remove lock/unlock around the caller.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-28 11:00:23 -07:00
Axel Lin 2a2c3ac0a5 regulator: mc13783: Make mc13783_powermisc_rmw() lock protected
Then we can remove lock/unlock around the caller.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-28 11:00:16 -07:00
Axel Lin 4a247a961a regulator: palmas: Convert palmas_ops_ldo to [get|set]_voltage_sel_regmap
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-28 11:00:16 -07:00
Axel Lin 38f8f43cba regulator: twl: Convert twlsmps_ops to get_voltage_sel and map_voltage
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-28 11:00:16 -07:00
Axel Lin 78292f4ed2 regulator: twl: Fix checking voltage range in twl6030smps_set_voltage()
The voltage selection logic is supposed to find the samllest voltage falls
within specified range. When using equation to calculate vsel, we need to
ensure the requested min_uV meet the range of using the equation.
Otherwise we may select a voltage that is out of specified range.

For example, in the case vsel = 62 means select voltage of 2100000uV.
What we want is to ensure the requested min_uV <= 2100000 rather than checking
max_uV >= 2100000. And this also means in the case min_uV > 2100000, vsel = 62
does not meet the request.

Also calling twl6030smps_list_voltage() for all cases to ensure the selected
voltage still in bounds.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-28 11:00:15 -07:00
Axel Lin 13407ea802 regulator: mc13xxx: Populate selector from mc13xxx_fixed_regulator_set_voltage
This was missing until now and the underlying
_regulator_do_set_voltage is using this value when calling list_voltage.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-28 11:00:15 -07:00
Axel Lin ad46ed14ca regulator: s2mps11: Use array to save pointer to rdev
The number of regulator is known at compile time, use array to save pointer to
rdev makes the code simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-28 11:00:15 -07:00
Linus Torvalds fea7a08acb Linux 3.6-rc3 2012-08-22 13:29:06 -07:00
Linus Torvalds 4ff63e47f7 Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Pull drm fixes from Dave Airlie:
 "Intel: edid fixes, power consumption fix, s/r fix, haswell fix

  Radeon: BIOS loading fixes for UEFI and Thunderbolt machines, better
  MSAA validation, lockup timeout fixes, modesetting fixes

  One udl dpms fix, one vmwgfx fix, a couple of trivial core changes.

  There is an export added to ACPI as part of the radeon bios fixes.

  I've also included the fbcon flashing cursor vs deinit race fix, that
  seems the simplest place to start"

Trivial conflict in drivers/video/console/fbcon.c due to me having
already applied the fbcon flashing cursor vs deinit race fix, and Dave
had added a comment in there too.

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (22 commits)
  fbcon: fix race condition between console lock and cursor timer (v1.1)
  drm: Add missing static storage class specifiers in drm_proc.c file
  drm/udl: dpms off the crtc when disabled.
  drm: Remove two unused fields from struct drm_display_mode
  drm: stop vmgfx driver explosion
  drm/radeon/ss: use num_crtc rather than hardcoded 6
  Revert "drm/radeon: fix bo creation retry path"
  drm/i915: use hsw rps tuning values everywhere on gen6+
  drm/radeon: split ATRM support out from the ATPX handler (v3)
  drm/radeon: convert radeon vfct code to use acpi_get_table_with_size
  ACPI: export symbol acpi_get_table_with_size
  drm/radeon: implement ACPI VFCT vbios fetch (v3)
  drm/radeon/kms: extend the Fujitsu D3003-S2 board connector quirk to cover later silicon stepping
  drm/radeon: fix checking of MSAA renderbuffers on r600-r700
  drm/radeon: allow CMASK and FMASK in the CS checker on r600-r700
  drm/radeon: init lockup timeout on ring init
  drm/radeon: avoid turning off spread spectrum for used pll
  drm/i915: fall back to bit-banging if GMBUS fails in CRT EDID reads
  drm/i915: extract connector update from intel_ddc_get_modes() for reuse
  drm/i915: fix hsw uncached pte
  ...
2012-08-22 10:45:13 -07:00
Linus Torvalds 0923699436 Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
Pull SCSI target fixes from Nicholas Bellinger:
 "The executive summary includes:

   - Post-merge review comments for tcm_vhost (MST + nab)
   - Avoid debugging overhead when not debugging for tcm-fc(FCoE) (MDR)
   - Fix NULL pointer dereference bug on alloc_page failulre (Yi Zou)
   - Fix REPORT_LUNs regression bug with pSCSI export (AlexE + nab)
   - Fix regression bug with handling of zero-length data CDBs (nab)
   - Fix vhost_scsi_target structure alignment (MST)

  Thanks again to everyone who contributed a bugfix patch, gave review
  feedback on tcm_vhost code, and/or reported a bug during their own
  testing over the last weeks.

  There is one other outstanding bug reported by Roland recently related
  to SCSI transfer length overflow handling, for which the current
  proposed bugfix has been left in queue pending further testing with
  other non iscsi-target based fabric drivers.

  As the patch is verified with loopback (local SGL memory from SCSI
  LLD) + tcm_qla2xxx (TCM allocated SGL memory mapped to PCI HW) fabric
  ports, it will be included into the next 3.6-rc-fixes PULL request."

* git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
  target: Remove unused se_cmd.cmd_spdtl
  tcm_fc: rcu_deref outside rcu lock/unlock section
  tcm_vhost: Fix vhost_scsi_target structure alignment
  target: Fix regression bug with handling of zero-length data CDBs
  target/pscsi: Fix bug with REPORT_LUNs handling for SCSI passthrough
  tcm_vhost: Change vhost_scsi_target->vhost_wwpn to char *
  target: fix NULL pointer dereference bug alloc_page() fails to get memory
  tcm_fc: Avoid debug overhead when not debugging
  tcm_vhost: Post-merge review changes requested by MST
  tcm_vhost: Fix incorrect IS_ERR() usage in vhost_scsi_map_iov_to_sgl
2012-08-22 10:42:30 -07:00
Linus Torvalds 2e2d8c93ae Merge branch 'i2c-embedded/for-current' of git://git.pengutronix.de/git/wsa/linux
Pull i2c-embedded fixes from Wolfram Sang:
 "Some bugfixes for the "embedded" part of the I2C subsystem.  The fixes
  affect mostly drivers which have been largely reworked lately and
  where regressions appeared."

* 'i2c-embedded/for-current' of git://git.pengutronix.de/git/wsa/linux:
  i2c: tegra: protect suspend/resume callbacks with CONFIG_PM_SLEEP
  i2c: diolan-u2c: Fix master_xfer return code
  I2C: OMAP: xfer: fix runtime PM get/put balance on error
  i2c: nomadik: Add default configuration into the Nomadik I2C driver
2012-08-22 10:41:36 -07:00
Linus Torvalds fec3c03fb0 pwm: fixes for v3.6-rc3
These patches fix the Samsung PWM driver and perform some minor cleanups
 like fixing checkpatch and sparse warnings. Two redundant error messages
 are removed and the Kconfig help text for the PWM subsystem is made more
 descriptive.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQIcBAABAgAGBQJQNJEVAAoJEN0jrNd/PrOhuWMP+QHfkkRRetJXrBUq8YOISln3
 zPFh0oRgbd9679dIQ23Gzm8iFlD5bN8e4JBOleRGitv5ar6btqoS4F/AFRyCncOv
 cn7s2qdEQvXRF73gZwzUgwiTRBkf3dcYOdc2Y1GymzfQapIaEjsleC4nO3E0kkNf
 XpjaZGQZa1PNmrb93QsSuzuJtcemjFs9d2QA5YcB/EMJ/kCsz2/rpYv+q457rddS
 m/xBJyG4Q+CVSq7WxaK7X+opVx1amhALawUj+OgroW7y28HJhHt6UTZI1/zhL22B
 gZqxsdjKpU66CxHUUOz3olprGAXd2YIU3VFsRV8IcU1pZpCyJS3uGMueXwS21VC0
 OS3TxnaKNgOREidO22J6C3c5N2NZm9ERBLY3PMYVW0KWdeWzxJvwLRwpQoCUj0fm
 OpvmzqwxIKLcNgzppTEKXzFikwZcZZQ+zrZycoHxKSqu2YJtimrP59oqDUX69Wp3
 PBGrAZRU+uz9Zq18csidyL5DbLtIwEOILmMO/MnTuAQQ2z2avDTQ0xVzRPq51A/W
 QyYhStguxR0e4rHmD//lf695HywilZPUlj3aqVm4kCGaasWlRyinIOwPDuOUZuEw
 FcMb8+1tdNfu6mU0NgW8z3WajvG/p/pNPCMhtfsdwJTkHK5aB6sJJzFOJm7iVD8W
 F/IbEubPBu0k4RrQ/BIf
 =oTl5
 -----END PGP SIGNATURE-----

Merge tag 'for-3.6-rc3' of git://gitorious.org/linux-pwm/linux-pwm

Pull pwm fixes from Thierry Reding:
 "These patches fix the Samsung PWM driver and perform some minor
  cleanups like fixing checkpatch and sparse warnings.

  Two redundant error messages are removed and the Kconfig help text for
  the PWM subsystem is made more descriptive."

* tag 'for-3.6-rc3' of git://gitorious.org/linux-pwm/linux-pwm:
  pwm: Improve Kconfig help text
  pwm: core: Fix coding style issues
  pwm: vt8500: Fix coding style issue
  pwm: Remove a redundant error message when devm_request_and_ioremap fails
  pwm: samsung: add missing device pointer to struct pwm_chip
  pwm: Add missing static storage class specifiers in core.c file
2012-08-22 10:27:12 -07:00
Linus Torvalds f753c4ec15 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client
Pull ceph fixes from Sage Weil:
 "Jim's fix closes a narrow race introduced with the msgr changes.  One
  fix resolves problems with debugfs initialization that Yan found when
  multiple client instances are created (e.g., two clusters mounted, or
  rbd + cephfs), another one fixes problems with mounting a nonexistent
  server subdirectory, and the last one fixes a divide by zero error
  from unsanitized ioctl input that Dan Carpenter found."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
  ceph: avoid divide by zero in __validate_layout()
  libceph: avoid truncation due to racing banners
  ceph: tolerate (and warn on) extraneous dentry from mds
  libceph: delay debugfs initialization until we learn global_id
2012-08-22 09:58:05 -07:00
Linus Torvalds ad746be969 NFS client bugfixes for Linux 3.6
- NFSv3 mounts need to fail if the FSINFO rpc call fails
 - Ensure that the NFS commit cache gets torn down when we unload the
   NFS module.
 - Fix memory scribble issues when interrupting a LAYOUTGET rpc call
 - Fix NFSv4 legacy idmapper regressions
 - Fix issues with the NFSv4 getacl command
 - Fix a regression when using the legacy "mount -t nfs4"
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQNPyKAAoJEGcL54qWCgDyQlAP/AmnLaJmKMPj5P4GCiA/uxMV
 sr0XSSVAv+OgUtRxLNO5PDyunVIIEjwA5nGa2RZEG14+eYwNEeQehaGoaGqoKLhh
 ATOCMvHHEs5qSKLckWsZWflf6U/MLimYS3D/hHVUtP0QWbBMtol3ImABs2ht/VUc
 HW0wQoEG+5mhbhC87d4ku5E+OHQzYeNNmdX2VkKOmT0CwRd/bfsHxlGwMmcHldP2
 TSge+MRhoKNycpy0j7nugHj2pZ12UiX+O8371OlAketnPk0OA+6RNGMyNo49IQAn
 VEN9MFWc4ypH1+hJ0OvhzmUA6Zn2/lyQXUtwM1DcXeBmLI4aClb3bT3G3xKNh09O
 yLEvkh2aUUlmoTSgP7vDK/Ui3QwVnsaJULvg+gywQJG6qTSFgUQfErNKgJmabHQb
 d0EuumlSGnJ7qdC5nmrUp+M/CpbfGh15ax/JnTRGVK7C3jeCm18vc2np+z4EUDp/
 USzrvuBu1B8eI0nQNoht0BeNf7sEJGgFIn8BJzxDakP8buXPMqEvFwA8c1JmMeBX
 E6pbG2jHqPdrTJtxQTpMRqhA0MxbFlVNi5cCs6U7ifiBqbRWEXyNVgAHTwoIxIrn
 ASbL0s8gZH+EMEXNOmPmFiO2NUjBCeSzAjrsTmSpWa13YmGfiroZN8N/iPzLnFf+
 FR3SFUnoJHq7x4uLZoAX
 =lqfh
 -----END PGP SIGNATURE-----

Merge tag 'nfs-for-3.6-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs

Pull NFS client bugfixes from Trond Myklebust:
 - NFSv3 mounts need to fail if the FSINFO rpc call fails
 - Ensure that the NFS commit cache gets torn down when we unload the
   NFS module.
 - Fix memory scribble issues when interrupting a LAYOUTGET rpc call
 - Fix NFSv4 legacy idmapper regressions
 - Fix issues with the NFSv4 getacl command
 - Fix a regression when using the legacy "mount -t nfs4"

* tag 'nfs-for-3.6-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
  NFSv3: Ensure that do_proc_get_root() reports errors correctly
  NFSv4: Ensure that nfs4_alloc_client cleans up on error.
  NFS: return -ENOKEY when the upcall fails to map the name
  NFS: Clear key construction data if the idmap upcall fails
  NFSv4: Don't use private xdr_stream fields in decode_getacl
  NFSv4: Fix the acl cache size calculation
  NFSv4: Fix pointer arithmetic in decode_getacl
  NFS: Alias the nfs module to nfs4
  NFS: Fix a regression when loading the NFS v4 module
  NFSv4.1: Remove a bogus BUG_ON() in nfs4_layoutreturn_done
  pnfs-obj: Better IO pattern in case of unaligned offset
  NFS41: add pg_layout_private to nfs_pageio_descriptor
  pnfs: nfs4_proc_layoutget returns void
  pnfs: defer release of pages in layoutget
  nfs: tear down caches in nfs_init_writepagecache when allocation fails
2012-08-22 09:57:25 -07:00
Linus Torvalds 467e9e51d0 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull assorted fixes - mostly vfs - from Al Viro:
 "Assorted fixes, with an unexpected detour into vfio refcounting logics
  (fell out when digging in an analog of eventpoll race in there)."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  task_work: add a scheduling point in task_work_run()
  fs: fix fs/namei.c kernel-doc warnings
  eventpoll: use-after-possible-free in epoll_create1()
  vfio: grab vfio_device reference *before* exposing the sucker via fd_install()
  vfio: get rid of vfio_device_put()/vfio_group_get_device* races
  vfio: get rid of open-coding kref_put_mutex
  introduce kref_put_mutex()
  vfio: don't dereference after kfree...
  mqueue: lift mnt_want_write() outside ->i_mutex, clean up a bit
2012-08-22 09:56:06 -07:00
Eric Dumazet 88ec2789d8 task_work: add a scheduling point in task_work_run()
It seems commit 4a9d4b02 (switch fput to task_work_add) reintroduced
the problem addressed in commit 944be0b2 (close_files(): add scheduling
point)

If a server process with a lot of files (say 2 million tcp sockets)
is killed, we can spend a lot of time in task_work_run() and trigger
a soft lockup.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-08-22 10:31:05 -04:00
Randy Dunlap 55852635a8 fs: fix fs/namei.c kernel-doc warnings
Fix kernel-doc warnings in fs/namei.c:

Warning(fs/namei.c:360): No description found for parameter 'inode'
Warning(fs/namei.c:672): No description found for parameter 'nd'

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Cc:	Alexander Viro <viro@zeniv.linux.org.uk>
Cc:	linux-fsdevel@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-08-22 10:30:10 -04:00
Al Viro 98022748f6 eventpoll: use-after-possible-free in epoll_create1()
As soon as we'd installed the file into descriptor table, it can
get closed by another thread.  Freeing ep in process...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-08-22 10:26:55 -04:00
Al Viro 31605debdf vfio: grab vfio_device reference *before* exposing the sucker via fd_install()
It's not critical (anymore) since another thread closing the file will block
on ->device_lock before it gets to dropping the final reference, but it's
definitely cleaner that way...

Acked-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-08-22 10:26:42 -04:00
Al Viro 90b1253e41 vfio: get rid of vfio_device_put()/vfio_group_get_device* races
we really need to make sure that dropping the last reference happens
under the group->device_lock; otherwise a loop (under device_lock)
might find vfio_device instance that is being freed right now, has
already dropped the last reference and waits on device_lock to exclude
the sucker from the list.

Acked-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-08-22 10:26:13 -04:00
Al Viro 6d2cd3ce81 vfio: get rid of open-coding kref_put_mutex
Acked-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-08-22 10:25:19 -04:00