Wolfram Sang [Mon, 16 Aug 2010 15:14:44 +0000 (17:14 +0200)]
gpio: Add bitmask to block requests to unavailable stmpe GPIOs
GPIOs on these controller are multi-functional. If you decided to use
some of them e.g. as input channels for the ADC, you surely don't want
those pins to be reassigned as simple GPIOs (which may be triggered even
from userspace via 'export'). Same for the touchscreen controller pins.
Since knowledge about the hardware is needed to decide which GPIOs to
reserve, let this bitmask be inside platform_data and provide some
defines to assist potential users.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Rabin Vincent <rabin.vincent@stericsson.com> Cc: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Linus Walleij [Fri, 20 Aug 2010 08:26:56 +0000 (10:26 +0200)]
mfd: Move AB3100 to __devinit
Since there is no discardable probe() function in the I2C device
framework, let's just tag it __devinit and take the footprint hit
rather than seeing the compilation warnings every day.
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Linus Torvalds [Thu, 28 Oct 2010 22:13:55 +0000 (15:13 -0700)]
Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6
* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
initramfs: Fix build break on symbol-prefixed archs
initramfs: fix initramfs size calculation
initramfs: generalize initramfs_data.xxx.S variants
scripts/kallsyms: Enable error messages while hush up unnecessary warnings
scripts/setlocalversion: update comment
kbuild: Use a single clean rule for kernel and external modules
kbuild: Do not run make clean in $(srctree)
scripts/mod/modpost.c: fix commentary accordingly to last changes
kbuild: Really don't clean bounds.h and asm-offsets.h
Linus Torvalds [Thu, 28 Oct 2010 22:13:05 +0000 (15:13 -0700)]
Merge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6
* 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6:
nfs4: The difference of 2 pointers is ptrdiff_t
nfs: testing the wrong variable
nfs: handle lock context allocation failures in nfs_create_request
Fixed Regression in NFS Direct I/O path
Axel Lin [Mon, 25 Oct 2010 23:55:54 +0000 (07:55 +0800)]
regulator: max8952 - fix max8952_set_voltage
In current implementation, vid is declared as u8,
then "vid == -1" is always false, and "vid >= 0" is always true.
Thus change it to s8.
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Anand Gadiyar [Mon, 11 Oct 2010 16:35:55 +0000 (22:05 +0530)]
regulator: fix build when CONFIG_REGULATOR_DUMMY=n
Commit f03f91826 (regulator: Add option for machine drivers
to enable the dummy regulator) in the regulators tree
seems to have introduced the following build break when
CONFIG_REGULATOR_DUMMY is disabled. Fix this.
CC drivers/regulator/dummy.o
drivers/regulator/dummy.c:41: error: redefinition of 'regulator_dummy_init'
drivers/regulator/dummy.h:28: note: previous definition of 'regulator_dummy_init' was here
make[2]: *** [drivers/regulator/dummy.o] Error 1
make[1]: *** [drivers/regulator] Error 2
make: *** [drivers] Error 2
Signed-off-by: Anand Gadiyar <gadiyar@ti.com> Cc: Liam Girdwood <lrg@slimlogic.co.uk> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Jeffrey Carlyle [Fri, 8 Oct 2010 19:49:19 +0000 (14:49 -0500)]
regulator: avoid deadlock when disabling regulator with supply
I have a regulator A that sets regulator B as its supply. When I call
set_supply to add B as the supply for A, regulator A gets added to the
supply_list for regulator B.
When I call regulator_disable(A), I end up with a call chain like this:
Mark Brown [Wed, 6 Oct 2010 02:18:32 +0000 (19:18 -0700)]
regulator: Add option for machine drivers to enable the dummy regulator
Allow machine drivers to explicitly enable the use of the dummy regulator,
enabling simpler support for systems with only a few specific supplies
visible to software.
It is strongly recommended that this is not used on systems with
substantial software control over their PMICs, for maximum functionality
constrints should be as fully specified as possible.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Axel Lin [Sat, 18 Sep 2010 05:13:28 +0000 (13:13 +0800)]
Regulator: lp3972 cleanup
This patch includes below fixes based on Mark's comment.
- Return actual error if i2c_smbus_read_byte_data() fail
- Add spaces around bitwise AND operator(&) to improve readability
- Add comment to explain why we need to update voltage change control register
for LDO1 and LDO5
- Logging the value for diagnostics if chip reported incorrect voltage value
- Add __devinit annotation for setup_regulators()
- Show system control register1 value if the value is mismatched
- Logging the value for diagnostics if failed to detect device
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Axel Lin [Thu, 16 Sep 2010 08:48:49 +0000 (16:48 +0800)]
Regulator: LP3972 PMIC regulator driver
This patch adds regulator drivers for National Semiconductors LP3972 PMIC.
This LP3972 PMIC controller has 3 DC/DC voltage converters and 5 low drop-out
(LDO) regulators. LP3972 PMIC controller uses I2C interface.
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
MyungJoo Ham [Fri, 20 Aug 2010 05:43:56 +0000 (14:43 +0900)]
MAX8952 PMIC Driver Initial Release
MAX8952 PMIC is used to provide voltage output between 770mV - 1400mV
with DVS support. In this initial release, users can set voltages for
four DVS modes, RAMP delay values, and SYNC frequency.
Controlling FPWM/SYNC_MODE/Pull-Down/Ramp Modes and reading CHIP_ID
is not supported in this release.
If GPIO of EN is not valid in platform data, the driver assumes that it
is always-on. If GPIO of VID0 or VID1 is invalid, the driver pulls down
VID0 and VID1 to fix DVS mode as 0 and disables DVS support.
We assume that V_OUT is capable to provide every voltage from 770mV to
1.40V in 10mV steps although the data sheet has some ambiguity on it.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
--
v2:
- Style correction
- Can accept platform_data with invalid GPIOs
- Removed unnecessary features
- Improved error handling Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
fs/nfs/nfs4proc.c: In function ‘nfs41_sequence_done’:
fs/nfs/nfs4proc.c:432: warning: format ‘%ld’ expects type ‘long int’, but argument 3 has type ‘int’
fs/nfs/nfs4proc.c: In function ‘nfs4_setup_sequence’:
fs/nfs/nfs4proc.c:576: warning: format ‘%ld’ expects type ‘long int’, but argument 5 has type ‘int’
On 32-bit, ptrdiff_t is int; on 64-bit, ptrdiff_t is long.
Linus Torvalds [Thu, 28 Oct 2010 19:17:00 +0000 (12:17 -0700)]
Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging
* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging: (68 commits)
hwmon: (it87) Add support for the IT8721F/IT8758E
hwmon: (it87) Move conversion functions
hwmon: Remove many EXPERIMENTAL flags
hwmon: (lm85) Add support for ADT7468 high-frequency PWM mode
hwmon: (lm85) Document the ADT7468 as supported
hwmon: (lm85) Fix ADT7468 frequency table
hwmon: I2C addresses are constant
Move ams driver to macintosh
hwmon: (pcf8591) Don't attempt to detect devices
hwmon: (pcf8591) Register as a hwmon device
hwmon: (w83795) Use standard attributes for chassis intrusion
hwmon: (w83795) Exclude fan control feature by default
hwmon: (w83795) Add myself as co-author and maintainer
hwmon: (w83795) More style cleanups
hwmon: (w83795) Fix LSB reading of voltage limits
hwmon: (w83795) Use dev_get_drvdata() where possible
hwmon: (w83795) Delay reading pwm config registers
hwmon: (w83795) Delay reading limit registers
hwmon: (w83795) Move register reads to dedicated functions
hwmon: (w83795) Pack similar register reads
...
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (841 commits)
Staging: brcm80211: fix usage of roundup in structures
Staging: bcm: fix up network device reference counting
Staging: keucr: fix up US_ macro change
staging: brcm80211: brcmfmac: Removed codeversion from firmware filenames.
staging: brcm80211: Remove unnecessary header files.
staging: brcm80211: Remove unnecessary includes from bcmutils.c
staging: brcm80211: Removed unnecessary pktsetprio() function.
Staging: brcm80211: remove typedefs.h
Staging: brcm80211: remove uintptr typedef usage
Staging: hv: remove struct vmbus_channel_interface
Staging: hv: remove Open from struct vmbus_channel_interface
Staging: hv: storvsc: call vmbus_open directly
Staging: hv: netvsc: call vmbus_open directly
Staging: hv: channel: export vmbus_open to modules
Staging: hv: remove Close from struct vmbus_channel_interface
Staging: hv: netvsc: call vmbus_close directly
Staging: hv: storvsc: call vmbus_close directly
Staging: hv: channel: export vmbus_close to modules
Staging: hv: remove SendPacket from struct vmbus_channel_interface
Staging: hv: storvsc: call vmbus_sendpacket directly
...
Fix up conflicts in
drivers/staging/cx25821/cx25821-audio-upstream.c
drivers/staging/cx25821/cx25821-audio.h
due to warring whitespace cleanups (neither of which were all that great)
Linus Torvalds [Thu, 28 Oct 2010 18:59:52 +0000 (11:59 -0700)]
Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6
* 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: (27 commits)
x86: allocate space within a region top-down
x86: update iomem_resource end based on CPU physical address capabilities
x86/PCI: allocate space from the end of a region, not the beginning
PCI: allocate bus resources from the top down
resources: support allocating space within a region from the top down
resources: handle overflow when aligning start of available area
resources: ensure callback doesn't allocate outside available space
resources: factor out resource_clip() to simplify find_resource()
resources: add a default alignf to simplify find_resource()
x86/PCI: MMCONFIG: fix region end calculation
PCI: Add support for polling PME state on suspended legacy PCI devices
PCI: Export some PCI PM functionality
PCI: fix message typo
PCI: log vendor/device ID always
PCI: update Intel chipset names and defines
PCI: use new ccflags variable in Makefile
PCI: add PCI_MSIX_TABLE/PBA defines
PCI: add PCI vendor id for STmicroelectronics
x86/PCI: irq and pci_ids patch for Intel Patsburg DeviceIDs
PCI: OLPC: Only enable PCI configuration type override on XO-1
...
Jean Delvare [Thu, 28 Oct 2010 18:31:51 +0000 (20:31 +0200)]
hwmon: (it87) Add support for the IT8721F/IT8758E
Add support for the IT8721F/IT8758E. These new chips differ from the
older IT87xxF chips in the following ways:
* ADC LSB is 12 mV instead of 16 mV.
* PWM values are 8-bit instead of 7-bit.
There are other minor changes we don't have to care about in the
driver.
Another change is that we will handle internal voltage scaling in the
driver instead of delegating the work to user-space.
Jean Delvare [Thu, 28 Oct 2010 18:31:51 +0000 (20:31 +0200)]
hwmon: (it87) Move conversion functions
Move conversion functions until after structure defintions. This is
needed for future changes which make use of the structures in the
conversion funtcions.
Jean Delvare [Thu, 28 Oct 2010 18:31:50 +0000 (20:31 +0200)]
hwmon: Remove many EXPERIMENTAL flags
Remove the dependency on EXPERIMENTAL for all drivers which are in
the kernel tree for a long time, are known to work properly and for
which we have documentation.
Jean Delvare [Thu, 28 Oct 2010 18:31:50 +0000 (20:31 +0200)]
hwmon: (lm85) Add support for ADT7468 high-frequency PWM mode
The ADT7468 supports a high-frequency PWM output mode where all PWM
outputs are driven by a 22.5 kHz clock. Add support for this mode, and
document it, as it may surprise the user that setting one PWM output
frequency also affects the other PWM outputs.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Darrick J. Wong <djwong@us.ibm.com> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Jean Delvare [Thu, 28 Oct 2010 18:31:50 +0000 (20:31 +0200)]
hwmon: (lm85) Fix ADT7468 frequency table
The ADT7468 uses the same frequency table as the ADT7463.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: stable@kernel.org Cc: Darrick J. Wong <djwong@us.ibm.com> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Jean Delvare [Thu, 28 Oct 2010 18:31:50 +0000 (20:31 +0200)]
hwmon: I2C addresses are constant
We can mark normal_i2c const. Almost all drivers do that already, so
fix the 3 remaining ones before they are used as (bad) examples for
new drivers.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: George Joseph <george.joseph@fairview5.com> Reviewed-by: Guenter Roeck <guenter.roeck@ericsson.com>
Jean Delvare [Thu, 28 Oct 2010 18:31:50 +0000 (20:31 +0200)]
Move ams driver to macintosh
The ams driver isn't a hardware monitoring driver, so it shouldn't
live under driver/hwmon. drivers/macintosh seems much more
appropriate, as the driver is only useful on PowerBooks and iBooks.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Guenter Roeck <guenter.roeck@ericsson.com> Cc: Stelian Pop <stelian@popies.net> Cc: Michael Hanselmann <linux-kernel@hansmi.ch> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Grant Likely <grant.likely@secretlab.ca>
Jean Delvare [Thu, 28 Oct 2010 18:31:49 +0000 (20:31 +0200)]
hwmon: (pcf8591) Register as a hwmon device
Register PCF8591 devices as hwmon devices. There's little point in
implementing the standard sysfs interface if we don't register it in
a way libsensors will pick it.
Jean Delvare [Thu, 28 Oct 2010 18:31:49 +0000 (20:31 +0200)]
hwmon: (w83795) Use standard attributes for chassis intrusion
Follow the standard attribute naming for the chassis intrusion
feature. I couldn't test the beeping (my board apparently doesn't do
that) but the alarm works fine.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Jean Delvare [Thu, 28 Oct 2010 18:31:49 +0000 (20:31 +0200)]
hwmon: (w83795) Exclude fan control feature by default
The fan control feature of the w83795 driver is insufficiently
reviewed and tested for public consumption at this time, so make it
optional and disabled by default. We will change the default when
review and testing is deemed sufficient. Ultimately the option will
go away.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Jean Delvare [Thu, 28 Oct 2010 18:31:49 +0000 (20:31 +0200)]
hwmon: (w83795) Add myself as co-author and maintainer
I've made so many changes to the w83795 driver that it's only fair to
list myself as a co-author. I'll also maintain the driver for some
time. There's more work needed on the driver for sure.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Jean Delvare [Thu, 28 Oct 2010 18:31:49 +0000 (20:31 +0200)]
hwmon: (w83795) More style cleanups
Cleanups suggested by Guenter Roeck, falling into 4 categories:
* Swapping test orders, because if (var == CONSTANT) is much easier to
read than if (CONSTANT == var).
* Simplifying comparisons with 0.
* Dropping unneeded masks.
* Dropping unneeded parentheses and curly braces.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Wait until we need the pwm config register values, instead of
pre-reading them. This saves over 1 second on modprobe on my test
system.
Obviously this time is added when first accessing pwm config
attributes, however not everybody will use them, so it seems unfair
to slow down driver loading (and thus boot) for an optional feature.
Jean Delvare [Thu, 28 Oct 2010 18:31:48 +0000 (20:31 +0200)]
hwmon: (w83795) Delay reading limit registers
Wait until we need the limit register values, instead of pre-reading
them. This saves 544 ms on modprobe on my test system. Obviously this
time is added when first running "sensors" or any other monitoring
application, but I think it is better than slowing down the boot.
Jean Delvare [Thu, 28 Oct 2010 18:31:48 +0000 (20:31 +0200)]
hwmon: (w83795) Move register reads to dedicated functions
Move initial register reads out of probe, to dedicated functions.
This makes the code clearer, and will be needed if we want to delay
calling these functions until they are needed, or want to call them
periodically.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Jean Delvare [Thu, 28 Oct 2010 18:31:48 +0000 (20:31 +0200)]
hwmon: (w83795) Don't pre-read values we'll update later
There is no point in reading registers during initialization if we
will refresh the values in the update function later. This is only
slowing down the driver loading with no benefit, stop doing it.
This change saves 480 ms on driver load on my test system.
Jean Delvare [Thu, 28 Oct 2010 18:31:48 +0000 (20:31 +0200)]
hwmon: (w83795) Simplify temperature sensor type handling
All 3 temperature sensor type sysfs functions (show_temp_mode,
store_temp_mode and show_dts_mode) can be simplified. We don't
create these files when the correponding input isn't in temperature
monitoring mode, so there is no point in handling that case.
Likewise, we don't allow changing inputs from temperature to voltage,
so the code handling this case is dead and can be removed.
Jean Delvare [Thu, 28 Oct 2010 18:31:47 +0000 (20:31 +0200)]
hwmon: (w83795) Get rid of VRLSB_SHIFT
VRLSB_SHIFT is a non-sense, the actual shift depends on the sensor
type (fans need 4, other sensors need 6). Get rid of it to prevent
any confusion. Also get rid of the useless masking, the meaningful
bits are always the MSb so there's nothing to mask out after
shifting.
Jean Delvare [Thu, 28 Oct 2010 18:31:47 +0000 (20:31 +0200)]
hwmon: (w83795) Rework beep_enable implementation
Handle beep_enable just like all other beep bits. It doesn't need
anything special, so let's avoid redundant code. This also saves a
duplicate register read at initialization time.
Jean Delvare [Thu, 28 Oct 2010 18:31:47 +0000 (20:31 +0200)]
hwmon: (w83795) Fix PWM duty cycle frequency attributes
The PWM duty cycle frequenty attributes are improperly named
(fanN_div instead of pwmN_div) and contain raw values instead of
actual frequencies. Rename them and fix their contents.
Also improve the logic when the user asks for a new frequency, to
always pick the closest supported frequency. The algorithm could
certainly be optimized, but the operation is infrequent enough that
I don't think it's worth the effort.
Jean Delvare [Thu, 28 Oct 2010 18:31:46 +0000 (20:31 +0200)]
hwmon: (w83795) Add support for dynamic in0-2 limits
The W83795G can be configured to set the in0, in1 and/or in2 voltage
limits dynamically based on VID input pins. Switch the respective
sysfs attributes to read-only.
Jean Delvare [Thu, 28 Oct 2010 18:31:46 +0000 (20:31 +0200)]
hwmon: (w83795) Clean up probe function
* The data structure is zalloc'd, so no need to set individual fields
to 0 explicitly.
* Refactor the handling of pins that can be used for either
temperature or voltage monitoring.
* Misc other clean-ups.
Jean Delvare [Thu, 28 Oct 2010 18:31:45 +0000 (20:31 +0200)]
hwmon: (w83795) Use 2D arrays for many device attributes
Use 2D arrays for in, fan, temp and dts device attributes. Using
linear arrays is too risky as we have to skip some groups depending
on the device model and configuration. Adding or removing an
attribute would let the driver build silently but then it would crash
at runtime. With 2D arrays, the consistency checking happens at build
time, which is much safer.
Jean Delvare [Thu, 28 Oct 2010 18:31:45 +0000 (20:31 +0200)]
hwmon: (w83795) Merge w83795_create_files and w83795_remove_files
Functions w83795_create_files and w83795_remove_files iterate over
the same set of files, just calling a different function. Merge them
into a single function which takes the action as a parameter. This
saves code, and also ensure that file creation and deletion are in
sync.
Jean Delvare [Thu, 28 Oct 2010 18:31:45 +0000 (20:31 +0200)]
hwmon: (w83795) Refactor bank selection
Move the bank selection code to a separate function, to avoid
duplicating it in read and write functions. Improve error reporting
on register access error.
Jean Delvare [Thu, 28 Oct 2010 18:31:45 +0000 (20:31 +0200)]
hwmon: (w83795) Drop duplicate enum
Enum chips and chip_types are redundant, get rid of the former. Fix
the detection code to properly identify the chip variant and name the
client accordingly.
Wei Song [Thu, 28 Oct 2010 18:31:44 +0000 (20:31 +0200)]
hwmon: New driver for the W83795G/ADG monitoring chips
There is still much work needed, but I wanted to give Wei the credit
he deserves. I've merged some of my own fixes already, to make
gcc and checkpatch happy. Individual fixes and improvements from me
will follow.
[JD: Fix build errors]
[JD: Coding style cleanups]
[JD: Get rid of forward declarations]
[JD: Drop VID support]
[JD: Drop fault output control feature]
[JD: Use lowercase for inline function names]
[JD: Use strict variants of the strtol/ul functions]
[JD: Shorten the read and write function names]
Shubhrajyoti D [Thu, 28 Oct 2010 18:31:44 +0000 (20:31 +0200)]
hwmon: (lm75) Make the writing to sysfs more robust
Currently we get the checkpatch warning
consider using strict_strtol in preference to simple_strtol.
Also we should not allow any partially numeric values.
Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
Eric Dumazet [Wed, 27 Oct 2010 17:33:43 +0000 (19:33 +0200)]
numa: fix slab_node(MPOL_BIND)
When a node contains only HighMem memory, slab_node(MPOL_BIND)
dereferences a NULL pointer.
[ This code seems to go back all the way to commit 19770b32609b: "mm:
filter based on a nodemask as well as a gfp_mask". Which was back in
April 2008, and it got merged into 2.6.26. - Linus ]
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Cc: Mel Gorman <mel@csn.ul.ie> Cc: Christoph Lameter <cl@linux.com> Cc: Lee Schermerhorn <lee.schermerhorn@hp.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: stable@kernel.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Staging: brcm80211: fix usage of roundup in structures
Now that the roundup macro is sane, it can't be used in structure
definitions, or the build breaks.. For now, create a "broken_roundup()"
macro to get everything building again, but in the end, fixing these
structures to use a proper size value is the correct thing to do.
Cc: Brett Rudley <brudley@broadcom.com> Cc: Henry Ptasinski <henryp@broadcom.com> Cc: Nohee Ko <noheek@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Staging: bcm: fix up network device reference counting
The way network devices are reference counted does not include poking
around in the reference count itself. This breaks when the reference
count is changed to be a different type. Fix the driver to do the
proper function calls instead.
Cc: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>