Andres Salomon [Sun, 6 Feb 2011 23:28:39 +0000 (15:28 -0800)]
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>
Tomas Winkler [Tue, 8 Feb 2011 23:12:49 +0000 (01:12 +0200)]
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>
Tomas Winkler [Mon, 7 Feb 2011 07:41:47 +0000 (09:41 +0200)]
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>
Dan Carpenter [Tue, 8 Feb 2011 22:45:13 +0000 (01:45 +0300)]
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>
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>
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>
Robert Jennings [Fri, 28 Jan 2011 15:00:42 +0000 (09:00 -0600)]
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>
Robert Jennings [Fri, 28 Jan 2011 14:58:54 +0000 (08:58 -0600)]
zram/xvmalloc: free bit block insertion optimization
This change is in a conditional block which is entered only when there is
an existing data block on the freelist where the insert has taken place.
The new block is pushed onto the freelist stack and this conditional block
is updating links in the prior stack head to point to the new stack head.
After this conditional block the first-/second-level indices are updated
to indicate that there is a free block at this location.
This patch adds an immediate return from the conditional block to avoid
setting bits again to indicate a free block on this freelist. The bits
would already be set because there was an existing free block on this
freelist.
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>
Robert Jennings [Fri, 28 Jan 2011 14:58:17 +0000 (08:58 -0600)]
zram: Prevent overflow in logical block size
On a 64K page kernel, the value PAGE_SIZE passed to
blk_queue_logical_block_size would overflow the logical block size
argument (resulting in setting it to 0).
This patch sets the logical block size to 4096, using a new
ZRAM_LOGICAL_BLOCK_SIZE constant.
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>
Robert Jennings [Fri, 28 Jan 2011 14:57:27 +0000 (08:57 -0600)]
zram/vmalloc: Correct tunings to enable use with 64K pages
xvmalloc will not currently function with 64K pages. Newly allocated
pages will be inserted at an offset beyond the end of the first-level
index. This tuning is needed to properly size the allocator for 64K
pages.
The default 3 byte shift results in a second level list size which can not
be indexed using the 64 bits of the flbitmap in the xv_pool structure.
The shift must increase to 4 bytes between second level list entries to
fit the size of the first level bitmap.
Here are a few statistics for structure sizes on 32- and 64-bit CPUs
with 4KB and 64KB page sizes.
Arend van Spriel [Tue, 25 Jan 2011 15:53:39 +0000 (16:53 +0100)]
staging: brcm80211: allow both driver are created in single build
This patch allows to build both drivers. Previous patch for this
failed using -j option. This has been fixed by adding files with
include statement for the fullmac driver. Verified this is working
using -j4 option.
Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Arend van Spriel [Tue, 25 Jan 2011 13:32:03 +0000 (14:32 +0100)]
staging: brcm80211: fix compiler warning in fullmac driver
Since 2.6.38-rc1 we are getting a compiler warning due to
changed API in net/cfg80211.h. This change fixes the warning
but driver will need to be modified later to handle the
additional parameters.
Cc: Brett Rudley <brudley@broadcom.com> Cc: Henry Ptasinski <henryp@broadcom.com> Cc: Roland Vossen <rvossen@broadcom.com> Cc: Dowan Kim <dowan@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Marek Belisko [Thu, 3 Feb 2011 13:22:08 +0000 (14:22 +0100)]
staging: oplc_dcon: Fix compilation warning.
Fix compilation warning:
drivers/staging/olpc_dcon/olpc_dcon.c: In function ‘dcon_probe’:
drivers/staging/olpc_dcon/olpc_dcon.c:704:21: warning: ignoring
return value of ‘device_create_file’, declared with attribute warn_unused_result
and add cleaning of created files when creation of one failed.
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Vossen [Tue, 1 Feb 2011 09:32:29 +0000 (10:32 +0100)]
staging: brcm80211: removed more unused dma32 code
Since two preprocessor defines are always '1', could remove code that was
never compiled in and removed references to these preprocessor defines
(DMA64_ENAB and DMA64_MODE).
Signed-off-by: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Arend van Spriel [Fri, 21 Jan 2011 14:44:12 +0000 (15:44 +0100)]
staging: brcm80211: implementation of RFKILL functionality
Resubmitted the patch to align with staging-next tree. This change
depends on suspend/resume patch as sent on Wed, Jan 12, 2011.
Only hardware switch state needs to be handled by driver. RFKILL is
informed when hardware switch is activated. MAC80211 rfkill_poll
callback is used to check hardware switch deactivation.
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>
Timo von Holtz [Tue, 1 Feb 2011 18:28:46 +0000 (19:28 +0100)]
Staging: rts_pstor: fixed some brace code styling issues
Fixed all brace coding style issues in the following files:
drivers/staging/rts_pstor/rtsx_card.h
drivers/staging/rts_pstor/spi.c
drivers/staging/rts_pstor/trace.h
drivers/staging/rts_pstor/xd.c
Signed-off-by: Timo von Holtz <tvh@informatik.uni-kiel.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
remove intializations to NULL where not needed and let the compiler
find flows with unitilized variables.
Fix one such flow in easycap_vma_fault function
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Marek Belisko [Thu, 3 Feb 2011 10:07:54 +0000 (11:07 +0100)]
staging: ft1000: Remove unnecessary assignment.
dsp_img_info->version and requested_version have same type
so additional temporary variable creation could be omitted
because variables could be compares directly.
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>