Commit graph

14 commits

Author SHA1 Message Date
Loic Pefferkorn 1f11b38ca8 staging: goldfish: avoid multiple assignments
Coding style: avoid multiple assignments

Signed-off-by: Loic Pefferkorn <loic@loicp.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-06 21:54:57 -07:00
Loic Pefferkorn 2c50741597 staging: goldfish: document mutex usage
Coding style: document mutex usage

Signed-off-by: Loic Pefferkorn <loic@loicp.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-06 21:54:57 -07:00
Loic Pefferkorn 8f52e264e8 staging: goldfish: fix alignment to match open parenthesis
Coding style: fix alignment to match open parenthesis

Signed-off-by: Loic Pefferkorn <loic@loicp.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-06 21:54:57 -07:00
Loic Pefferkorn 1977533a3f staging: goldfish: remove useless space after a cast
Coding style: remove useless space after a cast

Signed-off-by: Loic Pefferkorn <loic@loicp.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-06 21:51:09 -07:00
Alan f6279717bb goldfish: clean up staging ifdefs
Use the write helpers and add an audio helper

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 13:20:41 -07:00
Nick Kralevich ec5e34c074 goldfish_nand.c: remove length restrictions
Remove limitations on the size of a read / write request.
AFAIK, there's no consequence to allowing the upper layers
to specify different read / write sizes.

This is needed to support running ext4 on goldfish.

Bug: https://code.google.com/p/android/issues/detail?id=38561

Signed-off-by: Nick Kralevich <nnk@google.com>
Signed-off-by: Jun Tian <jun.j.tian@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 13:19:00 -07:00
Jun Tian 7f09d4a00c goldfish: 64-bit nand driver for goldfish platform
Enable the 64-bit nand data support in the goldfish nand driver.

Signed-off-by: Jun Tian <jun.j.tian@intel.com>
Signed-off-by: Octavian Purdila <octavian.purdila@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-03 19:47:18 -04:00
Garret Kelly ef323812c9 staging: goldfish: Fix missing blank lines
Fix two instances of the following checkpatch warning:
WARNING: Missing a blank line after declarations

Signed-off-by: Garret Kelly <garret.kelly@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-16 20:14:33 -07:00
Kristina Martšenko 67c20cfbce staging: goldfish: switch from spinlock to mutex
Use a mutex instead of a spinlock in goldfish_nand.c, as suggested by
the TODO list.

Signed-off-by: Kristina Martšenko <kristina.martsenko@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-16 20:12:55 -07:00
Paul Gortmaker 885a947e5b staging: delete non-required instances of include <linux/init.h>
None of these files are actually using any __init type directives
and hence don't need to include <linux/init.h>.  Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-17 10:08:14 -08:00
Hema Prathaban 13aa4016e8 staging: goldfish: Fixed line over 80 characters
Fixes the following checkpatch warning:
WARNING: line over 80 characters

Signed-off-by: Hema Prathaban <hemaklnce@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-13 05:45:37 -07:00
Hema Prathaban 36270be3b7 staging: goldfish: Fixed Trailing Whitespace
Fixes the following checkpatch Error:
Error: trailing whitespace

Signed-off-by: Hema Prathaban <hemaklnce@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-13 05:45:37 -07:00
Peter Huewe b4fcf48a74 staging/goldfish: Use %zx for printing size_t variables
When building the driver, gcc emits the following warnings:
.../drivers/staging/goldfish/goldfish_nand.c:
In function 'goldfish_nand_read_oob':
goldfish_nand.c:159:2:
warning: format '%x' expects argument of type 'unsigned int', but
argument 3 has type 'size_t' [-Wformat]
goldfish_nand.c:159:2:
warning: format '%x' expects argument of type 'unsigned int', but
argument 4 has type 'size_t' [-Wformat]

In function 'goldfish_nand_write_oob':
goldfish_nand.c:191:2:
warning: format '%x' expects argument of type 'unsigned int', but
argument 3 has type 'size_t' [-Wformat]
goldfish_nand.c:191:2:
warning: format '%x' expects argument of type 'unsigned int', but
argument 4 has type 'size_t' [-Wformat]

In function 'goldfish_nand_read':
goldfish_nand.c:215:2:
warning: format '%x' expects argument of type 'unsigned int', but
argument 3 has type 'size_t' [-Wformat]

In function 'goldfish_nand_write':
goldfish_nand.c:239:2:
warning: format '%x' expects argument of type 'unsigned int', but
argument 3 has type 'size_t' [-Wformat]

-> As defined in the printk-formats use %zx for size_t variables

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-07 17:16:07 -08:00
Arve Hjønnevåg 8e404fffea goldfish: NAND flash driver
Fold together the NAND driver for Goldfish from Arve with cleanups by
Jun Nakajima and a tidy up to 3.7 and checkpatch.

This provides a virtual flash driver for the Goldfish Android Virtual Platform,
and which is normally used as the root file system when testing emulated
devices.

Signed-off-by: Mike A. Chan <mikechan@google.com>
Signed-off-by: Arve Hjønnevåg <arve@android.com>
[Ported to handle x86]
Signed-off-by: Sheng Yang <sheng@linux.intel.com>
Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Xiaohui Xin <xiaohui.xin@intel.com>
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
[Ported to 3.4]
Signed-off-by: Tom Keel <thomas.keel@intel.com>
[Ported to 3.7 and tided for checkpatch etc]
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-24 13:53:23 -08:00