Takashi Iwai [Fri, 13 Aug 2010 09:56:53 +0000 (11:56 +0200)]
ALSA: hda - Fix dynamic ADC change working again
The commit eb541337b7a43822fce7d0c9d967ee149b2d9a96
ALSA: hda - Make converter setups sticky
changes the semantics of snd_hda_codec_cleanup_stream() not to clean up
the stream at that moment but delay the action. This broke the codes
expecting that the clean-up is done immediately, such as dynamic ADC
changes in some codec drivers.
This patch fixes the issue by introducing a lower helper,
__snd_hda_codec_cleanup_stream(), to allow the immediate clean up.
The original snd_hda_codec_cleanup_stream() is kept as is now.
Takashi Iwai [Fri, 13 Aug 2010 06:45:23 +0000 (08:45 +0200)]
ALSA: hda - Restrict PCM parameters per ELD information over HDMI
When a device is plugged over HDMI, it passes some information in ELD
including the supported PCM parameters like formats, rates, channels.
This patch adds the check to PCM open callback of HDMI streams so that
only valid parameters the device supports are used.
When no device is plugged, the parameters the codec supports are used;
it's mostly all parameters the hardware can work. This is for apps
that are started before device plugging and do probing (e.g. a sound
daemon), so that at least, probing would work even before the device
plugging.
Sonic Zhang [Sat, 7 Aug 2010 16:06:07 +0000 (12:06 -0400)]
ASoC: add AD1980 obsolete information
This codec has been obsoleted by ADI, so add appropriate warnings to the
source tree to dissuade people from using in new designs based on driver
support.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cliff Cai [Sat, 7 Aug 2010 15:16:27 +0000 (11:16 -0400)]
ASoC: register cache should be 1 byte aligned for 1 byte long register
Signed-off-by: Cliff Cai <cliff.cai@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
Two users report model=auto is needed to make the internal mic work properly. BugLink: https://bugs.launchpad.net/bugs/495134 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Add missing codec IDs.
* Modify some existing codec names for discrete GPUs to match newly
added IDs. Note: existing names were a mixture of marketing and
engineering GPU names. Equally, there's no reason that codec IDs
have to be specific to a particular GPU or board, so identify
codecs in a less marketing-oriented fashion.
* Reformat codec ID table so it's easier to read, for me at least.
Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (59 commits)
igbvf.txt: Add igbvf Documentation
igb.txt: Add igb documentation
e100/e1000*/igb*/ixgb*: Add missing read memory barrier
ixgbe: fix build error with FCOE_CONFIG without DCB_CONFIG
netxen: protect tx timeout recovery by rtnl lock
isdn: gigaset: use after free
isdn: gigaset: add missing unlock
solos-pci: Fix race condition in tasklet RX handling
pkt_sched: Fix sch_sfq vs tcf_bind_filter oops
net: disable preemption before call smp_processor_id()
tcp: no md5sig option size check bug
iwlwifi: fix locking assertions
iwlwifi: fix TX tracer
isdn: fix information leak
net: Fix napi_gro_frags vs netpoll path
usbnet: remove noisy and hardly useful printk
rtl8180: avoid potential NULL deref in rtl8180_beacon_work
ath9k: Remove myself from the MAINTAINERS list
libertas: scan before assocation if no BSSID was given
libertas: fix association with some APs by using extended rates
...
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6:
tx493xide: use min_t() macro instead of min()
drivers/ide: Use memdup_user
via82cxxx: fix typo for VT6415 PCIE PATA IDE Host Controller support.
ide-cd: Do not access completed requests in the irq handler
qiaochong [Tue, 10 Aug 2010 00:21:27 +0000 (17:21 -0700)]
drivers/char/vt.c:vc_do_resize(): local var `end' should be unsigned long
According include/linux/console_struct.h,vc_scr_end is unsigned long.
struct vc_data {
unsigned short vc_num; /* Console number */
unsigned int vc_cols; /* [#] Console size */
unsigned int vc_rows;
unsigned int vc_size_row; /* Bytes per row */
unsigned int vc_scan_lines; /* # of scan lines */
unsigned long vc_origin; /* [!] Start of real screen */
unsigned long vc_scr_end; /* [!] End of real screen */
unsigned long vc_visible_origin; /* [!] Top of visible window */
unsigned int vc_top, vc_bottom; /* Scrolling region */
const struct consw *vc_sw;
unsigned short *vc_screenbuf;
...
}
Signed-off-by: qiaochong <qiaochong@loongson.cn> Cc: Greg KH <greg@kroah.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
qiaochong [Tue, 10 Aug 2010 00:21:23 +0000 (17:21 -0700)]
drivers/char/vt.c: fix vc->vc_origin on take_over_console()
kernel will die on some platform when switch from vga mode to framebuffer
mode. The reason of this bug is that bind_con_driver reset vc->vc_origin
to (unsigned long)vc->vc_screenbuf.
On vgacon vc->vc_origin is not releated to vc->vc_screenbuf,if set
vc->vc_origin to vc->vc_screenbuf,kernel will die on vc_do_resize.
static int vc_do_resize(struct tty_struct *tty, struct tty_struct *real_tty,
struct vc_data *vc, unsigned int cols, unsigned int lines)
{
unsigned long old_origin, new_origin, new_scr_end, rlth, rrem, err = 0;
unsigned int old_cols, old_rows, old_row_size, old_screen_size;
unsigned int new_cols, new_rows, new_row_size, new_screen_size;
unsigned int end, user;
...
end = (old_rows > new_rows) ? old_origin +
(old_row_size * new_rows) :
vc->vc_scr_end;
...
/*
here for a test from vgacon to framebuffer:
old_origin=0x810814a0,end=0xb00b8fa0,vc->vc_origin=0x810814a0
the code bellow will copy memory from 0x810814a0 to 0xb00b8fa0,
this will cover kernel code,kernel died here.
*/
while (old_origin < end) {
scr_memcpyw((unsigned short *) new_origin,
(unsigned short *) old_origin, rlth);
if (rrem)
scr_memsetw((void *)(new_origin + rlth),
vc->vc_video_erase_char, rrem);
old_origin += old_row_size;
new_origin += new_row_size;
}
rwsem: smaller wrappers around rwsem_down_failed_common
More code can be pushed from rwsem_down_read_failed and
rwsem_down_write_failed into rwsem_down_failed_common.
Following change adding down_read_critical infrastructure support also
enjoys having flags available in a register rather than having to fish it
out in the struct rwsem_waiter...
Signed-off-by: Michel Lespinasse <walken@google.com> Acked-by: David Howells <dhowells@redhat.com> Cc: Mike Waychison <mikew@google.com> Cc: Suleiman Souhlal <suleiman@google.com> Cc: Ying Han <yinghan@google.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
rwsem: wake queued readers when writer blocks on active read lock
This change addresses the following situation:
- Thread A acquires the rwsem for read
- Thread B tries to acquire the rwsem for write, notices there is already
an active owner for the rwsem.
- Thread C tries to acquire the rwsem for read, notices that thread B already
tried to acquire it.
- Thread C grabs the spinlock and queues itself on the wait queue.
- Thread B grabs the spinlock and queues itself behind C. At this point A is
the only remaining active owner on the rwsem.
In this situation thread B could notice that it was the last active writer
on the rwsem, and decide to wake C to let it proceed in parallel with A
since they both only want the rwsem for read.
Signed-off-by: Michel Lespinasse <walken@google.com> Acked-by: David Howells <dhowells@redhat.com> Cc: Mike Waychison <mikew@google.com> Cc: Suleiman Souhlal <suleiman@google.com> Cc: Ying Han <yinghan@google.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
rwsem: let RWSEM_WAITING_BIAS represent any number of waiting threads
Previously each waiting thread added a bias of RWSEM_WAITING_BIAS. With
this change, the bias is added only once to indicate that the wait list is
non-empty.
This has a few nice properties which will be used in following changes:
- when the spinlock is held and the waiter list is known to be non-empty,
count < RWSEM_WAITING_BIAS <=> there is an active writer on that sem
- count == RWSEM_WAITING_BIAS <=> there are waiting threads and no
active readers/writers on that sem
Signed-off-by: Michel Lespinasse <walken@google.com> Acked-by: David Howells <dhowells@redhat.com> Cc: Mike Waychison <mikew@google.com> Cc: Suleiman Souhlal <suleiman@google.com> Cc: Ying Han <yinghan@google.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
rwsem: lighter active count checks when waking up readers
In __rwsem_do_wake(), we can skip the active count check unless we come
there from up_xxxx(). Also when checking the active count, it is not
actually necessary to increment it; this allows us to get rid of the read
side undo code and simplify the calculation of the final rwsem count
adjustment once we've counted the reader threads to wake.
The basic observation is the following. When there are waiter threads on
a rwsem and the spinlock is held, other threads can only increment the
active count by trying to grab the rwsem in down_xxxx(). However
down_xxxx() will notice there are waiter threads and take the down_failed
path, blocking to acquire the spinlock on the way there. Therefore, a
thread observing an active count of zero with waiters queued and the
spinlock held, is protected against other threads acquiring the rwsem
until it wakes the last waiter or releases the spinlock.
Signed-off-by: Michel Lespinasse <walken@google.com> Acked-by: David Howells <dhowells@redhat.com> Cc: Mike Waychison <mikew@google.com> Cc: Suleiman Souhlal <suleiman@google.com> Cc: Ying Han <yinghan@google.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
rwsem: fully separate code paths to wake writers vs readers
This is in preparation for later changes in the series.
In __rwsem_do_wake(), the first queued waiter is checked first in order to
determine whether it's a writer or a reader. The code paths diverge at
this point. The code that checks and increments the rwsem active count is
duplicated on both sides - the point is that later changes in the series
will be able to independently modify both sides.
Signed-off-by: Michel Lespinasse <walken@google.com> Acked-by: David Howells <dhowells@redhat.com> Cc: Mike Waychison <mikew@google.com> Cc: Suleiman Souhlal <suleiman@google.com> Cc: Ying Han <yinghan@google.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
hwmon: f71882fg: add support for the Fintek F71808E
Allow device probing to recognise the Fintek F71808E.
Sysfs interface:
* Fan/pwm control is the same as for F71889FG
* Temperature and voltage sensor handling is largely the same as for
the F71889FG
- Has one temperature sensor less (doesn't have temp3)
- Misses one voltage sensor (doesn't have V6, thus in6_input refers to
what in7_input refers for F71889FG)
For the purpose of the sysfs interface fxxxx_in_temp_attr[] is split up
such that it can largely be reused.
Signed-off-by: Giel van Schijndel <me@mortis.eu> Cc: Jean Delvare <khali@linux-fr.org> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
register_hotcpu_notifier() is designed to make these ifdefs unnecessary.
Cc: Chen Gong <gong.chen@linux.intel.com> Cc: Rudolf Marek <r.marek@assembler.cz> Cc: Huaxu Wan <huaxu.wan@intel.com> Cc: Jean Delvare <khali@linux-fr.org> Cc: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Chen Gong [Tue, 10 Aug 2010 00:21:10 +0000 (17:21 -0700)]
hwmon: coretemp: documentation update and cleanup
Update coretemp supported CPU TjMax lists and some cleanup work.
Signed-off-by: Chen Gong <gong.chen@linux.intel.com> Cc: Rudolf Marek <r.marek@assembler.cz> Cc: Huaxu Wan <huaxu.wan@intel.com> Cc: Jean Delvare <khali@linux-fr.org> Cc: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
If one coretemp device can't be added, it should allow subsequent adding
operation because every new-added device will create a new sysfs group,
not an additional sensor sys entry.
Signed-off-by: Chen Gong <gong.chen@linux.intel.com> Cc: Rudolf Marek <r.marek@assembler.cz> Cc: Huaxu Wan <huaxu.wan@intel.com> Cc: Jean Delvare <khali@linux-fr.org> Cc: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Chen Gong [Tue, 10 Aug 2010 00:21:09 +0000 (17:21 -0700)]
hwmon: coretemp: update hotplug condition check
Fix two errors in hotplug. One is for hotplug notifier. The other is
unnecessary driver unregister. Because even none of online cpus supports
coretemp, we can't assume new onlined cpu doesn't support it either. If
related driver is unregistered there we have no chance to use coretemp
from then on.
Signed-off-by: Chen Gong <gong.chen@linux.intel.com> Cc: Rudolf Marek <r.marek@assembler.cz> Cc: Huaxu Wan <huaxu.wan@intel.com> Cc: Jean Delvare <khali@linux-fr.org> Cc: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Guenter Roeck [Tue, 10 Aug 2010 00:21:08 +0000 (17:21 -0700)]
hwmon: add support for JEDEC JC 42.4 compliant temperature sensors
[akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Cc: Jean Delvare <khali@linux-fr.org> Cc: Randy Dunlap <rdunlap@xenotime.net> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Guenter Roeck [Tue, 10 Aug 2010 00:21:06 +0000 (17:21 -0700)]
hwmon: driver for SMM665 Six-Channel Active DC Output Controller/Monitor
This driver adds support for the monitoring features of the Summit
Microelectronics SMM665 Six-Channel Active DC Output Controller/Monitor.
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Cc: Jean Delvare <khali@linux-fr.org> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/hwmon/hdaps.c: add Lenovo Thinkpad T400 to the whitelist
Add Lenovo Thinkpad T400. I have done the testing on my laptop. The
hdaps module detects the device and the hdapsd daemon is able to [un]park
the disk.
Signed-off-by: Ritesh Raj Sarraf <rrs@debian.org> Cc: Frank Seidel <frank@f-seidel.de> Cc: Dmitry Torokhov <dtor@mail.ru> Cc: Jean Delvare <khali@linux-fr.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
These are caused by checkpatch incorrectly parsing its internal
representation of a statement block for struct's (or anything else that is
a statement block encapsulated in {}'s that also ends with a ';'). Fix
this by properly parsing a statement block.
Patrick Pannuto [Tue, 10 Aug 2010 00:21:02 +0000 (17:21 -0700)]
checkpatch: warn about unexpectedly long msleep's
As explained in Documentation/timers/timers-howto.txt, msleep's of < 20ms
may sleep for as long as 20ms. Caller's of msleep(1) or msleep(2), etc
are likely not to expect this quirky behavior - warn them.
Signed-off-by: Patrick Pannuto <ppannuto@codeaurora.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Patrick Pannuto [Tue, 10 Aug 2010 00:21:01 +0000 (17:21 -0700)]
checkpatch: prefer usleep_range over udelay
When possible, sleeping is (usually) better than delaying; however, don't
bother callers of udelay < 10us, as those cases are generally not worth
the switch to usleep
[akpm@linux-foundation.org: fix mismatched parentheses] Signed-off-by: Patrick Pannuto <ppannuto@codeaurora.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Joe Perches [Tue, 10 Aug 2010 00:21:01 +0000 (17:21 -0700)]
checkpatch: add more exceptions to 80 char lines
Add new logging functions netdev_<level> and netif_<level>.
Don't complain if the only thing on a line is a quoted string.
Signed-off-by: Joe Perches <joe@perches.com> Cc: Andy Whitcroft <apw@shadowen.org> Cc: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Joe Eloff [Tue, 10 Aug 2010 00:21:00 +0000 (17:21 -0700)]
checkpatch: change externals to globals
Make error message say 'ERROR: do not initialise globals to 0 or NULL'
rather than 'ERROR: do not initialise externals to 0 or NULL'. Makes more
sense in the context since there is an extern keyword in C and that is a
global declaration within the scope of the current file.
Signed-off-by: Joe Eloff <kagen101@gmail.com> Cc: Andy Whitcroft <apw@shadowen.org> Cc: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
I've got a false positive when spaces are present at the beginning of a
line.
So I add this check, obviously excluding to check the lines in the middle of
comments.
For instance this code passes the checkpatch test:
+struct davinci_mcbsp_data {
+ unsigned int fmt;
+ int clk_div;
+};
+
+static struct davinci_mcbsp_data mcbsp_data;
Where, before the string "int clk_div", I have 4 spaces (\040
ascii character).
With v2.6.34 scripts/checkpatch.pl script I get:
scripts/checkpatch.pl 0001-ASoC-DaVinci-Added-support-for-stereo-I2S.patch
total: 0 errors, 0 warnings, 201 lines checked
0001-ASoC-DaVinci-Added-support-for-stereo-I2S.patch has no obvious style
problems and is ready for submission.
That is not correct. Instead with the proposed patch I get:
scripts/checkpatch.pl 0001-ASoC-DaVinci-Added-support-for-stereo-I2S.patch
WARNING: please, no space for starting a line,
excluding comments
#63: FILE: sound/soc/davinci/davinci-i2s.c:165:
+ int clk_div;$
WARNING: please, no space for starting a line,
excluding comments
#95: FILE: sound/soc/davinci/davinci-i2s.c:406:
+ return 0;$
total: 0 errors, 2 warnings, 201 lines checked
That is correct.
Signed-off-by: Raffaele Recalcati <raffaele.recalcati@bticino.it> Cc: Wolfram Sang <w.sang@pengutronix.de> Cc: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Wolfram Sang [Tue, 10 Aug 2010 00:20:57 +0000 (17:20 -0700)]
checkpatch: refactor 'allowed asm includes' and add memory.h
Change the check suggesting replacement of asm-includes with
linux-includes. Exceptions to this rule are easier to extend now. Add
memory.h because ARM has a custom one.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Cc: Russell King <linux@arm.linux.org.uk> Cc: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Eric Paris [Tue, 10 Aug 2010 00:20:56 +0000 (17:20 -0700)]
flex_array: add helpers to get and put to make pointers easy to use
Getting and putting arrays of pointers with flex arrays is a PITA. You
have to remember to pass &ptr to the _put and you have to do weird and
wacky casting to get the ptr back from the _get. Add two functions
flex_array_get_ptr() and flex_array_put_ptr() to handle all of the magic.
[akpm@linux-foundation.org: simplification suggested by Joe] Signed-off-by: Eric Paris <eparis@redhat.com> Cc: David Rientjes <rientjes@google.com> Cc: Dave Hansen <dave@linux.vnet.ibm.com> Cc: Joe Perches <joe@perches.com> Cc: James Morris <jmorris@namei.org> Cc: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Baruch Siach [Tue, 10 Aug 2010 00:20:53 +0000 (17:20 -0700)]
list debugging: warn when deleting a deleted entry
Use the magic LIST_POISON* values to detect an incorrect use of list_del
on a deleted entry. This DEBUG_LIST specific warning is easier to
understand than the generic Oops message caused by LIST_POISON
dereference.
Signed-off-by: Baruch Siach <baruch@tkos.co.il> Cc: Dave Jones <davej@codemonkey.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Joe Perches [Tue, 10 Aug 2010 00:20:49 +0000 (17:20 -0700)]
MAINTAINERS: add patterns to PS3VRAM DRIVER
Signed-off-by: Joe Perches <joe@perches.com> Cc: Jim Paris <jim@jtan.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Joe Perches [Tue, 10 Aug 2010 00:20:48 +0000 (17:20 -0700)]
MAINTAINERS: add patterns to OMAP USB
Signed-off-by: Joe Perches <joe@perches.com> Cc: Felipe Balbi <felipe.balbi@nokia.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Ben Nizette <bn@niasdigital.com> Acked-by: Hans J. Koch <hjk@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Joe Perches <joe@perches.com> Cc: Leo Chen <leochen@broadcom.com> Cc: Scott Branden <sbranden@broadcom.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Akinobu Mita [Tue, 10 Aug 2010 00:20:35 +0000 (17:20 -0700)]
char: add WARN_ON() in misc_deregister()
misc_deregister() returns an error only when it attempts to unregister
the device that is not registered. This is the driver's bug.
Most of the drivers don't check the return value of misc_deregister().
(It is not bad thing because most of kernel *_unregister() API always
succeed and do not return value)
So it is better to indicate the error by WARN_ON() in misc_deregister().
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Richard Kennedy [Tue, 10 Aug 2010 00:20:34 +0000 (17:20 -0700)]
stop_machine: struct cpu_stopper, remove alignment padding on 64 bits
Reorder elements in structure cpu_stopper to remove alignment padding on
64 bit builds, this shrinks its size from 40 to 32 bytes saving 8 bytes
per cpu.
Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk> Acked-by: Tejun Heo <tj@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Ingo Molnar <mingo@elte.hu> Cc: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Kevin Winchester [Tue, 10 Aug 2010 00:20:32 +0000 (17:20 -0700)]
init/main.c: mark do_one_initcall* as __init_or_module
Andrew Morton suggested that the do_one_initcall and do_one_initcall_debug
functions can be marked __init_or_module such that they can be discarded
for the CONFIG_MODULES=N case.
Signed-off-by: Kevin Winchester <kjwinchester@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Oleg Nesterov [Tue, 10 Aug 2010 00:20:30 +0000 (17:20 -0700)]
sys_personality: remove the bogus checks in sys_personality()->__set_personality() path
Cleanup, no functional changes.
- __set_personality() always changes ->exec_domain/personality, the
special case when ->exec_domain remains the same buys nothing but
complicates the code. Unify both cases to simplify the code.
- The -EINVAL check in sys_personality() was never right. If we assume
that set_personality() can fail we should check the value it returns
instead of verifying that task->personality was actually changed.
Remove it. Before the previous patch it was possible to hit this case
due to overflow problems, but this -EINVAL just indicated the kernel
bug.
OTOH, probably it makes sense to change lookup_exec_domain() to return
ERR_PTR() instead of default_exec_domain if the search in exec_domains
list fails, and report this error to the user-space. But this means
another user-space change, and we have in-kernel users which need fixes.
For example, PER_OSF4 falls into PER_MASK for unkown reason and nobody
cares to register this domain.
Christoph Mair [Tue, 10 Aug 2010 00:20:28 +0000 (17:20 -0700)]
drivers/misc: support for the pressure sensor BMP085 from Bosch Sensortec
This driver adds support for the BMP085 digital pressure sensor from Bosch
Sensortec. It exposes a sysfs api to userspace where pressure and
temperature measurement results can be read from the pressure0_input and
temp0_input file. The chip is able to calculate the average of up to
eight samples to increase the accuracy. This feature can be controlled by
writing to the oversampling file.
The BMP085 digital pressure sensor can measure ambient air pressure and
temperature. Both values can be obtained from sysfs files. The pressure
is measured by reading from pressure0_input. Valid values range from
30000 to 110000 pascal with a resolution of 1 pascal (=0.01 millibar).
temp0_input holds the current temperature in degree celsius, multiplied by
10. This results in a resolution of a tenth degree celsius. Values range
from -400 to 850.
To increase the accuracy, this chip can calculate the average of 1, 2, 4
or 8 samples. This behavior is controlled through the oversampling sysfs
file. Two to the power of the value written to that file specifies how
many samples will be used. Valid values: 0..3.
[akpm@linux-foundation.org: fix typo]
[shubhrajyoti@ti.com: optimize the wait time for the pressure sensor, definition of long is arch dependent so make it u32]
[akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Christoph Mair <christoph.mair@gmail.com> Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Cc: Stefan Schmidt <stefan@datenfreihafen.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Add support for ROHM BH1780GLI Ambient light sensor.
BH1780 supports I2C interface. Driver supports read/update of power state
and read of lux value (through SYSFS). Writing value 3 to power_state
enables the sensor and current lux value could be read.
Currently this driver follows the same sysfs convention as supported by
drivers/misc/isl29003.c.
Signed-off-by: Hemanth V <hemanthv@ti.com> Reviewed-by: Daniel Mack <daniel@caiaq.de> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Cc: Jean Delvare <khali@linux-fr.org> Cc: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Alexey Fomenko [Tue, 10 Aug 2010 00:20:24 +0000 (17:20 -0700)]
scripts/mod/modpost.c: fix memory leak
sec2annotation returns malloc'ed buffer directly to printf as an argument.
Free this buffer after printing.
Signed-off-by: Alexey Fomenko <ext-alexey.fomenko@nokia.com> Cc: Trevor Keith <tsrk@tsrk.net> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Michal Marek <mmarek@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Since every caller of iommu_num_pages passes in a constant power of two
we can inline this such that the divide is replaced by a shift. The
entire function is only a few instructions once optimised, so it is
a good candidate for inlining overall.
Signed-off-by: Anton Blanchard <anton@samba.org> Cc: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/readdir.c: In function `filldir64':
fs/readdir.c:240:15: warning: `dirent' is used uninitialized in this function
fs/readdir.c: In function `filldir':
fs/readdir.c:155:15: warning: `dirent' is used uninitialized in this function
fs/compat.c: In function `compat_filldir64':
fs/compat.c:1071:11: warning: `dirent' is used uninitialized in this function
fs/compat.c: In function `compat_filldir':
fs/compat.c:984:15: warning: `dirent' is used uninitialized in this function
The warnings are related to the use of the NAME_OFFSET() macro. Luckily,
it appears as though the standard offsetof() macro is what is being
implemented by NAME_OFFSET(), thus we can fix the warning and use a more
standard code construct at the same time.
Signed-off-by: Kevin Winchester <kjwinchester@gmail.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>