Commit graph

106276 commits

Author SHA1 Message Date
Greg Kroah-Hartman 27f55e920d Staging: samsung-laptop: fix up space/tab coding style issues
These were introduced with the patch, "staging: samsung-laptop: Extend
samsung-laptop platform driver to support another flavor of its platform
BIOS."

Cc: Ingmar Steen <iksteen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 12:19:45 -08:00
Ingmar Steen 837b03cd18 staging: samsung-laptop: Added Samsung X125 DMI info.
Signed-off-by: Ingmar Steen <iksteen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 12:16:29 -08:00
Ingmar Steen 988a29bf3d staging: samsung-laptop: Extend samsung-laptop platform driver to support another flavor of its platform BIOS.
There are currently two implementations of the Samsung BIOS that controls the rfkill
switch, backlight brightness / power and performance level. The samsung-laptop driver
implements the BIOS flavor with the SECLINUX signature, this patch implements talking
to the other BIOS with 'SwSmi@' signature. Both expose very similar functionality and
way of accessing the commands. The differences are mostly offsets, command identifiers
and some values.

This patch introduces a sabi_config structure that contains information on identifying
and accessing specific SABI flavors.

Signed-off-by: Ingmar Steen <iksteen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 12:15:34 -08:00
Timo von Holtz f94fdeaa58 Staging: quickstart: fixed coding style issues
Fixed the Following coding Style Issues:
drivers/staging/quickstart/quickstart.c:8: ERROR: trailing whitespace
drivers/staging/quickstart/quickstart.c:144: ERROR: spaces required around that '?' (ctx:VxV)
drivers/staging/quickstart/quickstart.c:144: ERROR: spaces required around that ':' (ctx:VxV)

Signed-off-by: Timo von Holtz <tvh@informatik.uni-kiel.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 12:11:55 -08:00
Dan Carpenter 7e79f78b33 Staging: rts_pstor: fix read past end of buffer
We read one space past the end of the buffer because we add 1.

Also I changed it to use ARRAY_SIZE() instead of manually calculating
the size.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 12:11:55 -08:00
Timo von Holtz 581de3b0a5 Staging: hv: moved assignments out of if conditions
Moved all assignments in if conditions to the preceeding line

Signed-off-by: Timo von Holtz <tvh@informatik.uni-kiel.de>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 12:11:55 -08:00
Timo von Holtz 3c4a94132b Staging: hv: replaced __attribute((packed)) with __packed
Replaced __attribute((packed)) with __packed as it's preferred

Signed-off-by: Timo von Holtz <tvh@informatik.uni-kiel.de>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 12:11:54 -08:00
Andres Salomon 56463de05a staging: olpc_dcon: actually return the value of i2c_add_driver
It's nice to actually check for errors. :)

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 12:11:54 -08:00
Andres Salomon bada46e5ab staging: olpc_dcon: move more variables into dcon_priv
Global variables for display mode and the current sleep state
can go into dcon_priv as well.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 12:11:54 -08:00
Andres Salomon bb4103544e staging: olpc_dcon: change sysfs 'output' toggle to be clearer...
..and store it in dcon_priv.  This renames it to 'monochrome',
which I think is much clearer.  Previously, "echo 1 > output"
toggled mono mode, while "echo 0 > output" enabled color.
"Echo 1 > monochrome" makes more sense to me.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 12:11:54 -08:00
Andres Salomon 8d2d3dd1b4 staging: olpc_dcon: get rid of global i2c_client, create a dcon_priv struct
Rather than using the global i2c_client variable, create a dcon_priv
struct, store in the drvdata portion of the dev, and pass that around.

In order to access dcon struct from various callbacks, include
the reboot notifier and source switching work struct in the dcon struct.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 12:11:54 -08:00
Andres Salomon fe2d5b4380 staging: olpc_dcon: revert strtoul change
On Fri, 4 Feb 2011 15:44:43 -0800

From: Andres Salomon <dilinger@queued.net>

The s/simple_strtoul/strict_strtoul/ from commit e107e6eb added a build
warning, as well as an oops.  This reverts that change.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 12:11:53 -08:00
Tomas Winkler 2ef0c05e80 staging/easycap: replace NOREADBACK with moduel parameter
NOREADBACK doesn't justify Kconfig option so we use module
paramter for it.

Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:59:07 -08:00
Tomas Winkler 32851b325e staging/easycap: use regget for register back reading
Use regget to reading back what was written to a register.
This required changning size argument to regget signature

On the way remove usless variable casting

Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:59:07 -08:00
Tomas Winkler 73132ce45a stagine/easycap: make functions regset and regget static
regget and regset functions are used only from within
easycap_low.c so they can be static
Move the functions to avoid forward declarations
Move GET and SET macro definitions into the c-file

Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:59:07 -08:00
Tomas Winkler 4d59fde3d1 staging/easycap: add first level indentation to regget/set functions
Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:59:06 -08:00
Tomas Winkler 5e7a55c30b staging/easycap: remove TESTONE and EASYCAP_TESTTONE
No longer needed feature for testing driver's handling of
the audio stream independently of the urb completion routine

Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:59:06 -08:00
Tomas Winkler a78392aa34 staging/easycap: remove EASYCAP_SILENT option
This has simulated a fault condition of probing for audio capability

Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:59:06 -08:00
Tomas Winkler 6ae2dbec4d staging/easycap: remove AUDIOTIME feature
remove code guarded by AUDIOTIME define
This was experimental code in which I tried  improve audio-video
synchronization but it didn't work well

Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:59:06 -08:00
Tomas Winkler f62bc44e05 staging/easycap: remove obsolete VIDIOC_S_CTRL_OLD ioctl
Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:59:05 -08:00
Tomas Winkler 5dd00908be staging/easycap: replace one more EASYCAP_NEEDS_ALSA with CONFIG_EASYCAP_OSS
Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:59:05 -08:00
Tomas Winkler 8d6139547c stagine/easycap: use module paramter for default encoding instead of ifdef
remove PREFER_NTSC ifdef as it cannot be possible put into Kconfig

Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:59:05 -08:00
Tomas Winkler aff512c8a4 staging/easycap: prefer printk over SAY in module entry functions
Use INFO level when registering driver and ERR for error.
Drop messages from oneliner exit function

Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:59:04 -08:00
Tomas Winkler ee99aa4928 staging/easycap: remove paranoid argument checks in usb probe/disconnect
remove checks for NULL for usb_interface. USB bus won't call these
functions with NULL

Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:59:04 -08:00
Tomas Winkler 66681fb74e staging/easycap: fix build when SND is not enabled
Fix easycap build when CONFIG_SOUND is enabled but CONFIG_SND is
not enabled.

use choice construct to select between ALSA and OSS API binding

drivers/built-in.o: In function `easycap_usb_disconnect':
easycap_main.c:(.text+0x2aba20): undefined reference to `snd_card_free'
drivers/built-in.o: In function `easycap_alsa_probe':
(.text+0x2b784b): undefined reference to `snd_card_create'
drivers/built-in.o: In function `easycap_alsa_probe':
(.text+0x2b78fb): undefined reference to `snd_pcm_new'
drivers/built-in.o: In function `easycap_alsa_probe':
(.text+0x2b7916): undefined reference to `snd_pcm_set_ops'
drivers/built-in.o: In function `easycap_alsa_probe':
(.text+0x2b795b): undefined reference to `snd_card_register'
drivers/built-in.o: In function `easycap_alsa_probe':
(.text+0x2b79d8): undefined reference to `snd_card_free'
drivers/built-in.o: In function `easycap_alsa_probe':
(.text+0x2b7a78): undefined reference to `snd_card_free'
drivers/built-in.o: In function `easycap_alsa_complete':
(.text+0x2b7e68): undefined reference to `snd_pcm_period_elapsed'
drivers/built-in.o:(.data+0x2cae8): undefined reference to `snd_pcm_lib_ioctl'

Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: R.M. Thomas <rmthomas@sciolus.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:56:21 -08:00
Dan Carpenter d936435f20 Staging: rtl8712: fix math errors in snprintf()
The original code had calls to snprintf(p, 7, "wpa_ie=") but that string
is 8 characters (because snprintf() puts a NUL terminator on the end).
So instead of an '=' the what gets written to buf is a NUL terminator
followed by the rest of the string.

And actually the %02x formats are three chars as well when you include
the terminator.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:51:27 -08:00
Mike McCormack ec42dc2c7f staging: rtl8192e: Factor out common code
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:50:21 -08:00
Mike McCormack 11a861d9de staging: rtl8192e: Remove dead code
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:50:21 -08:00
Mike McCormack ec984e0cab staging: rtl8192e: Clean up MlmeDisassociateRequest
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:50:21 -08:00
Mike McCormack ea66f752c0 staging: rtl8192e: Remove dead code from MgntActSet_RF_State
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:50:21 -08:00
Mike McCormack 6f304eb291 staging: rtl8192e: Remove rf_chip variable, hardcode to RF_8256
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:50:20 -08:00
Mike McCormack d2bddcf8c6 staging: rtl8192e: Remove dead code from SetRFPowerState8190
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:50:20 -08:00
Mike McCormack 9236928f15 staging: rtl8192e: Use spin_lock, just one exit path
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:50:20 -08:00
Mike McCormack fb53c2b73f staging: rtl8192e: Delete dead code
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:50:20 -08:00
Mike McCormack 80a4dead57 staging: rtl8192e: Avoid casting function pointers
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:50:19 -08:00
Mike McCormack 1348dc08a9 staging: rtl8192e: Don't call ieee80211_ps_tx_ack in interrupt context
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:50:19 -08:00
Mike McCormack 79b03af67a staging: rtl8192e: Simplify flow of control in rtl8192_rx
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:50:19 -08:00
Mike McCormack 109ded2b46 staging: rtl8192e: Simplify r8192_set_multicast
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:50:18 -08:00
Mike McCormack 57be958336 staging: rtl8192e: Remove unused debug code
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:50:18 -08:00
Mike McCormack 4803ef77da staging: rtl8192e: Remove RTL8192P and RTL8192U ifdefs
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:50:18 -08:00
Mike McCormack aebbafddf7 staging: rtl8192e: Remove dead code
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:50:18 -08:00
Mike McCormack 679b5f674f staging: rtl8192e: Remove dead code
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:50:18 -08:00
Mike McCormack 3f9ab1ee8a staging: rtl8192e: Use private structure in IO functions
The current ieee80211 library does not pass net_device structures
around. Switch code to use private data structure to get I/O addresses.

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:50:17 -08:00
Mike McCormack 427bf120b6 staging: rtl8192e: Remove redundant externs
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:50:17 -08:00
Mike McCormack c8a0064cb7 staging: rtl8192e: Remove duplicate header
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:50:17 -08:00
Arend van Spriel fd821d1e8a staging: brcm80211: implement mac80211 callback set_rts_threshold
adds implementation for allowing configuration of dot11RTSThreshold
as defined in the 802.11 standards. The mac80211 module will use
callback set_rts_threshold to configure this in the driver.

Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Brett Rudley <brudley@broadcom.com>
Reviewed-by: Henry Ptasinski <henryp@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:46:36 -08:00
Robert Jennings 939b3f0b14 zram/xvmalloc: combine duplicate block delete code
This patch eliminates duplicate code.  The remove_block_head function
is a special case of remove_block which can be contained in remove_block
without confusion.

The portion of code in remove_block_head which was noted as "DEBUG ONLY"
is now mandatory.  Doing this provides consistent management of the double
linked list of blocks under a freelist and makes this consolidation
of delete block code safe.  The first and last blocks will have NULL
pointers in their previous and next page pointers respectively.

Additionally, any time a block is removed from a free list the next and
previous pointers will be set to NULL to avoid misuse outside xvmalloc.

Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com>
Reviewed-by: Pekka Enberg <penberg@kernel.org>
Acked-by: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-04 13:29:12 -08:00
Robert Jennings 2787f959d6 zram: Return zero'd pages on new reads
Currently zram will do nothing to the page in the bvec when that page
has not been previously written.  This allows random data to leak to
user space.  That can be seen by doing the following:

 ## Load the module and create a 256Mb zram device called /dev/zram0
 # modprobe zram
 # echo $((256*1024*1024)) > /sys/class/block/zram0/disksize

 ## Initialize the device by writing zero to the first block
 # dd if=/dev/zero of=/dev/zram0 bs=512 count=1

 ## Read ~256Mb of memory into a file and hope for something interesting
 # dd if=/dev/zram0 of=file

This patch will treat an unwritten page as a zero-filled page.  If a
page is read before a write has occurred the data returned is all 0's.

Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com>
Reviewed-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-04 13:29:12 -08:00
Robert Jennings 3770096585 zram/xvmalloc: Close 32byte hole on 64bit CPUs
By swapping the total_pages statistic with the lock we close a
hole in the structure for 64-bit CPUs.

Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com>
Reviewed-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-04 13:29:11 -08:00
Robert Jennings b1f5b81ebe zram/xvmalloc: create CONFIG_ZRAM_DEBUG for debug code
Add a debug config flag to enable debug printk output and future
debug code.

Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com>
Reviewed-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-04 13:29:11 -08:00