Richard Zhao [Wed, 4 Jan 2012 03:07:29 +0000 (11:07 +0800)]
regulator: set constraints.apply_uV to 0 in of_get_fixed_voltage_config
Fix fixed regulator using DT failed to call regulator_register.
of_get_regulator_init_data set apply_uV to 1, but fixed regulator
doesn't need it. Set it back to 0.
Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Kevin Liu [Wed, 4 Jan 2012 07:12:04 +0000 (15:12 +0800)]
regulator: max8925: fix enabled/disabled judgement mistake
Max8925 ldo status should be determined by two factors:
1. power up/down sequence selection(LDOCTL[4:2]).
2. i2c enable bit(LDOCTL[0]).
Max8925 ldo support two types of power up/down sequence:
1. flexible sequence(LDOCTL[4:2] = 0~6).
2. i2c sequence(LDOCTL[4:2] = 7).
With flexible sequence selected, the ldo is enabled during power up by default.
With i2c sequence selected, the ldo is controlled by the i2c enable bit(LDOCTL[0]).
Signed-off-by: Kevin Liu <kliu5@marvell.com>
Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Donggeun Kim [Tue, 3 Jan 2012 07:22:03 +0000 (16:22 +0900)]
regulator: add regulator_bulk_force_disable function
This patch allows consumers to forcibly disable multiple regulator
clients in a single API call.
Signed-off-by: Donggeun Kim <dg77.kim@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Richard Zhao [Sat, 31 Dec 2011 12:51:16 +0000 (20:51 +0800)]
regulator: pass regulator_register of_node in fixed voltage driver
regulator_get needs of_node to find right regulator.
Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
MyungJoo Ham [Mon, 2 Jan 2012 09:49:32 +0000 (18:49 +0900)]
regulator: add regulator_force_disable() definition for !CONFIG_REGULATOR
regulator_force_disable() was omitted in consumer.h for
!CONFIG_REGULATOR case.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Laxman Dewangan [Mon, 2 Jan 2012 07:38:45 +0000 (13:08 +0530)]
regulator: Enable supply regulator if child rail is enabled.
During regulator_register, the rail is set on the provided
machine constraints and if it is enabled then it is also
require to enable the supply regulator. This will make sure
that:
1. Proper reference count for supply regulator to be maintain.
2. Supply regulator should be enable when given rail is enabled.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Fabio Estevam [Thu, 29 Dec 2011 22:05:00 +0000 (20:05 -0200)]
regulator: mc13892: Convert to devm_kzalloc()
Convert mc13892-regulator driver to use devm_kzalloc().
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Fabio Estevam [Thu, 29 Dec 2011 15:56:02 +0000 (13:56 -0200)]
regulator: mc13783: Convert to devm_kzalloc()
Convert mc13783-regulator driver to use devm_kzalloc().
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Thu, 29 Dec 2011 09:03:20 +0000 (17:03 +0800)]
regulator: Fix checking return value of create_regulator
create_regulator() returns NULL on fail.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Thu, 29 Dec 2011 09:02:08 +0000 (17:02 +0800)]
regulator: Fix the error handling if create_regulator fails
In the case of create_regulator() fails, goto the error path immediately.
It does not make sense to update rdev->open_count if create_regulator fails.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Wed, 28 Dec 2011 12:48:45 +0000 (12:48 +0000)]
regulator: Export regulator_is_supported_voltage()
It's part of the driver interface so should be available to modules.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Shawn Guo [Wed, 21 Dec 2011 15:00:46 +0000 (23:00 +0800)]
regulator: mc13892: add device tree probe support
It adds device tree probe support for mc13892-regulator driver.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Shawn Guo [Wed, 21 Dec 2011 15:00:45 +0000 (23:00 +0800)]
regulator: mc13892: remove the unnecessary prefix from regulator name
It's not really necessary to add a prefix 'MC13892__' for each mc13892
regulator name, since the chip must have been identified as mc13892
when we look at the regulator name.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Wed, 14 Dec 2011 18:11:14 +0000 (02:11 +0800)]
regulator: Convert wm831x regulator drivers to devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Tue, 20 Dec 2011 09:12:00 +0000 (17:12 +0800)]
regulator: da9052: Staticize non-exported symbols
da9052_regulator_info and da9053_regulator_info are not used outside
this driver so no need to make the symbol global.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Ashish Jangam [Thu, 15 Dec 2011 13:29:53 +0000 (18:59 +0530)]
regulator: Replace kzalloc with devm_kzalloc and if-else with a switch-case for da9052-regulator
Reported-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: David Dajun Chen <dchen@diasemi.com>
Signed-off-by: Ashish Jangam <ashish.jangam@kpitcummins.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Thu, 15 Dec 2011 07:03:38 +0000 (15:03 +0800)]
regulator: Update da9052-regulator for DT changes
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Ashish Jangam [Fri, 9 Dec 2011 14:18:20 +0000 (19:48 +0530)]
regulator: DA9052/53 Regulator support
The Dialog PMIC has below featured regulators:-
DA9052-BC - 4 DVS Buck converters 0.5V - 3.6V upto 1Amp.
DA9053-AA/BX - 4 DVS Buck converters 0.5V - 2.5V upto 3Amp.
DA9052/53 - 10 Programmable LDO's High PSSR, 1% accuracy.
This patch support all the DA9052 and Da9053 regulators. The output voltages are
fully programmable via I2C or SPI interface. The platform data with regulation
constraints is passed down from the board to the regulator.
Signed-off-by: David Dajun Chen <dchen@diasemi.com>
Signed-off-by: Ashish Jangam <ashish.jangam@kpitcummins.com>
Tested-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Mon, 5 Dec 2011 19:27:49 +0000 (19:27 +0000)]
Merge branch 'topic/dt' of git://git./linux/kernel/git/broonie/regulator into regulator-next
Shawn Guo [Thu, 1 Dec 2011 09:21:06 +0000 (17:21 +0800)]
regulator: pass device_node to of_get_regulator_init_data()
It's not always true that the device_node of regulator can be found
at dev->of_node at the time when of_get_regulator_init_data() is being
called, because in some cases the regulator nodes in device tree do
not have 'struct device' behind them until regulator_dev gets created
for it by core function regulator_register().
The patch adds device_node as a new parameter to
of_get_regulator_init_data(), so that caller can pass in the node of
regulator directly.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Mon, 5 Dec 2011 10:58:41 +0000 (10:58 +0000)]
regulator: If a single voltage is set with device tree then set apply_uV
Otherwise there is no way in the bindings to configure a fixed voltage
via software. It seems reasonable to assume that if the binding explicitly
specifies a voltage we want to actually use that voltage.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Rajendra Nayak [Mon, 5 Dec 2011 07:17:42 +0000 (12:47 +0530)]
regulator: Fix regulator_register() API signature in Documentation
The commit
2c043bcbf287 ("regulator: pass additional of_node to
regulator_register()") added an additional parameter to the
regulator_register() API.
Update the Documentation accordingly to reflect the change
in the function signature.
Reported-by: Thomas Abraham <thomas.abraham@linaro.org>
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Tue, 29 Nov 2011 18:11:19 +0000 (18:11 +0000)]
regulator: Allow regulators to register with no init_data
This allows read-only access to the device configuration which may be
useful for diagnostics.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Mark Brown [Mon, 28 Nov 2011 19:01:08 +0000 (19:01 +0000)]
Merge remote-tracking branches 'regulator/topic/dt' and 'regulator/for-linus' into regulator-next
Shawn Guo [Mon, 28 Nov 2011 13:37:16 +0000 (21:37 +0800)]
regulator: fix label names used in device tree bindings
Device tree compiler does not recognize '-' in label name. Instead,
'_' works fine.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tero Kristo [Mon, 28 Nov 2011 14:53:19 +0000 (16:53 +0200)]
regulator: twl: fix twl4030 support for smps regulators
SMPS regulator voltage control differs from the one of the LDO ones.
Current TWL code was using LDO regulator ops for controlling the SMPS
regulators, which fails. This was fixed fixed by adding separate
regulator type which uses correct logic and calculations for the
voltage levels.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
Mark Brown [Mon, 28 Nov 2011 14:50:45 +0000 (14:50 +0000)]
Merge remote-tracking branch 'regulator/for-linus' into regulator-next
Lothar Waßmann [Mon, 28 Nov 2011 14:38:37 +0000 (15:38 +0100)]
regulator: fix use after free bug
This is caused by dereferencing 'rdev' after device_unregister() in
the regulator_unregister() function. 'rdev' is freed by
device_unregister(), so it must not be dereferenced after this call.
[Edited commit message for legibility -- broonie]
Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Mon, 28 Nov 2011 11:49:56 +0000 (11:49 +0000)]
Merge remote-tracking branch 'regulator/for-linus' into regulator-next
Axel Lin [Mon, 28 Nov 2011 03:38:39 +0000 (11:38 +0800)]
regulator: Convert virtual and userspace regulator consumer drivers to use module_platform_driver()
This patch converts virtual and userspace regulator consumer drivers to use the
module_platform_driver() macro which makes the code smaller and a bit simpler.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Mon, 28 Nov 2011 06:07:48 +0000 (14:07 +0800)]
regulator: aat2870: Remove a redundant bitwise and operation
The implementation in aat2870_update() already did the bitwise and operation
against mask parameter.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Mon, 28 Nov 2011 06:06:31 +0000 (14:06 +0800)]
regulator: aat2870: Fix the logic of checking if no id is matched in aat2870_get_regulator
In current implementation, the pointer ri is not NULL if no id is matched.
Fix it by checking i == ARRAY_SIZE(aat2870_regulators) if no id is matched.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
Mark Brown [Sun, 27 Nov 2011 19:47:03 +0000 (19:47 +0000)]
Merge remote-tracking branch 'regulator/topic/dt' into regulator-next
Axel Lin [Sun, 27 Nov 2011 12:07:57 +0000 (20:07 +0800)]
regulator: Avoid potential NULL dereference in reg_fixed_voltage_probe()
of_get_fixed_voltage_config() may return NULL, return -ENOMEM in this case
so we don't dereference NULL pointer.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Sun, 27 Nov 2011 11:36:16 +0000 (11:36 +0000)]
Merge remote-tracking branch 'regulator/topic/dt' into regulator-next
Axel Lin [Sun, 27 Nov 2011 02:35:08 +0000 (10:35 +0800)]
regulator: Staticise of_get_fixed_voltage_config()
It is not used outside this driver so no need to make the symbol global.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Sat, 26 Nov 2011 12:19:19 +0000 (20:19 +0800)]
regulator: Checking return value of of_get_regulator_init_data
of_get_regulator_init_data() may return NULL, thus
check the return value to avoid NULL pointer dereference.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Sat, 26 Nov 2011 10:50:58 +0000 (18:50 +0800)]
regulator: export of_get_regulator_init_data
of_get_regulator_init_data is called in drivers/regulator/fixed.c
which could be a module.
Export of_get_regulator_init_data to fix below build error:
ERROR: "of_get_regulator_init_data" [drivers/regulator/fixed.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2
Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Thu, 24 Nov 2011 10:49:38 +0000 (10:49 +0000)]
Merge remote-tracking branch 'regulator/topic/dt' into regulator-next
Rajendra Nayak [Thu, 24 Nov 2011 07:27:17 +0000 (12:57 +0530)]
regulator: Fix compile break due to missing arguments to regulator_register
The commit
2c043bcbf287 ("regulator: pass additional of_node to
regulator_register()") caused a compile break because it missed
updating the regulator_register() call in gpio-regulator.c with
the additional parameter (NULL).
The compile break as reported by Stephen Rothwell with the
x86_64 allmodconfig looked like this
drivers/regulator/gpio-regulator.c: In function 'gpio_regulator_probe':
drivers/regulator/gpio-regulator.c:287:8: error: too few arguments to function 'regulator_register'
include/linux/regulator/driver.h:215:23: note: declared here
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Linus Torvalds [Thu, 24 Nov 2011 04:20:28 +0000 (20:20 -0800)]
Linux 3.2-rc3
Linus Torvalds [Thu, 24 Nov 2011 04:19:31 +0000 (20:19 -0800)]
Merge git://github.com/rustyrussell/linux
* git://github.com/rustyrussell/linux:
virtio-pci: make reset operation safer
virtio-mmio: Correct the name of the guest features selector
virtio: add HAS_IOMEM dependency to MMIO platform bus driver
Michael S. Tsirkin [Thu, 17 Nov 2011 15:41:15 +0000 (17:41 +0200)]
virtio-pci: make reset operation safer
virtio pci device reset actually just does an I/O
write, which in PCI is really posted, that is it
can complete on CPU before the device has received it.
Further, interrupts might have been pending on
another CPU, so device callback might get invoked after reset.
This conflicts with how drivers use reset, which is typically:
reset
unregister
a callback running after reset completed can race with
unregister, potentially leading to use after free bugs.
Fix by flushing out the write, and flushing pending interrupts.
This assumes that device is never reset from
its vq/config callbacks, or in parallel with being
added/removed, document this assumption.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Sasha Levin [Tue, 15 Nov 2011 14:17:18 +0000 (16:17 +0200)]
virtio-mmio: Correct the name of the guest features selector
Guest features selector spelling mistake.
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: virtualization@lists.linux-foundation.org
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Heiko Carstens [Tue, 15 Nov 2011 09:13:24 +0000 (10:13 +0100)]
virtio: add HAS_IOMEM dependency to MMIO platform bus driver
Fix this compile error on s390:
CC [M] drivers/virtio/virtio_mmio.o
drivers/virtio/virtio_mmio.c: In function 'vm_get_features':
drivers/virtio/virtio_mmio.c:107:2: error: implicit declaration of function 'writel'
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Acked-by: Pawel Moll <pawel.moll@arm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Linus Torvalds [Thu, 24 Nov 2011 01:26:22 +0000 (17:26 -0800)]
Merge branch 'upstream-linus' of git://github.com/jgarzik/libata-dev
* 'upstream-linus' of git://github.com/jgarzik/libata-dev:
libata: fix build without BMDMA
[libata] ahci_platform: fix DT probing
Linus Torvalds [Wed, 23 Nov 2011 22:58:46 +0000 (14:58 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jbarnes/pci
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci:
PCI hotplug: shpchp: don't blindly claim non-AMD 0x7450 device IDs
PCI: pciehp: wait 100 ms after Link Training check
PCI: pciehp: wait 1000 ms before Link Training check
PCI: pciehp: Retrieve link speed after link is trained
PCI: Let PCI_PRI depend on PCI
PCI: Fix compile errors with PCI_ATS and !PCI_IOV
PCI / ACPI: Make acpiphp ignore root bridges using PCIe native hotplug
Linus Torvalds [Wed, 23 Nov 2011 22:28:13 +0000 (14:28 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tyhicks/ecryptfs
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs:
eCryptfs: Extend array bounds for all filename chars
eCryptfs: Flush file in vma close
eCryptfs: Prevent file create race condition
Tyler Hicks [Wed, 23 Nov 2011 17:31:24 +0000 (11:31 -0600)]
eCryptfs: Extend array bounds for all filename chars
From mhalcrow's original commit message:
Characters with ASCII values greater than the size of
filename_rev_map[] are valid filename characters.
ecryptfs_decode_from_filename() will access kernel memory beyond
that array, and ecryptfs_parse_tag_70_packet() will then decrypt
those characters. The attacker, using the FNEK of the crafted file,
can then re-encrypt the characters to reveal the kernel memory past
the end of the filename_rev_map[] array. I expect low security
impact since this array is statically allocated in the text area,
and the amount of memory past the array that is accessible is
limited by the largest possible ASCII filename character.
This patch solves the issue reported by mhalcrow but with an
implementation suggested by Linus to simply extend the length of
filename_rev_map[] to 256. Characters greater than 0x7A are mapped to
0x00, which is how invalid characters less than 0x7A were previously
being handled.
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Reported-by: Michael Halcrow <mhalcrow@google.com>
Cc: stable@kernel.org
Tyler Hicks [Mon, 21 Nov 2011 23:31:29 +0000 (17:31 -0600)]
eCryptfs: Flush file in vma close
Dirty pages weren't being written back when an mmap'ed eCryptfs file was
closed before the mapping was unmapped. Since f_ops->flush() is not
called by the munmap() path, the lower file was simply being released.
This patch flushes the eCryptfs file in the vm_ops->close() path.
https://launchpad.net/bugs/870326
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Cc: stable@kernel.org [2.6.39+]
Tyler Hicks [Mon, 21 Nov 2011 23:31:02 +0000 (17:31 -0600)]
eCryptfs: Prevent file create race condition
The file creation path prematurely called d_instantiate() and
unlock_new_inode() before the eCryptfs inode info was fully
allocated and initialized and before the eCryptfs metadata was written
to the lower file.
This could result in race conditions in subsequent file and inode
operations leading to unexpected error conditions or a null pointer
dereference while attempting to use the unallocated memory.
https://launchpad.net/bugs/813146
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Cc: stable@kernel.org
Mark Brown [Wed, 23 Nov 2011 18:50:59 +0000 (18:50 +0000)]
Merge remote-tracking branch 'regulator/topic/dt' into regulator-next
Mark Brown [Wed, 23 Nov 2011 18:48:57 +0000 (18:48 +0000)]
Merge branch 'for-linus' of git://git./linux/kernel/git/broonie/regulator into regulator-next
Rajendra Nayak [Fri, 18 Nov 2011 11:17:20 +0000 (16:47 +0530)]
regulator: map consumer regulator based on device tree
Device nodes in DT can associate themselves with one or more
regulators/supply by providing a list of phandles (to regulator nodes)
and corresponding supply names.
For Example:
devicenode: node@0x0 {
...
...
vmmc-supply = <®ulator1>;
vpll-supply = <®ulator2>;
};
The driver would then do a regulator_get(dev, "vmmc"); to get
regulator1 and do a regulator_get(dev, "vpll"); to get
regulator2.
of_get_regulator() extracts the regulator node for a given
device, based on the supply name.
Use it to look up the regulator for a given consumer from device tree, during
a regulator_get(). If not found fallback and lookup through
the regulator_map_list instead.
Also, since the regulator dt nodes can use the same binding to
associate with a parent regulator/supply, allow the drivers to
specify a supply_name, which can then be used to lookup dt
to find the parent phandle.
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Rajendra Nayak [Fri, 18 Nov 2011 11:17:19 +0000 (16:47 +0530)]
regulator: pass additional of_node to regulator_register()
With device tree support for regulators, its needed that the
regulator_dev->dev device has the right of_node attached.
To be able to do this add an additional parameter to the
regulator_register() api, wherein the dt-adapted driver can
then pass this additional info onto the regulator core.
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Rajendra Nayak [Fri, 18 Nov 2011 11:17:18 +0000 (16:47 +0530)]
regulator: adapt fixed regulator driver to dt
The fixed regulator driver uses of_get_fixed_voltage_config()
to extract fixed_voltage_config structure contents from device tree.
Also add documenation for additional bindings for fixed
regulators that can be passed through dt.
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Rajendra Nayak [Fri, 18 Nov 2011 11:17:17 +0000 (16:47 +0530)]
regulator: helper routine to extract regulator_init_data
The helper routine is meant to be used by the regulator drivers
to extract the regulator_init_data structure from the data
that is passed from device tree.
'consumer_supplies' which is part of regulator_init_data is not extracted
as the regulator consumer mappings are passed through DT differently,
implemented in subsequent patches.
Similarly the regulator<-->parent/supply mapping is handled in
subsequent patches.
Also add documentation for regulator bindings to be used to pass
regulator_init_data struct information from device tree.
Some of the regulator properties which are linux and board specific,
are left out since its not clear if they can
be in someway embedded into the kernel or passed in from DT.
They will be revisited later.
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Linus Torvalds [Wed, 23 Nov 2011 17:50:42 +0000 (09:50 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/rostedt/linux-ktest
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest:
ktest: Check parent options for iterated tests
Linus Torvalds [Wed, 23 Nov 2011 17:50:05 +0000 (09:50 -0800)]
Merge branch 'i2c-for-linus' of git://git./linux/kernel/git/jdelvare/staging
* 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
i2c: Make i2cdev_notifier_call static
i2c: Delete ANY_I2C_BUS
i2c: Fix device name for 10-bit slave address
i2c-algo-bit: Generate correct i2c address sequence for 10-bit target
Linus Torvalds [Wed, 23 Nov 2011 17:49:39 +0000 (09:49 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/broonie/regulator
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
regulator: TPS65910: Fix VDD1/2 voltage selector count
Linus Torvalds [Wed, 23 Nov 2011 17:47:25 +0000 (09:47 -0800)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (31 commits)
drm: integer overflow in drm_mode_dirtyfb_ioctl()
drivers/gpu/vga/vgaarb.c: add missing kfree
drm/radeon/kms/atom: unify i2c gpio table handling
drm/radeon/kms: fix up gpio i2c mask bits for r4xx for real
ttm: Don't return the bo reserved on error path
drm/radeon/kms: add a CS ioctl flag not to rewrite tiling flags in the CS
drm/i915: Fix inconsistent backlight level during disabled
drm, i915: Fix memory leak in i915_gem_busy_ioctl().
drm/i915: Use DPCD value for max DP lanes.
drm/i915: Initiate DP link training only on the lanes we'll be using
drm/i915: Remove trailing white space
drm/i915: Try harder during dp pattern 1 link training
drm/i915: Make DP prepare/commit consistent with DP dpms
drm/i915: Let panel power sequencing hardware do its job
drm/i915: Treat PCH eDP like DP in most places
drm/i915: Remove link_status field from intel_dp structure
drm/i915: Move common PCH_PP_CONTROL setup to ironlake_get_pp_control
drm/i915: Module parameters using '-1' as default must be signed type
drm/i915: Turn on another required clock gating bit on gen6.
drm/i915: Turn on a required 3D clock gating bit on Sandybridge.
...
Afzal Mohammed [Tue, 8 Nov 2011 13:24:10 +0000 (18:54 +0530)]
regulator: TPS65910: Fix VDD1/2 voltage selector count
Count of selector voltage is required for regulator_set_voltage
to work via set_voltage_sel. VDD1/2 currently have it as zero,
so regulator_set_voltage won't work for VDD1/2.
Update count (n_voltages) for VDD1/2.
Output Voltage = (step value * 12.5 mV + 562.5 mV) * gain
With above expr, number of voltages that can be selected is
step value count * gain count
constant for gain count will be called VDD1_2_NUM_VOLT_COARSE
existing constant for step value count is VDD1_2_NUM_VOLTS,
use VDD1_2_NUM_VOLT_FINE instead to make clear that step value
is not the only component in deciding selectable voltage count
Signed-off-by: Afzal Mohammed <afzal@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Wed, 2 Nov 2011 11:39:09 +0000 (11:39 +0000)]
regulator: Don't create voltage sysfs entries if we can't read voltage
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Wed, 2 Nov 2011 11:38:45 +0000 (11:38 +0000)]
regulator: Don't report zero volts for the fixed voltage regulator
If we don't know what voltage the regulator is set to return an error
rather than reporting zero volts.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Kyle Manna [Thu, 3 Nov 2011 17:08:06 +0000 (12:08 -0500)]
regulator: TPS65910: Create an array for init data
Create an array of fixed size for the platform to pass regulator
initalization data through.
Passing an array of pointers to init data also allows more flexible
definition of init data as well as prevents reading past the end of the
array should the platform define an incorrectly sized array.
Signed-off-by: Kyle Manna <kyle.manna@fuel7.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Kyle Manna [Thu, 3 Nov 2011 17:08:05 +0000 (12:08 -0500)]
regulator: TPS65910: Move regulator defs to header
Move the regulator defintions to the header so that platform board file
can use them to configure specific regulators.
Signed-off-by: Kyle Manna <kyle.manna@fuel7.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Jonghwan Choi [Mon, 24 Oct 2011 13:26:26 +0000 (22:26 +0900)]
regulator: max8649 Convert max8649 to use regmap api
Signed-off-by: Jonghwan Choi <jhbird.choi@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Jonghwan Choi [Sun, 6 Nov 2011 23:16:04 +0000 (08:16 +0900)]
regulator: Use regmap_read/write(), regmap_update_bits functions directly
Current driver had the regmapcalls within the bodies of the driver specific read/write fuctions.
This patch removes the original read/write functions and makes the call sites use regmap directly.
Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Shubhrajyoti D [Wed, 23 Nov 2011 10:33:07 +0000 (11:33 +0100)]
i2c: Make i2cdev_notifier_call static
The function i2cdev_notifier_call is used only in i2c-dev file
making it static.
Also removes the following sparse warning
drivers/i2c/i2c-dev.c:582:5: warning: symbol 'i2cdev_notifier_call'
was not declared. Should it be static?
Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Jean Delvare [Wed, 23 Nov 2011 10:33:07 +0000 (11:33 +0100)]
i2c: Delete ANY_I2C_BUS
Last piece of code using ANY_I2C_BUS was deleted almost 2 years ago,
so ANY_I2C_BUS can go away as well.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Jean Delvare [Wed, 23 Nov 2011 10:33:07 +0000 (11:33 +0100)]
i2c: Fix device name for 10-bit slave address
10-bit addresses overlap with traditional 7-bit addresses, leading in
device name collisions. Add an arbitrary offset to 10-bit addresses to
prevent this collision. The offset was chosen so that the address is
still easily recognizable.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Jeffrey (Sheng-Hui) Chu [Wed, 23 Nov 2011 10:33:07 +0000 (11:33 +0100)]
i2c-algo-bit: Generate correct i2c address sequence for 10-bit target
The wrong bits were put on the wire, fix that.
This fixes kernel bug #42562.
Signed-off-by: Sheng-Hui J. Chu <jeffchu@broadcom.com>
Cc: stable@kernel.org
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Xi Wang [Wed, 23 Nov 2011 06:12:01 +0000 (01:12 -0500)]
drm: integer overflow in drm_mode_dirtyfb_ioctl()
There is a potential integer overflow in drm_mode_dirtyfb_ioctl()
if userspace passes in a large num_clips. The call to kmalloc would
allocate a small buffer, and the call to fb->funcs->dirty may result
in a memory corruption.
Reported-by: Haogang Chen <haogangchen@gmail.com>
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
Linus Torvalds [Tue, 22 Nov 2011 23:09:20 +0000 (15:09 -0800)]
Revert "of/irq: of_irq_find_parent: check for parent equal to child"
This reverts commit
dc9372808412edbc653a675a526c2ee6c0c14a91.
As requested by Ben Herrenschmidt:
"This breaks some powerpc platforms at least. The practice of having
a node provide an explicit "interrupt-parent" property pointing to
itself is an old trick that we've used in the past to allow a
device-node to have interrupts routed to different controllers.
In that case, the node also contains an interrupt-map, so the node is
its own parent, the interrupt resolution hits the map, which then can
route each individual interrupt to a different parent."
Grant says:
"Ah, nuts, yes that is broken then. Yes, please revert the commit and
Rob & I will come up with a better solution.
Rob, I think it can be done by explicitly checking for np ==
desc->interrupt_parent in of_irq_init() instead of relying on
of_irq_find_parent() returning NULL."
Requested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: devicetree-discuss@lists.ozlabs.org
Cc: linuxppc-dev <linuxppc-dev@lists.ozlabs.org>
Cc: Tanmay Inamdar <tinamdar@apm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Tue, 22 Nov 2011 21:19:21 +0000 (13:19 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/viro/vfs
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
mount_subtree() pointless use-after-free
iio: fix a leak due to improper use of anon_inode_getfd()
microblaze: bury asm/namei.h
Julia Lawall [Tue, 15 Nov 2011 22:53:11 +0000 (14:53 -0800)]
drivers/gpu/vga/vgaarb.c: add missing kfree
kbuf is a buffer that is local to this function, so all of the error paths
leaving the function should release it.
Signed-off-by: Julia Lawall <julia@diku.dk>
Cc: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Alex Deucher [Mon, 21 Nov 2011 17:41:21 +0000 (12:41 -0500)]
drm/radeon/kms/atom: unify i2c gpio table handling
Split the quirks and i2c_rec assignment into separate
functions used by both radeon_lookup_i2c_gpio() and
radeon_atombios_i2c_init(). This avoids duplicating code
and cases where quirks were only added to one of the
functions.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Alex Deucher [Mon, 21 Nov 2011 17:10:14 +0000 (12:10 -0500)]
drm/radeon/kms: fix up gpio i2c mask bits for r4xx for real
Fixes i2c test failures when i2c_algo_bit.bit_test=1.
The hw doesn't actually require a mask, so just set it
to the default mask bits for r1xx-r4xx radeon ddc.
I missed this part the first time through.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@kernel.org
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Thomas Hellstrom [Mon, 21 Nov 2011 12:05:02 +0000 (13:05 +0100)]
ttm: Don't return the bo reserved on error path
An unlikely race could case a bo to be returned reserved on an error path.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Tue, 22 Nov 2011 20:01:00 +0000 (20:01 +0000)]
Merge branch 'drm-intel-fixes' of git://people.freedesktop.org/~keithp/linux into drm-fixes
* 'drm-intel-fixes' of git://people.freedesktop.org/~keithp/linux: (25 commits)
drm/i915: Fix inconsistent backlight level during disabled
drm, i915: Fix memory leak in i915_gem_busy_ioctl().
drm/i915: Use DPCD value for max DP lanes.
drm/i915: Initiate DP link training only on the lanes we'll be using
drm/i915: Remove trailing white space
drm/i915: Try harder during dp pattern 1 link training
drm/i915: Make DP prepare/commit consistent with DP dpms
drm/i915: Let panel power sequencing hardware do its job
drm/i915: Treat PCH eDP like DP in most places
drm/i915: Remove link_status field from intel_dp structure
drm/i915: Move common PCH_PP_CONTROL setup to ironlake_get_pp_control
drm/i915: Module parameters using '-1' as default must be signed type
drm/i915: Turn on another required clock gating bit on gen6.
drm/i915: Turn on a required 3D clock gating bit on Sandybridge.
drm/i915: enable cacheable objects on Ivybridge
drm/i915: add constants to size fence arrays and fields
drm/i915: Ivybridge still has fences!
drm/i915: forcewake warning fixes in debugfs
drm/i915: Fix object refcount leak on mmappable size limit error path.
drm/i915: Use mode_config.mutex in ironlake_panel_vdd_work
...
Al Viro [Tue, 22 Nov 2011 17:31:21 +0000 (12:31 -0500)]
mount_subtree() pointless use-after-free
d'oh... we'd carefully pinned mnt->mnt_sb down, dropped mnt and attempt
to grab s_umount on mnt->mnt_sb. The trouble is, *mnt might've been
overwritten by now...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Linus Torvalds [Tue, 22 Nov 2011 17:18:06 +0000 (09:18 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: ams_delta_serio - include linux/module.h
Input: elantech - adjust hw_version detection logic
Input: i8042 - add HP Pavilion dv4s to 'notimeout' and 'nomux' blacklists
Linus Torvalds [Tue, 22 Nov 2011 17:17:30 +0000 (09:17 -0800)]
Merge git://www.linux-watchdog.org/linux-watchdog
* git://www.linux-watchdog.org/linux-watchdog:
watchdog: fix initialisation printout in s3c2410_wdt
watchdog: Don't overwrite error value in wm831x_wdt_set_timeout()
watchdog: adx_wdt.c: remove driver
Linus Torvalds [Tue, 22 Nov 2011 16:54:15 +0000 (08:54 -0800)]
Merge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
* 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
NFS: Revert pnfs ugliness from the generic NFS read code path
SUNRPC: destroy freshly allocated transport in case of sockaddr init error
NFS: Fix a regression in the referral code
nfs: move nfs_file_operations declaration to bottom of file.c (try #2)
nfs: when attempting to open a directory, fall back on normal lookup (try #5)
Linus Torvalds [Tue, 22 Nov 2011 16:53:40 +0000 (08:53 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/mason/linux-btrfs
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
Btrfs: remove free-space-cache.c WARN during log replay
Btrfs: sectorsize align offsets in fiemap
Btrfs: clear pages dirty for io and set them extent mapped
Btrfs: wait on caching if we're loading the free space cache
Btrfs: prefix resize related printks with btrfs:
btrfs: fix stat blocks accounting
Btrfs: avoid unnecessary bitmap search for cluster setup
Btrfs: fix to search one more bitmap for cluster setup
btrfs: mirror_num should be int, not u64
btrfs: Fix up 32/64-bit compatibility for new ioctls
Btrfs: fix barrier flushes
Btrfs: fix tree corruption after multi-thread snapshots and inode_cache flush
Linus Torvalds [Tue, 22 Nov 2011 16:22:48 +0000 (08:22 -0800)]
Merge branch 'writeback-for-linus' of git://git./linux/kernel/git/wfg/linux
* 'writeback-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/linux:
writeback: remove vm_dirties and task->dirties
writeback: hard throttle 1000+ dd on a slow USB stick
mm: Make task in balance_dirty_pages() killable
Linus Torvalds [Tue, 22 Nov 2011 04:37:34 +0000 (20:37 -0800)]
Merge branch 'staging-linus' of git://git./linux/kernel/git/gregkh/staging
* 'staging-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
staging: fix more ET131X build errors
staging: et131x depends on NET
staging: slicoss depends on NET
linux-next: et131x: Fix build error when CONFIG_PM_SLEEP not enabled
Linus Torvalds [Tue, 22 Nov 2011 04:37:11 +0000 (20:37 -0800)]
Merge branch 'usb-linus' of git://git./linux/kernel/git/gregkh/usb
* 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (48 commits)
USB: Fix Corruption issue in USB ftdi driver ftdi_sio.c
USB: option: add PID of Huawei E173s 3G modem
OHCI: final fix for NVIDIA problems (I hope)
USB: option: release new PID for ZTE 3G modem
usb: Netlogic: Fix HC_LENGTH call in ehci-xls.c
USB: storage: ene_ub6250: fix compile warnings
USB: option: add id for 3G dongle Model VT1000 of Viettel
USB: serial: pl2303: rm duplicate id
USB: pch_udc: Change company name OKI SEMICONDUCTOR to LAPIS Semiconductor
USB: pch_udc: Support new device LAPIS Semiconductor ML7831 IOH
usb-storage: Accept 8020i-protocol commands longer than 12 bytes
USB: quirks: adding more quirky webcams to avoid squeaky audio
powerpc/usb: fix type cast for address of ioremap to compatible with 64-bit
USB: at91: at91-ohci: fix set/get power
USB: cdc-acm: Fix disconnect() vs close() race
USB: add quirk for Logitech C600 web cam
USB: EHCI: fix HUB TT scheduling issue with iso transfer
USB: XHCI: resume root hubs when the controller resumes
USB: workaround for bug in old version of GCC
USB: ark3116 initialisation fix
...
Linus Torvalds [Tue, 22 Nov 2011 04:36:46 +0000 (20:36 -0800)]
Merge branch 'tty-linus' of git://git./linux/kernel/git/gregkh/tty
* 'tty-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
TTY: ldisc, wait for ldisc infinitely in hangup
TTY: ldisc, move wait idle to caller
TTY: ldisc, allow waiting for ldisc arbitrarily long
Revert "tty/serial: Prevent drop of DCD on suspend for Tegra UARTs"
RS485: fix inconsistencies in the meaning of some variables
pch_uart: Fix DMA resource leak issue
serial,mfd: Fix CMSPAR setup
tty/serial: Prevent drop of DCD on suspend for Tegra UARTs
pch_uart: Change company name OKI SEMICONDUCTOR to LAPIS Semiconductor
pch_uart: Support new device LAPIS Semiconductor ML7831 IOH
pch_uart: Fix hw-flow control issue
tty: hvc_dcc: Fix duplicate character inputs
jsm: Change maintainership
Linus Torvalds [Tue, 22 Nov 2011 04:36:26 +0000 (20:36 -0800)]
Merge branch 'driver-core-linus' of git://git./linux/kernel/git/gregkh/driver-core
* 'driver-core-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
drivers/base/node.c: fix compilation error with older versions of gcc
uio: documentation fixups
device.h: Fix struct member documentation
Linus Torvalds [Tue, 22 Nov 2011 04:36:05 +0000 (20:36 -0800)]
Merge branch 'char-misc-linus' of git://git./linux/kernel/git/gregkh/char-misc
* 'char-misc-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
misc: ad525x_dpot: Fix AD8400 spi transfer size.
pch_phub: Fix MAC address writing issue for LAPIS ML7831
pch_phub: Improve ADE(Address Decode Enable) control
pch_phub: Change company name OKI SEMICONDUCTOR to LAPIS Semiconductor
pch_phub: Support new device LAPIS Semiconductor ML7831 IOH
pcie-gadget-spear: Add "platform:" prefix for platform modalias
MAINTAINERS: add CHAR and MISC driver maintainers
Al Viro [Mon, 21 Nov 2011 22:25:37 +0000 (17:25 -0500)]
iio: fix a leak due to improper use of anon_inode_getfd()
it can fail and in that case ->release() will *not* be called...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Al Viro [Mon, 21 Nov 2011 21:48:28 +0000 (16:48 -0500)]
microblaze: bury asm/namei.h
altroot support has been gone for years, along with arch/*/asm/namei.h;
looks like a dummy survivor that sat it out in microblaze tree...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Linus Torvalds [Mon, 21 Nov 2011 20:11:37 +0000 (12:11 -0800)]
Merge branch 'dev' of git://git./linux/kernel/git/tytso/ext4
* 'dev' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
ext4: fix up a undefined error in ext4_free_blocks in debugging code
ext4: add blk_finish_plug in error case of writepages.
ext4: Remove kernel_lock annotations
ext4: ignore journalled data options on remount if fs has no journal
Linus Torvalds [Mon, 21 Nov 2011 20:11:13 +0000 (12:11 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/sage/ceph-client
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
libceph: Allocate larger oid buffer in request msgs
ceph: initialize root dentry
ceph: fix iput race when queueing inode work
Linus Torvalds [Mon, 21 Nov 2011 20:10:47 +0000 (12:10 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/viro/vfs
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
VFS: Log the fact that we've given ELOOP rather than creating a loop
minixfs: kill manual hweight(), simplify
fs/minix: Verify bitmap block counts before mounting
Al Viro [Mon, 21 Nov 2011 03:52:18 +0000 (03:52 +0000)]
fix braino in um patchset (mea culpa)
wrong register returned...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Chris Mason [Mon, 21 Nov 2011 14:39:11 +0000 (09:39 -0500)]
Btrfs: remove free-space-cache.c WARN during log replay
The log replay code only partially loads block groups, since
the block group caching code is able to detect and deal with
extents the logging code has pinned down.
While the logging code is pinning down block groups, there is
a bogus WARN_ON we're hitting if the code wasn't able to find
an extent in the cache. This commit removes the warning because
it can happen any time there isn't a valid free space cache
for that block group.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Yongqiang Yang [Mon, 21 Nov 2011 17:09:19 +0000 (12:09 -0500)]
ext4: fix up a undefined error in ext4_free_blocks in debugging code
sbi is not defined, so let ext4_free_blocks use EXT4_SB(sb) instead
when EXT4FS_DEBUG is defined.
Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
David Howells [Tue, 16 Aug 2011 14:31:30 +0000 (15:31 +0100)]
VFS: Log the fact that we've given ELOOP rather than creating a loop
To prevent an NFS server from being used to create a directory loop in an NFS
superblock on the client, the following patch was committed:
commit
1836750115f20b774e55c032a3893e8c5bdf41ed
Author: Al Viro <viro@zeniv.linux.org.uk>
Date: Tue Jul 12 21:42:24 2011 -0400
Subject: fix loop checks in d_materialise_unique()
This causes ELOOP to be reported to anyone trying to access the dentry that
would otherwise cause the kernel to complete the loop.
However, no indication is given to the caller as to why an operation that ought
to work doesn't. The fault is with the kernel, which doesn't want to try and
solve the problem as it gets horrendously messy if there's another mountpoint
somewhere in the trees being spliced that can't be moved[*].
[*] The real problem is that we don't handle the excision of a subtree that
gets moved _out_ of what we can see. This can happen on the server where a
directory is merely moved between two other dirs on the same filesystem, but
where destination dir is not accessible by the client.
So, given the choice to return ELOOP rather than trying to reconfigure the
dentry tree, we should give the caller some indication of why they aren't being
allowed to make what should be a legitimate request and log a message.
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Sachin Prabhu <sprabhu@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>