Commit graph

11595 commits

Author SHA1 Message Date
Gianluca Gennari abfac0b648 [media] as102: set optimal eLNA config values for each device
Ryley and me tested several eLNA configuration values with both a rooftop
and a portable antenna.

Ryley fuond out that the best value for his Elgato stick is indeed the current
default value 0xC0.

Instead, my stick is not capable of tuning VHF channels with 0xC0. With 0x80,
VHF works but the tuner sensitivity with the portable antenna is poor.
Instead, the value 0xA0 works with VHF and also gives good performance with
both the rooftop and the portable antenna.

So we concluded that devices built on the reference design work best with 0xA0,
while custom designs (Elgato, PCTV) seem to require 0xC0.

I also removed the unused parameter "minor" in struct as102_dev_t.

Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
Signed-off-by: Ryley Angus <rangus@student.unimelb.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 14:26:03 -03:00
Gianluca Gennari abf9d00537 [media] as102: add __packed attribute to structs defined inside packed structs
This patch fixes a regression in kernel 3.3 due to this patch:

http://patchwork.linuxtv.org/patch/8332/

That patch changes "#pragma pack(1)" with "__packed" attributes, but it is not
complete. In fact, in the as102 driver there are a lot of structs/unions
defined inside other structs/unions.
When the "__packed" attribute is applied only on the external struct, it will
not affect the internal struct definitions.
So the regression is fixed by specifiying the "__packed" attribute also on the
internal structs.

This patch should go into 3.3, as it fixes a regression introduced in the new
kernel version.

Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
Signed-off-by: Ryley Angus <rangus@student.unimelb.edu.au>
Cc: stable@kernel.org # for v3.3
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 14:26:02 -03:00
Mauro Carvalho Chehab 9ce28d827f Merge tag 'v3.3' into staging/for_v3.4
* tag 'v3.3': (1646 commits)
  Linux 3.3
  Don't limit non-nested epoll paths
  netfilter: ctnetlink: fix race between delete and timeout expiration
  ipv6: Don't dev_hold(dev) in ip6_mc_find_dev_rcu.
  nilfs2: fix NULL pointer dereference in nilfs_load_super_block()
  nilfs2: clamp ns_r_segments_percentage to [1, 99]
  afs: Remote abort can cause BUG in rxrpc code
  afs: Read of file returns EBADMSG
  C6X: remove dead code from entry.S
  wimax/i2400m: fix erroneous NETDEV_TX_BUSY use
  net/hyperv: fix erroneous NETDEV_TX_BUSY use
  net/usbnet: reserve headroom on rx skbs
  bnx2x: fix memory leak in bnx2x_init_firmware()
  bnx2x: fix a crash on corrupt firmware file
  sch_sfq: revert dont put new flow at the end of flows
  ipv6: fix icmp6_dst_alloc()
  MAINTAINERS: Add Serge as maintainer of capabilities
  drivers/video/backlight/s6e63m0.c: fix corruption storing gamma mode
  MAINTAINERS: add entry for exynos mipi display drivers
  MAINTAINERS: fix link to Gustavo Padovans tree
  ...
2012-03-19 13:41:24 -03:00
Konrad Rzeszutek Wilk 16c0cfa425 Merge branch 'stable/cleancache.v13' into linux-next
* stable/cleancache.v13:
  mm: cleancache: Use __read_mostly as appropiate.
  mm: cleancache: report statistics via debugfs instead of sysfs.
  mm: zcache/tmem/cleancache: s/flush/invalidate/
  mm: cleancache: s/flush/invalidate/
2012-03-19 12:12:19 -04:00
Andi Kleen bc01caf53d staging/zmem: Use lockdep_assert_held instead of spin_is_locked
WARN_ON(!spin_is_locked()) will always trigger on UP.
Use lockdep_assert_held instead.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-16 14:47:41 -07:00
Andrew Miller 40ec6c5421 Staging: rtl8187se: r8180_wx.c: Cleaned up comments
Realigned some comments and removed small bit of
old comments that I missed in my last commit

Signed-off-by: Andrew Miller <amiller@amilx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-15 16:46:55 -07:00
Andrew Miller e7e298e86e Staging: rtl8187se: r8180_wx.c: Removed old comments
Removed old comments that were not needed.

Signed-off-by: Andrew Miller <amiller@amilx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-15 16:46:55 -07:00
Andrew Miller 3e837dca33 Staging: rtl8187se: r8180_dm.c: Removed old comments
Removed some old comments

Signed-off-by: Andrew Miller <amiller@amilx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-15 16:40:21 -07:00
Greg Kroah-Hartman 296736552f Staging: android: ram_console.c:
Fix build error when CONFIG_PRINTK is not selected.

Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-15 16:38:14 -07:00
Andrew Miller da45e3fe89 Staging: rtl8187se: r8180_dm.c: Fix comments
Change c++ style comments to c style

Signed-off-by: Andrew Miller <amiller@amilx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-15 14:09:03 -07:00
Andrew Miller 536d190d77 Staging: rtl8187se: r8180_dm.c: Fix spacing issues
Fix spacing around keywords, '*', binary and ternary
operators, and fix the format of statments and function
declaration.

Signed-off-by: Andrew Miller <amiller@amilx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-15 14:06:32 -07:00
Andrew Miller 1748d2de4e Staging: rtl8187se: r8180_dm.c Fixed indentation issues
Fixed indentation issues and converted spaces,
that were being use for indentation, to tabs

Signed-off-by: Andrew Miller <amiller@amilx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-15 14:06:32 -07:00
Andrew Miller aada7fdd8d Staging: rtl8187se: r8180_dm.c: Fix brackets
Fix brackets that where out of place and removed
brackets that were not needed

Signed-off-by: Andrew Miller <amiller@amilx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-15 14:04:35 -07:00
Andrew Miller 004c7acb12 Staging: rtl8187se: r8180_dm.c: Removed spaces before tab stop
Clean up spaces before tab stops and some trailing space to.

Signed-off-by: Andrew Miller <amiller@amilx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-15 14:04:34 -07:00
Gerard Snitselaar bf3a85be67 staging: vme: fix section mismatches in linux-next 20120314
pio2_gpio_init() annotated with __init, but called by pio2_probe()
which is annotated __devinit. pio2_gpio_exit() is annotated __exit,
but is called by pio2_probe() and by pio2_remove() which is annotated
__devexit.

Signed-off-by: Gerard Snitselaar <dev@snitselaar.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-15 14:04:34 -07:00
Andrew Miller dec3a003bd Staging: rtl8187se: r8180_core.c: Fix some long line issues
Fix some lines that where fairly long judging off the
code around it.

Signed-off-by: Andrew Miller <amiller@amilx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-14 15:45:39 -07:00
Andrew Miller 24a39f702b Staging: rtl8187se: r8180_core.c: Fix some spacing issues
Removed spaces before tabs and
moved while statement in front of '}'

Signed-off-by: Andrew Miller <amiller@amilx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-14 15:44:31 -07:00
Andrew Miller cd6868080e Staging: rtl8187se: r8180_core.c: Removed trailing spaces
Cleaned up some trailing spaces

Signed-off-by: Andrew Miller <amiller@amilx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-14 15:44:31 -07:00
Tomas Winkler 66bfd64fc0 staging: mei: remove driver internal versioning
There is no need for internal module versioning for in-kernel driver:
remove mei_version.h

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-14 12:17:45 -07:00
Andrew Miller 7c26d76be7 Staging: rtl8187se: r8180_core.c: Cleaned up if statement
clean up the if statement's conditions to make them more
readable

fix the if statement's body indention, one tab stop to many.

Signed-off-by: Andrew Miller <amiller@amilx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-14 12:15:15 -07:00
Randy Dunlap 9948bc7e1d staging: ozwpan depends on NET
Fix build errors:  add depends on NET.

ERROR: "skb_clone" [drivers/staging/ozwpan/ozwpan.ko] undefined!
ERROR: "dev_get_by_name" [drivers/staging/ozwpan/ozwpan.ko] undefined!
ERROR: "dev_remove_pack" [drivers/staging/ozwpan/ozwpan.ko] undefined!
ERROR: "init_net" [drivers/staging/ozwpan/ozwpan.ko] undefined!
ERROR: "__alloc_skb" [drivers/staging/ozwpan/ozwpan.ko] undefined!
ERROR: "kfree_skb" [drivers/staging/ozwpan/ozwpan.ko] undefined!
ERROR: "dev_add_pack" [drivers/staging/ozwpan/ozwpan.ko] undefined!
ERROR: "consume_skb" [drivers/staging/ozwpan/ozwpan.ko] undefined!
ERROR: "dev_queue_xmit" [drivers/staging/ozwpan/ozwpan.ko] undefined!
ERROR: "skb_put" [drivers/staging/ozwpan/ozwpan.ko] undefined!

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Chris Kelly <ckelly@ozmodevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-14 12:14:26 -07:00
Tomas Winkler 1ccb7b6249 staging/mei: propagate error codes up in the write flow
Change mei_write_message's return type from bool to int
to enable propagation of the error code up to caller functions.
The function now returns -EIO when low level write fails and 0
on success.
A similar change is done in intermediate caller functions:
mei_send_flow_control, mei_connect, and mei_disconnect

This makes code more alike to typical Linux kernel error
handling.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-14 12:14:25 -07:00
Justin P. Mattock 5f9092f36f drivers:staging:mei Fix some typos in staging/mei
The below patch fixes some typos in drivers/staging/mei/* that I have found while
doing a little bit of reading.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-13 15:45:10 -07:00
Rob Clark 7411f9cfe6 staging: drm/omap: use current time for page-flip event
Because we don't have vblank hooked up via drm_irq (which is a bit
awkward due to separation between omapdss (which knows the irq #)
and omapdrm, for now use gettimeofday to have a semi-sane timestamp
in the page-flip event.  Otherwise apps like weston drm compositor,
which use the timestamp in it's animations, get highly confused.

Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-13 15:44:44 -07:00
Rob Clark 72d0c3363e staging: drm/omap: send page-flip event after endwin
The endwin irq indicates that DSS has finished scanning out a buffer.
Use this to trigger page-flip event to userspace, so this happens
only *after* the previous buffer is finished.

Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-13 15:44:44 -07:00
Rob Clark b66848eb85 staging: drm/omap: avoid multiple planes having same z-order
Multiple video pipes on same output with same z-order is an undefined
behavior.  Set a unique z-order value based on overlay number/id.

Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-13 15:44:44 -07:00
Víctor Manuel Jáquez Leal 4d3bfdda15 staging: tidspbridge: remove nldr_init() and nldr_exit()
The dynamic loader was called by node.c with an interface. This interface was
also modified to avoid the use of nldr_init() and nldr_exit().

There is not functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09 13:21:08 -08:00
Víctor Manuel Jáquez Leal 81e8b88a14 staging: tidspbridge: remove ref counting in nldr.c
The nldr module has a nldr_init() and a nldr_exit() whose only purpose
is to keep a reference counting which is not used at all.

This patch only removes the reference count variable, but not the
functions, because they are used through an interface.

There is no functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09 13:21:08 -08:00
Víctor Manuel Jáquez Leal d111f6e94d staging: tidspbridge: remove gh_init() and gh_exit()
The gh module has a gh_init() and a gh_exit(), but they don't do
anything, they are just noops.

This patch removes these functions.

There is no functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09 13:21:08 -08:00
Víctor Manuel Jáquez Leal 5204133879 staging: tidspbridge: simplify mgr_init()
No functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09 13:21:08 -08:00
Víctor Manuel Jáquez Leal a05c5dc3fc staging: tidspbridge: remove dev_init() and dev_exit()
The dev module has a dev_init() and a dev_exit() whose only purpose is
to keep a reference counting which is not used at all.

This patch removes these functions and the reference count variable.

There is no functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09 13:21:08 -08:00
Víctor Manuel Jáquez Leal d071c0e9ca staging: tidspbridge: remove dmm_init() and dmm_exit()
The dmm module has a dmm_init() and a dmm_exit() whose only purpose is
to keep a reference counting which is not used at all.

This patch removes these functions and the reference count variable.

There is no functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09 13:21:07 -08:00
Víctor Manuel Jáquez Leal a71aa396ee staging: tidspbridge: remove cmm_init() and cmm_exit()
The cmm module has a cmm_init() and a cmm_exit() whose only purpose is
to keep a reference counting which is not used at all.

This patch removes these functions and the reference count variable.

There is no functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09 13:21:07 -08:00
Víctor Manuel Jáquez Leal b4aac487b0 staging: tidspbridge: remove io_init() and io_exit()
The io module has a io_init() and a io_exit() whose only purpose is to
keep a reference counting which is not used at all.

This patch removes these functions and the reference count variable.

There is no functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09 13:21:07 -08:00
Víctor Manuel Jáquez Leal 1471d6c69f staging: tidspbridge: remove msg_mod_init() and msg_exit()
The msg module has a msg_mod_init() and a msg_exit() whose only
purpose is to keep a reference counting which is not used at all.

This patch removes these functions and the reference count variable.

There is no functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09 13:21:07 -08:00
Víctor Manuel Jáquez Leal 9658a54dfa staging: tidspbridge: remove chnl_init() and chnl_exit()
The chnl module has a chnl_init() and a chnl_exit() whose only purpose
is to keep a reference counting which is not used at all.

This patch removes these functions and the reference count variable.

There is no functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09 13:21:07 -08:00
Víctor Manuel Jáquez Leal 974f9cd50a staging: tidspbridge: remove rmm_init() and rmm_exit()
The rmm module has a rmm_init() and a rmm_exit() whose only purpose is
to keep a reference counting which is not used at all.

This patch removes these functions and the reference count variable.

There is no functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09 13:21:07 -08:00
Víctor Manuel Jáquez Leal 311abd9ac4 staging: tidspbridge: remove strm_init() and strm_exit()
The strm module has a strm_init() and a strm_exit() whose only purpose
is to keep a reference counting which is not used at all.

This patch removes these functions and the reference count variable.

There is no functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09 13:21:06 -08:00
Víctor Manuel Jáquez Leal 2f69a43b8f staging: tidspbridge: remove disp_init() and disp_exit()
The disp module has a disp_init() and a disp_exit() whose only purpose
is to keep a reference counting which is not used at all.

This patch removes these functions and the reference count variable.

There is no functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09 13:21:06 -08:00
Víctor Manuel Jáquez Leal 18ff159260 staging: tidspbridge: remove node_init() and node_exit()
The node module has a node_init() and a node_exit() whose only purpose
is to keep a reference counting which is not used at all.

This patch removes these functions and the reference count variable.

There is no functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09 13:21:06 -08:00
Víctor Manuel Jáquez Leal 02a63f9dbc staging: tidspbridge: remove proc_init() and proc_exit()
The proc module has a proc_init() and a proc_exit() whose only purpose
is to keep a reference counting which is not used at all.

This patch removes these functions and the reference count variable.

There is no functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09 13:21:06 -08:00
Víctor Manuel Jáquez Leal d4040fadc0 staging: tidspbridge: remove cod_init() and cod_exit()
The cod module has a cod_init() and a cod_exit() whose only purpose is
to keep a reference counting which is not used at all.

This patch removes these functions and the reference count variable.

There is no functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09 13:21:06 -08:00
Víctor Manuel Jáquez Leal 1f2cd527e2 staging: tidspbridge: remove drv_init() and drv_exit()
The drv module has a drv_init() and a drv_exit() whose only purpose is
to keep a reference counting which is not used at all.

This patch removes these functions and the reference count variable.

There is no functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09 13:21:05 -08:00
Arve Hjønnevåg 2a90957f2c Staging: android: binder: Fix use-after-free bug
binder_update_page_range could read freed memory if the vma of the
selected process was freed right before the check that the vma
belongs to the mm struct it just locked.

If the vm_mm pointer in that freed vma struct had also been rewritten
with a value that matched the locked mm struct, then the code would
proceed and possibly modify the freed vma.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09 13:14:08 -08:00
Stephen Boyd 06caa4174e staging: ram_console: Fix section mismatches
WARNING: vmlinux.o(.text+0xfcf6e): Section mismatch in reference
from the function ram_console_driver_probe() to the function
.init.text:persistent_ram_init_ringbuffer()
The function ram_console_driver_probe() references
the function __init persistent_ram_init_ringbuffer().
This is often because ram_console_driver_probe lacks a __init
annotation or the annotation of persistent_ram_init_ringbuffer is
wrong.

Move this driver to platform_driver_probe() because ram console
devices aren't going to be added and removed at runtime. Also
shorten the probe function name since driver is redundant and
makes the function name long.

Cc: Android Kernel Team <kernel-team@android.com>
Cc: John Stultz <john.stultz@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09 13:14:08 -08:00
Alexandru Guduleasa 3ee0206b5e staging/comedi/drivers fix spelling errors
Fix the following spelling errors:
inital -> initial
continous -> continuous
aquisition -> acquisition
aquisitions -> acquisitions
immidiately -> immediately

Signed-off-by: Alexandru Guduleasa <alexandru.guduleasa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09 13:14:08 -08:00
Jiri Slaby 3ee0017e03 TTY: speakup, do not use serialP
The structures there are going away. And speakup has enough troubles
already.

So define a structure similar to what 8250 does: old_serial_port.
There define an array of speed, port base and so on needed for
configuration. Then use this structure instead of serial_state defined
in serialP.h.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: William Hubbs <w.d.hubbs@gmail.com>
Cc: Chris Brannon <chris@the-brannons.com>
Cc: Kirk Reiser <kirk@braille.uwo.ca>
Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 11:47:02 -08:00
Alan Cox 079c9534a9 vt:tackle kbd_table
Keyboard struct lifetime is easy, but the locking is not and is completely
ignored by the existing code. Tackle this one head on

- Make the kbd_table private so we can run down all direct users
- Hoick the relevant ioctl handlers into the keyboard layer
- Lock them with the keyboard lock so they don't change mid keypress
- Add helpers for things like console stop/start so we isolate the poking
  around properly
- Tweak the braille console so it still builds

There are a couple of FIXME locking cases left for ioctls that are so hideous
they should be addressed in a later patch. After this patch the kbd_table is
private and all the keyboard jiggery pokery is in one place.

This update fixes speakup and also a memory leak in the original.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 10:50:35 -08:00
Masanari Iida fb281c2d69 staging: crystalhd: Fix typo in crystalhd_hw.c
Correct spelling "interal" to "internal" in
drivers/staging/crystalhd/crystalhd_hw.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 09:57:38 -08:00
Nick Kralevich dd09979346 staging: android: ram_console: honor dmesg_restrict
The Linux kernel has a setting called dmesg_restrict. When true,
only processes with CAP_SYSLOG can view the kernel dmesg logs. This
helps prevent leaking of kernel information into user space.

On Android, it's possible to bypass these restrictions by viewing
/proc/last_kmsg.

This change makes /proc/last_kmsg require the same permissions as
dmesg.

CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Nick Kralevich <nnk@google.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 09:37:10 -08:00
Colin Cross 3a21138d3f staging: android: ram_console: fix crash in ram_console_late_init
If the persistent ram buffer is not available, ram_console_late_init
would crash when dereferencing ram_console_zone.  Return early if
ram console was not initialized.

CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 09:37:09 -08:00
Colin Cross a15d0b365e staging: android: persistent_ram: add notrace to persistent_ram_write
Add the notrace attribute to persistent_ram_write and the
non-ecc functions that it calls to allow persistent_ram to
be used for ftracing (only when ecc is disabled).

CC: Greg KH <gregkh@linuxfoundation.org>
CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 09:36:08 -08:00
Colin Cross 808d0387eb staging: android: persistent_ram: make persistent_ram_write atomic
Allow persistent_ram_write to be called on multiple cpus at
the same time, as long as ecc is not in use.  Uses atomics
for the buffer->start and buffer->size counters.

[jstultz: Fix up some pr_info casting issues on 64bit]
CC: Greg KH <gregkh@linuxfoundation.org>
CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 09:36:08 -08:00
Colin Cross 404a604338 staging: android: persistent_ram: handle reserving and mapping memory
Replace the ioremapped memory passed in from the drivers with
a memblock_reserve and vmap.  Adds a new function,
persistent_ram_early_init, designed to be called from the machine
init_early callback, that calls memblock_remove and saves the
provided persistent ram area layout.

Drivers only pass in their struct device * and ecc settings.
Locating and mapping the memory is now handled entirely within
persistent_ram.

Also, convert ram_console to the new persistent_ram_init
parameters that only take a struct device * and ecc settings.

[jstultz: Fix pr_info casting issues on 64bit, folded two
patches as the build breaks if they are apart. Also replaced
phys_to_page() w/ pfn_to_page(addr>>PAGE_SHIFT), as phys_to_page
is only on a few arches.]
CC: Greg KH <gregkh@linuxfoundation.org>
CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 09:36:08 -08:00
Colin Cross 9cc05ad97c staging: android: persistent_ram: refactor ecc support
Remove CONFIG_ANDROID_RAM_CONSOLE_ERROR_CORRECTION and related
 #ifdefs.  Also allow persistent ram zones without ecc enabled.
For some use cases, like the data portion of the upcoming
persistent_vars patches, or a persistent ftrace ringbuffer,
ecc on every update is too expensive.

CC: Greg KH <gregkh@linuxfoundation.org>
CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 09:36:08 -08:00
Colin Cross c672528aec staging: android: ram_console: split out persistent ram
Split ram_console into two halves.

persistent_ram is a set of apis that handle a block of memory
that does not get erased across a reboot.  It provides functions
to fill it as a single buffer or a ring buffer, and to extract
the old data after a reboot.  It handles ecc on the data to
correct bit errors introduced during reboot.

ram_console is now a small wrapper around persistent_ram that
feeds console data into the ringbuffer, and exports the old
data to /proc/last_kmsg after a reboot.

[jstultz: Moved persistent_ram.h to staging dir]
CC: Greg KH <gregkh@linuxfoundation.org>
CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-08 09:36:08 -08:00
Ezequiel García d994c46d43 [media] staging: easycap: Fix incorrect comment
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 11:32:55 -03:00
Ezequiel García 2bc1e212b3 [media] staging: easycap: Clean comment style in easycap_usb_probe()
Some of these comments may still need to be reviewed.
This patch only cleans the comment style.

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 11:32:43 -03:00
Gianluca Gennari f8f7be019a [media] as102: map URB DMA addresses in the driver
On a set-top-box based on the Broadcom 7405 SoC (MIPS), the Abilis as102 driver
causes a kernel oops while trying to map the URB stream buffers DMA addresses:

CPU 0 Unable to handle kernel paging request at virtual address 007b9900,
epc == 80010cc4, ra == 8039d108

Call Trace:
[<80010cc4>] mips_dma_map_page+0x14/0x108
[<8039d108>] usb_hcd_map_urb_for_dma+0x338/0x4a8
[<8039d540>] usb_hcd_submit_urb+0x2c8/0x8cc
[<e13655d8>] as102_submit_urb_stream+0x64/0xc8 [dvb_as102]
[<e1365680>] as102_usb_start_stream+0x44/0x80 [dvb_as102]
[<e1363628>] as102_dvb_dmx_start_feed+0xb4/0x17c [dvb_as102]
[<803e20f4>] dmx_ts_feed_start_filtering+0x5c/0x134
[<803de454>] dvb_dmxdev_start_feed+0xd4/0x158
[<803dff28>] dvb_dmxdev_filter_start+0x2b8/0x448
[<803e07ac>] dvb_demux_do_ioctl+0x2a0/0x654
[<803ddc8c>] dvb_usercopy+0x124/0x204
[<800d5284>] do_vfs_ioctl+0xa0/0x6c0
[<800d58e8>] sys_ioctl+0x44/0xa8
[<8000ecfc>] stack_done+0x20/0x40

On other boxes based on older SoCs (7401) this doesn't happen, so it looks like
a bug in the kernel specific to MIPS SMP. This issue has been reproduced on
several kernel versions from 2.6.18 to 3.1.0.

Since the base DMA address and the offsets are known, it is possible to map
the DMA addresses of the URB buffers directly in the driver. This workaround
fixes the problem and has been tested on both MIPS and x86 CPUs with success.

By the way, with this fix the driver works perfectly fine on the set-top-box:
both UHF and VHF frequencies are tuned without problems, and zapping is quite
fast. SNR and signal strength reports seems to work fine, too.

The only remaining problem (on both the PC and the set-top-box) is that after
a soft reboot the device is not recognized again by the kernel. It requires
a power cycle (or a manual unplug/replug) to be recognized again. So probably
the device state is not reset properly at shut-down.

Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 09:00:00 -03:00
Alexey Khoroshilov 0c07aec31a [media] staging: go7007: fix mismatch in mutex lock-unlock in [read|write]_reg_fp
If go7007_usb_vendor_request() fails in write_reg_fp()
or in read_reg_fp(), the usb->i2c_lock mutex left locked.

The patch moves mutex_unlock(&usb->i2c_lock) before check
for go7007_usb_vendor_request() returned value.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 08:55:39 -03:00
Colin Cross c5ee1211f2 staging: android: ram_console: drop verbose ram_console support
Equivalent functionality can be obtained with loglevel=15

CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-07 18:32:40 -08:00
Colin Cross 8294e2362f staging: android: ram_console: drop early buffer support
Early ramconsole is not very useful, an early crash will prevent
getting the logged data out on the next boot, and CONFIG_DEBUG_LL=y
will get the same information.  Drop it to simplify a future
refactoring.

CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-07 18:32:40 -08:00
Colin Cross f6ccb80ed6 staging: android: ram_console: move footer strings
Don't store the bootinfo string and the ecc status string with
the recovered old log data.  This will simplify refactoring the
persistent ram code out of the ram console code later.

CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-07 18:32:40 -08:00
Dima Zavin 74f6736ecf staging: android: ram_console: set CON_ANYTIME console flag
We want to ensure that we get all the console messages, even ones
that occur while the printing CPU is not yet online.

[jstultz: tweaked commit subject line]
CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Dima Zavin <dima@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-07 18:32:40 -08:00
Tomas Winkler 97d5cb094c staging/mei: don't use read buffer for writing
In mei_irq_thread_read_bus_message we reused mei_hdr
allocated on read buffer to write the stop message.
There is no bug associated with this but for code
clarity we use write buffer also for message header.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-07 13:45:42 -08:00
Rob Clark e559895ae9 staging: drm/omap: mmap of tiled buffers with stride >4kb
Deal with the case of buffers with virtual stride larger than one
page in fault_2d().

Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-07 13:38:08 -08:00
Andy Gross 5c13779737 staging: drm/omap: Get DMM resources from hwmod
This patch splits the DMM off into a separate sub-device, in order to
utilize the platform device information that was created as part of
the OMAP hwmod entry for the DMM.

The driver probe function queries the iomem resource and IRQ using
standard platform_get functions.

The OMAP DRM driver now calls the platform_driver_register() function
for the subordinate DMM driver inside its probe function.  This
guarantees the required order for the DMM and ensures the DMM resources
are available for use by the DRM driver.

Signed-off-by: Andy Gross <andy.gross@ti.com>
Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-07 13:38:08 -08:00
Andy Gross 02646fb8b3 staging: drm/omap: Validate debugfs device
Added check for valid device information before dumping debugfs
information.

Signed-off-by: Andy Gross <andy.gross@ti.com>
Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-07 13:38:07 -08:00
Andy Gross 132390c79e staging: drm/omap: Disable DMM debugfs for OMAP3
OMAP3 does not contain a DMM/Tiler block.  As such, we should not
be exposing any DMM debugfs entries on OMAP3 platforms.

Added inline helper function to verify existence of DMM.

Signed-off-by: Andy Gross <andy.gross@ti.com>
Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-07 13:38:07 -08:00
Rob Clark f6b6036e56 staging: drm/omap: debugfs for object and fb tracking
Add some additional debugfs file to aid in tracking buffer usage.

Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-07 13:38:07 -08:00
Rob Clark b33f34d3d1 staging: drm/omap: defer unpin until scanout completes
When flipping, defer unpinning until scanout completes, as indicated
by the appropriate END_WIN irq.

This also re-organizes things a bit, in replacing omap_fb_{pin,unpin}
with omap_fb_replace(), to make it easier to add support for scanout
synchronized DMM refill mode (flipping by just reprogramming DMM
synchronized with DSS scanout).

Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-07 13:38:07 -08:00
Rob Clark 9f18c95abb staging: drm/omap: some minor fb cleanups
Now that 'struct drm_plane' has a pixel_format field, use that.  And
fix a minor typo.

Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-07 13:38:07 -08:00
Rob Clark 9b55b95a8e staging: drm/omap: call omap_gem_roll() in non-atomic ctx
If fbcon calls us from atomic context, push the work off to the
workqueue to avoid calling into the gem/dmm code in an atomic
context.

Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-07 13:38:07 -08:00
Rob Clark 5609f7fe30 staging: drm/omap: add a workqueue
Add a workqueue for omapdrm driver, which is needed for at least a
couple things currently: (1) moving omap_gem_roll() to a non-atomic
context, (2) synchronizing page flips w/ DSS scanout related irq's
(in particular not unmapping previous buffer until DSS finishes
scanout).

Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-07 13:38:06 -08:00
Rob Clark a890e6623a staging: drm/omap: get supported color formats from ovl
Get the supported formats for a plane from ovl's supported_modes
bitmask.

Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-07 13:38:06 -08:00
Grant Grundler dbf717fd9a staging:iio:tsl2563 rewrite probe error handling
tsl2563 probe function has two minor issues with it's error handling paths:
1) it is silent (did not report errors to dmesg)
2) did not return failure code (mixed up use of ret and err)

and two major issues:
3) goto fail2 would corrupt a free memory pool ("double free")
4) device registration failure did NOT cancel/flush delayed work.
   (and thus dereference a freed data structure later)

The "double free" is subtle and was introduced with this change:
    Author: Jonathan Cameron <jic23@cam.ac.uk>
    Date:   Mon Apr 18 12:58:55 2011 +0100
    staging:iio:tsl2563 take advantage of new iio_device_allocate private data.

Originally, chip was allocated seperately. Now it's appended to the
indio_dev by iio_allocate_device(sizeof(*chip)). So we only need one
kfree call as well (in iio_free_device()).

Gory details of tracking this down are here:
   http://crosbug.com/26819

Despite iio_device_registration failing, system can at least now boot.
Will follow up with a fix to "double register : in_intensity_both_raw"
error that is included in the bug report.

Signed-off-by: Grant Grundler <grundler@chromium.org>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Reviewed-by: Bryan Freed <bfreed@chromium.org>
Reviewed-by: Benson Leung <bleung@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-07 13:36:45 -08:00
Larry Finger ee6aeff71e staging: r8712u: Fix Smatch warning
The patch 2080913e01: "staging: r8712u: Fix regression caused by
commit 8c213fa" from Feb 25, 2012, leads to the following Smatch
complaint:

drivers/staging/rtl8712/usb_intf.c:629 r871xu_dev_remove()
	 warn: variable dereferenced before check 'padapter' (see line 625)

The fix is to move the new statements inside the block where padapter
is not NULL.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-07 13:36:45 -08:00
Seth Jennings b76dee4a41 staging: zsmalloc: remove SPARSEMEM dep from Kconfig
This patch removes the SPARSEMEM from the zsmalloc
Kconfig

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Acked-by: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-07 13:31:28 -08:00
Seth Jennings b9ed4f6c9a staging: zsmalloc: change ZS_MIN_ALLOC_SIZE
This patch ensures that the value of ZS_MIN_ALLOC_SIZE, for the
PAGE_SIZE and MAX_PHYSMEM_BITS on the system, allows for all
possible object ids in the lowest storage class to be encoded
in the object handle.

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Acked-by: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-07 13:31:28 -08:00
Seth Jennings 6e00ec00b1 staging: zsmalloc: calculate MAX_PHYSMEM_BITS if not defined
This patch provides a way to determine or "set a
reasonable value for" MAX_PHYSMEM_BITS in the case that
it is not defined (i.e. !SPARSEMEM)

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Acked-by: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-07 13:31:28 -08:00
Seth Jennings 84d4faaba2 staging: zsmalloc: add ZS_MAX_PAGES_PER_ZSPAGE
This patch moves where max_zspage_order is declared and
changes its meaning.  "Order" typically implies 2^order
of something; however, it is currently being used as the
"maximum number of single pages in a zspage".  To add clarity,
ZS_MAX_ZSPAGE_ORDER is now used to calculate ZS_MAX_PAGES_PER_ZSPAGE,
which is 2^ZS_MAX_ZSPAGE_ORDER and is the upper bound on the number
of pages in a zspage.

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Acked-by: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-07 13:31:28 -08:00
Seth Jennings aafefe932a staging: zsmalloc: move object/handle masking defines
This patch moves the definitions of _PFN_BITS, OBJ_INDEX_BITS
and OBJ_INDEX_MASK from zsmalloc-main.c to zsmalloc_int.h

They will be needed to determine ZS_MIN_ALLOC_SIZE in the next
patch

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Acked-by: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-07 13:31:28 -08:00
Seth Jennings bec25dfd85 staging: zcache: make zcache builtin only
zcache cannot currently be loaded as a module.  However
the Kconfig allows it to be built as a module; something that
the user probably does not intend since the module is not
loadable.

This patch switches zcache from a tristate to a bool in the Kconfig

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-07 13:30:17 -08:00
Lars-Peter Clausen 4fee7e168b staging:iio: Fix compile error without CONFIG_DEBUG_FS
commit e553f182d ("staging: iio: core: Introduce debugfs support, add support
for direct register access") added a '#if defined(CONFIG_DEBUG_FS)' around
iio_read_channel_ext_info and iio_write_channel_ext_info causing the following
compile error if CONFIG_DEBUG_FS is not defined.

	drivers/staging/iio/industrialio-core.c:621:11: error: 'iio_read_channel_ext_info' undeclared (first use in this function)
	drivers/staging/iio/industrialio-core.c:623:11: error: 'iio_write_channel_ext_info' undeclared (first use in this function)

This patch fixes the issue by moving the functions out of the '#if
defined(CONFIG_DEBUG_FS)' section again.

Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-07 13:26:52 -08:00
Greg Kroah-Hartman 624b225035 Staging: android: lowmemorykiller.c
Fix compiler warning about the type of the module parameter.

Cc: San Mehat <san@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-07 13:21:23 -08:00
Paul E. McKenney 1eda5166c7 staging: android/lowmemorykiller: Don't unregister notifier from atomic context
The lowmemorykiller registers an atomic notifier for notfication of when
the task is freed.  From this atomic notifier callback, it removes the
atomic notifier via task_free_unregister().  This is incorrect because
atomic_notifier_chain_unregister() calls syncronize_rcu(), which can
sleep, which shouldn't be done from an atomic notifier.

Fix this by registering the notifier during init, and only unregister it
if the lowmemorykiller is unloaded.

Rebased to -next by Paul E. McKenney.
Rebased to -next again by Anton Vorontsov.

Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Christian Bejram <christian.bejram@stericsson.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reported-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-07 13:18:51 -08:00
Zhengwang Ruan 2c52325ed2 Staging:android: Change type for binder_debug_no_lock switch to bool
GCC warns that module_param_named() indirectly returns a bool type value
which is different from 'int' type binder_debug_no_lock declared. Change
it to bool because it is a internal switch for debugging.

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-07 13:18:51 -08:00
Greg Kroah-Hartman 1ec41a31fb staging: ozwpan: remove debug allocator
The kernel already has a debug allocator, no need to have one unique to
a single driver.  So delete it, replace with kfree, kmalloc, and, in a
few places that need it, kzalloc().

Cc: Chris Kelly <ckelly@ozmodevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-02 16:51:09 -08:00
Kevin McKinney cc55bb03ea Staging: bcm: fix possible memory leak of 'pstAddIndication' in CmHost.c and removes a whitespace
Memory is being allocated by kmalloc and stored in
variable pstAddIndication.  However, this memory is
not being freed in all cases. Therefore, this patch
frees it on several exit paths. This patch also
removes a whitespace.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-02 16:36:55 -08:00
Martin Krause 07b99cf55c Staging: rtl8712/rtl8192u: move USB device ID within staging drivers.
It seems the USB device ID 0bda:8192 is wrongly assigned to the
RTL8192SU chip and not to the RTL8191SU chip in the USB database.
So this patch moves this device ID from the rtl8192u staging
driver to the rtl8712 staging driver.

This patch was tested with a Radicom WIFIHU embedded wireless
module with a RTL8191SU chip and the USB device ID 0bda:8192.
Without the patch the rtl8192u driver claims this device, but
it does not work. With the patch the rtl8712 driver services
this device and it works.

Signed-off-by: Martin Krause <martin.krause@tqs.de>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-02 16:36:38 -08:00
Martin Krause 534717020e Staging rtl8712: Remove double USB device IDs
Remove copies of the double USB device IDs:

- 0bda:8172
- 0bda:8174

Signed-off-by: Martin Krause <martin.krause@tqs.de>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-02 16:36:38 -08:00
Michael Hennerich 5f953732ac staging: iio: Convert platform_drivers to use module_platform_driver
No functional changes.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-02 16:35:39 -08:00
Michael Hennerich 0f1acee5f5 staging: iio: core: Avoid NULL pointer de-ref in case indio_dev->setup_ops are not in use
Drivers may not need setup_ops at all, so let the core supply
some empty ops.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-02 16:35:39 -08:00
Michael Hennerich e553f182d5 staging: iio: core: Introduce debugfs support, add support for direct register access
Changes since V1:

Exclude iio debugfs code in case CONFIG_DEBUG_FS isn't enabled.
	Introduce helper function iio_get_debugfs_dentry.
	Document additions to struct iio_dev

iio_debugfs_read_reg:
	Use snprintf.
	Use a shorter fixed length.
	Introduce len instead of pointer math.

iio_debugfs_write_reg:
	Fix return value use PT_ERR.

Changes since V2:

Use debugfs_remove.
Fix whitespace damage.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-02 16:35:39 -08:00
Justin P. Mattock 4abf6f8b29 drivers:staging:iio Fix typos and comments in staging iio.
The below patch fixes some comments and some typos that I have found
while reading drivers/staging/iio/*

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-02 16:33:52 -08:00
Dan Carpenter 92a6253299 Staging: ozwpan: prevent bogus dereference
app_id comes from the network and can't be trusted.  If it's zero then
it will lead to a kernel crash.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Chris Kelly <ckelly@ozmodevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-02 16:32:21 -08:00
Chris Kelly f2e332662b staging: ozwpan: added TODO file.
Added TODO file for ozwpan driver.

Signed-off-by: Chris Kelly <ckelly@ozmodevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-02 16:32:21 -08:00
Larry Finger da3e6ec2f4 staging: r8712u: Fix regression in signal level after commit c6dc001
In commit c6dc001 "staging: r8712u: Merging Realtek's latest (v2.6.6).
Various fixes", the returned qual.qual member of the iw_statistics
struct was changed. For strong signals, this change made no difference;
however for medium and weak signals it results in a low signal that
shows considerable fluctuation, When using wicd for a medium-strength
AP, the value reported in the status line is reduced from 100% to 60% by
this bug.

This problem is reported in https://bugzilla.kernel.org/show_bug.cgi?id=42826.

Reported-and-tested-by: Robert Crawford <wrc1944@gmail.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-29 16:28:56 -08:00
Larry Finger 2080913e01 staging: r8712u: Fix regression caused by commit 8c213fa
In commit 8c213fa "staging: r8712u: Use asynchronous firmware loading",
the command to release the firmware was placed in the wrong routine.

In combination with the bug introduced in commit a5ee652 "staging: r8712u:
Interface-state not fully tracked", the driver attempts to upload firmware
that had already been released. This bug is the source of one of the
problems in https://bugs.archlinux.org/task/27996#comment89833.

Tested-by: Alberto Lago Ballesteros <saniukeokusainaya@gmail.com>
Tested-by: Adrian <agib@gmx.de>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-29 16:28:51 -08:00
Larry Finger 9f4bc8cf3f staging: r8712u: Fix regression introduced by commit a5ee652
In commit a5ee652 "staging: r8712u: Interface-state not fully tracked",
the private boolean "bup" was set false when the interface was brought down,
as that seemed appropriate. This change has not caused any problems when
using NetworkManager or manual control of the device; however, when wicd
control is used, there is a locking problem in wpa_supplicant, as shown in
https://bugzilla.kernel.org/show_bug.cgi?id=42818.

This fix reverts the only code change in commit a5ee652. My
analysis is that "bup" is badly named. In its present form, it
seems to indicate the up/down state of the device, but its usage
is more consistent with an initialized/uninitialized state. That
problem will be addressed in a later patch.

Note: Commit 8c213fa, which introdued asynchronous firmware loading
for this driver, exposed this bug to a greater extent. That bug
is addressed in the next patch in this series.

This bug is also responsible for the bug in
https://bugzilla.kernel.org/show_bug.cgi?id=42815. and this bug is
also part of the problems discussed at https://bugs.archlinux.org/task/27996#comment89950.

Tested-by: Alberto Lago Ballesteros <saniukeokusainaya@gmail.com>
Tested-by: Adrian <agib@gmx.de>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org> [3.2+]
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-29 16:28:50 -08:00