Commit Graph

362648 Commits

Author SHA1 Message Date
Kurt Kanzenbach
b2e0228409 staging: usbip: userspace: libsrc: cleanup parsing
Since the names.c/names.h are taken from another project, some
functions which names.c provides aren't used by usbipd.
This patch fixes:
 - removed useless comments
 - unified debug/error messages by using the macros
   provided by usbip_common.h
 - removed unnused code

The code cleanup includes:
 - remove unused data structures
 - remove code to create them
 - remove code to access them

The file names.c is used to parse the `usb.ids' file. The parser
stores a lot of information about usb devices that is never used.

The `usb.ids' file has several sections. Some variables (like
`lasthut') store the ID of the current section, and those variables
are used to decide which section is currently being parsed (i.e. in
which data structure the current line will be  stored).

We removed the code to read those IDs because they are never used
anyway. We replaced them by the pseudo-ID `1' (instead of reading the
ID from the file) to indicate that the parser is in a section that
can be ignored. If the parser is in such a section, the current line
(which contains sub-items for this section) is discarded.

Signed-off-by: Kurt Kanzenbach <ly80toro@cip.cs.fau.de>
Signed-off-by: Stefan Reif <ke42caxa@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-05 14:22:51 -07:00
Kurt Kanzenbach
e71e781ba4 staging: usbip: userspace: removed unnecessary code
Since no usbip_name function is used in usbipd, it's not
necessary to parse "usb.ids" file at startup.

Signed-off-by: Kurt Kanzenbach <ly80toro@cip.cs.fau.de>
Signed-off-by: Stefan Reif <ke42caxa@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-05 14:22:51 -07:00
Stefan Reif
e697949944 staging: usbip: userspace: avoid memory leaks
Call freeaddrinfo when connect/listen fails.
Call usbip_host_driver_close on error.

Signed-off-by: Stefan Reif <ke42caxa@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-05 14:22:51 -07:00
Kurt Kanzenbach
b94b3a627f staging: usbip: simplified cleanup function
This patch simplified "stub_device_free" cleanup function:
 - changed return type to void, since the return value is
   not checked anywhere
 - kfree is NULL-safe, so removed if statement
 - deleted debug-message

Signed-off-by: Kurt Kanzenbach <ly80toro@cip.cs.fau.de>
Signed-off-by: Stefan Reif <ke42caxa@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-05 14:22:51 -07:00
Kurt Kanzenbach
521e1e7cc9 staging: usbip: removed unnecessary for loop
This for loop is not needed, since STUB_BUSID_OTHER is defined as 0.
In Addition added a comment if STUB_BUSID_OTHER changes sometime.

Signed-off-by: Kurt Kanzenbach <ly80toro@cip.cs.fau.de>
Signed-off-by: Stefan Reif <ke42caxa@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-05 14:22:51 -07:00
Kurt Kanzenbach
2183b77ece staging: usbip: removed unnecessary if-else-statements
In each if-else case "return" is called. This is why
these if-else-statements are useless. Removing them
improves understanding and readability.

Signed-off-by: Kurt Kanzenbach <ly80toro@cip.cs.fau.de>
Signed-off-by: Stefan Reif <ke42caxa@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-05 14:22:51 -07:00
Kurt Kanzenbach
31398f6307 staging: usbip: simplified errorhandling
In each errorcase spin_unlock_irq is called and -EINVAL is returned.
To simplify that I created a label called "err" doing that.
On Success count will be returned.

Signed-off-by: Kurt Kanzenbach <ly80toro@cip.cs.fau.de>
Signed-off-by: Stefan Reif <ke42caxa@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-05 14:22:50 -07:00
Stefan Reif
ca9fb17e93 staging: usbip: simple indent fix
Fix an indent.

Signed-off-by: Stefan Reif <ke42caxa@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-05 14:22:50 -07:00
Stefan Reif
234354dc18 staging: usbip: remove unnused, broken macro
Remove broken preprocessor macro "hardware". It is unused and it
references an element (pdev in vhci_hcd) that does not exist.

Signed-off-by: Stefan Reif <ke42caxa@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-05 14:22:50 -07:00
Kurt Kanzenbach
7717880746 staging: usbip: removed enumeration of comments
Enumerations for one comment makes no sense.
This is why this should be removed.

Signed-off-by: Kurt Kanzenbach <ly80toro@cip.cs.fau.de>
Signed-off-by: Stefan Reif <ke42caxa@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-05 14:22:50 -07:00
Stefan Reif
2663d79b83 staging: usbip: reformat function pickup_urb_and_free_priv
re-indent funtion "pickup_urb_and_free_priv" to improve readability.

Signed-off-by: Stefan Reif <ke42caxa@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-05 14:22:50 -07:00
Kurt Kanzenbach
c5a73ee2d1 staging: usbip: reformat function stub_recv_cmd_unlink()
Reformat function stub_recv_cmd_unlink() to improve readability.

Signed-off-by: Kurt Kanzenbach <ly80toro@cip.cs.fau.de>
Signed-off-by: Stefan Reif <ke42caxa@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-05 14:22:50 -07:00
Stefan Reif
69f452635c staging: usbip: userspace: libsrc: replace numbers by ascii
replace numbers in code by ascii text constants as suggested
by Dan Carpenter:
http://driverdev.linuxdriverproject.org/pipermail/devel/2013-February/035907.html

Signed-off-by: Stefan Reif <ke42caxa@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-05 14:22:49 -07:00
Dan Carpenter
986d758435 staging: slicoss: information leak in ETHTOOL_GSET
There are some fields in "edata" which have not been cleared.  One
example is edata.cmd.  It leaks uninitialized stack information to the
user.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-05 14:17:00 -07:00
Dan Carpenter
69c1440e86 staging: csr: info leak in unifi_cfg_get_info()
"cfg_ap_config" has a number of fields which are not cleared before we
copy them to the user.  I've added a memset() at the beginning to set
everything to zero.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-05 14:17:00 -07:00
H Hartley Sweeten
2c71c4ff57 staging: comedi: range: introduce some simple mA ranges
The simple mA ranges 0 to 20, 4 to 20, and 0 to 32 are fairly common.
Introduce them in the comedi core and use them in the drivers.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-05 14:13:30 -07:00
H Hartley Sweeten
ebde53ec1a staging: comedi: usbduxsigma: use comedi provided range_unipolar2_5
Remove the private range, range_usbdux_ao_range, in this driver and use
the comedi provided range_unipolar2_5 instead.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-05 14:13:30 -07:00
H Hartley Sweeten
50708d98ce staging: comedi: ni_mio_common: use comedi provided range_bipolar5
Remove the private range, range_ni_S_ai_6143, in this driver and use
the comedi provided range_bipolar5 instead.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-05 14:13:30 -07:00
H Hartley Sweeten
a4f6d9ca8c staging: comedi: ni_pcimio: use comedi provided range_bipolar10
Remove the private range, range_ni_M_622x_ao, in this driver and use
the comedi provided range_bipolar10 instead.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-05 14:13:30 -07:00
H Hartley Sweeten
165f90ed3f staging: comedi: dt9812: use comedi provided range_unipolar2_5
Remove the private ranges, dt9812_2pt5_a{in,out}_range, in this
driver and use the comedi provided range_unipolar2_5 instead.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-05 14:13:30 -07:00
H Hartley Sweeten
5f8eb72cef staging: comedi: range: introduce range_unipolar2_5
Introduce a simple unipolar 0 to 2.5 range, range_unipolar2_5, for
use by the comedi drivers.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-05 14:13:29 -07:00
H Hartley Sweeten
ff0f7ad58f staging: comedi: dt9812: use comedi provided range_bipolar10
Remove the private ranges, dt9812_10_a{in,out}_range, in this driver
and use the comedi provided range_bipolar10 instead.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-05 14:13:29 -07:00
H Hartley Sweeten
f737279b36 staging: comedi: das800: use comedi provided range_bipolar5
Remove the private range, range_das800_ai, in this driver and use
the comedi provided range_bipolar5 instead.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-05 14:13:29 -07:00
H Hartley Sweeten
5d5cabb675 staging: comedi: das1800: use comedi provided range_bipolar10
Remove the private range, range_ao_1, in this driver and use the
comedi provided range_bipolar10 instead.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-05 14:13:29 -07:00
H Hartley Sweeten
7cf24bb433 staging: comedi: cb_pcidas64: use comedi provided range_bipolar10
Remove the private range, ao_ranges_60xx, in this driver and use
the comedi provided range_bipolar10 instead.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-05 14:13:29 -07:00
H Hartley Sweeten
e9e7023c99 staging: comedi: rtd520: rename thisboard variable
For aesthetic reasons. rename the local variable 'thisboard' to 'board'
throughout the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-03 13:54:05 -07:00
H Hartley Sweeten
34db8ef946 staging: comedi: rtd520: rename CamelCase chanBipolar
Rename the CamelCase private data variable chanBipolar to chan_is_bipolar.
Remove the unnecessary comment about it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-03 13:54:05 -07:00
H Hartley Sweeten
b0ae4368d7 staging: comedi: rtd520: rename CamelCase in rtdConvertChanGain()
Rename the CamelCase function rtdConvertChanGain() as well as the
CamelCase parameters to the function.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-03 13:54:05 -07:00
H Hartley Sweeten
dcc2358fa4 staging: comedi: rtd520: rename CamelCase rtdBoard
Rename the CamelCase struct rtdBoard to rtd_boardinfo. Also, rename the
range10Start and rangeUniStart variables in the struct to range_bip10
and range_uni10.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-03 13:54:04 -07:00
H Hartley Sweeten
8bc1bd1fc0 staging: comedi: rtd520: rename CamelCase aiCount
Rename this private data variable to ai_count.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-03 13:54:04 -07:00
H Hartley Sweeten
2f0210346a staging: comedi: rtd520: rename CamelCase in rtd_interrupt()
Rename the CamelCase local variable fifoStatus to fifo_status.

Also rename the goto lables abortTransfer and transferDone to
xfer_abort and xfer_done.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-03 13:54:04 -07:00
H Hartley Sweeten
cd5e2d0628 staging: comedi: rtd520: rename CamelCase fifoLen
Rename this private data variable to fifosz.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-03 13:54:04 -07:00
H Hartley Sweeten
2d7b8b9434 staging: comedi: rtd520: rename CamelCase transCount
Rename this private data variable to xfer_count.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-03 13:54:04 -07:00
H Hartley Sweeten
d7c115cea7 staging: comedi: rtd520: rename CamelCase aoValue
Rename this private data variable to ao_readback and remove the
unnecessary comments.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-03 13:54:04 -07:00
H Hartley Sweeten
4686a0e642 staging: comedi: rtd520: rename CamelCase rtdPrivate
Rename the private data struct to rtd_private.

Also, remove the unnecessary comment about it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-03 13:54:03 -07:00
H Hartley Sweeten
efa5b32658 staging: comedi: rtd520: cleanup rtd_dio_insn_config()
Add a local variable to make this function a bit cleaner and
remove the unnecessary comments.

The comedi core expects this function to return the number of
data parameters used. Change the return from '1' to 'insn->n'
to make this more apparent.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-03 13:54:03 -07:00
Wanpeng Li
4460838376 staging: zcache: clean TODO list
Cleanup TODO list since support zero-filled pages more efficiently has
already done by this patchset.

Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-03 13:38:37 -07:00
Wanpeng Li
834e3a1cea staging: zcache: introduce zero-filled page stat count
Introduce zero-filled page statistics to monitor the number of
zero-filled pages.

Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-03 13:38:37 -07:00
Wanpeng Li
90874fc21c staging: zcache: fix static variables defined in debug.h but used in mutiple C files
After commit 95bdaee214 ("zcache: Move debugfs code out of zcache-main.c file")
be merged, most of knods in zcache debugfs just export zero since these variables
are defined in debug.h but are in use in multiple C files zcache-main.c and debug.c,
in this case variables can't be treated as shared variables.

Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-03 13:38:37 -07:00
Marek Vasut
afb12edf94 staging: imx-drm: Make IPU KMS parse display-timings
This patch adds support for parsing of the DT display-timings prop
to IPU KMS driver.

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-03 11:04:08 -07:00
Wanpeng Li
eee53d9218 staging: zcache: fix zcache writeback in debugfs
commit 9c0ad59ef ("zcache/debug: Use an array to initialize/use debugfs attributes")
use an array to initialize/use debugfs attributes, .name = #x, .val = &zcache_##x.
For zcache writeback, this commit set .name = zcache_outstanding_writeback_pages and
.name = zcache_writtenback_pages seperately, however, corresponding .val =
&zcache_zcache_outstanding_writeback_pages and .val = &zcache_zcache_writtenback_pages,
which are not correct.

Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-02 12:55:37 -07:00
Wanpeng Li
380cb19e40 staging: zcache: fix pers_pageframes|_max aren't exported in debugfs
Before commit 9c0ad59ef ("zcache/debug: Use an array to initialize/use
debugfs attributes"), pers_pageframes|_max are exported in debugfs, but
this commit forgot use array export pers_pageframes|_max. This patch add
pers_pageframes|_max back.

Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-02 12:55:37 -07:00
Wanpeng Li
b0749e77ae staging: zcache: handle zcache_[eph|pers]_zpages for zero-filled page
Increment/decrement zcache_[eph|pers]_zpages for zero-filled pages,
the main point of the counters for zpages and pageframes is to be
able to calculate density == zpages/pageframes. A zero-filled page
becomes a zpage that "compresses" to zero bytes and, as a result,
requires zero pageframes for storage. So the zpages counter should
be increased but the pageframes counter should not.

[Dan Magenheimer <dan.magenheimer@oracle.com>: patch description]
Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-02 12:49:51 -07:00
Wanpeng Li
8762c7dde7 staging: zcache: zero-filled pages awareness
Compression of zero-filled pages can unneccessarily cause internal
fragmentation, and thus waste memory. This special case can be
optimized.

This patch captures zero-filled pages, and marks their corresponding
zcache backing page entry as zero-filled. Whenever such zero-filled
page is retrieved, we fill the page frame with zero.

Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-02 12:49:51 -07:00
Wanpeng Li
bdcde42d74 staging: zcache: introduce zero-filled pages handler
Introduce zero-filled pages handler to capture and handle zero pages.

Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-02 12:49:51 -07:00
Bob Liu
6fd3d05a8f drivers: staging: zcache: fix compile warning
Fix below compile warning:
staging/zcache/zcache-main.c: In function ‘zcache_autocreate_pool’:
staging/zcache/zcache-main.c:1393:13: warning: ‘cli’ may be used uninitialized
in this function [-Wuninitialized]

Signed-off-by: Bob Liu <bob.liu@oracle.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-02 12:43:41 -07:00
Bob Liu
555ee46f58 drivers: staging: zcache: fix compile error
Because 'ramster_debugfs_init' is not defined if !CONFIG_DEBUG_FS, there is
compile error:

$ make drivers/staging/zcache/
staging/zcache/ramster/ramster.c: In function ‘ramster_init’:
staging/zcache/ramster/ramster.c:981:2: error: implicit declaration of
function ‘ramster_debugfs_init’ [-Werror=implicit-function-declaration]

This patch fix it and reduce some #ifdef CONFIG_DEBUG_FS in .c files the same
way.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Bob Liu <bob.liu@oracle.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-02 12:43:41 -07:00
Greg Kroah-Hartman
6d3a63790c Third round of IIO cleanups, graduations and new stuff for the 3.10 cycle.
A small set including 3 things.
 1) A short cleanup series for the ak8975.
 2) Graduation of ak8975 out of staging.
 3) Some additional bits for the at91 adc driver to cover low resolution
    modes, sleep and a little bit of missing documentation.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQIcBAABAgAGBQJRWyOiAAoJEFSFNJnE9BaIQa8QALIgb//+AvAWg1pVkIJVkA0y
 U0lKA94ynO+WXM7jcWonDfjx02/lyWdNd5gSSbujtxOeanIg29c/RK3vJ4a1Y7Tq
 7b0nzSuX//9F6VsUafF+h8WAmjVLIY+yN/ovGB8s5RzvSj4TsU6lcnxtjp2KV5Os
 koxURUtVF9xwdUIdNHE++zp6vT0EYVhUzOC1WQZxpooUf6UJtTmDLiL1D+b7guWO
 Pc+zW5TWdN1db15XUPhnzVnA/aBGeTM+y9y/Eh9v4IW2oMS4lqjFIdKRFBQ+Yf9k
 4mm7gj5cXxMj2K1GGhofJUvgm++gXkcReXDvI8fXwlKOM+DJNqoYQ0aqk4XdzNch
 T/JOUR1rF9ZE3SlaD2diELFfrzp4WDZti0czW9qduqQh/Rjc7RAkWMngaOJKMfrE
 hdao5TKGfhY4YfBLROPddNesqlNlcppFlEmAeybyw3R8kuPc7Jihv5HzMpIg0gtN
 pz3ATWYwtRP7dATvmTmcvZedaMvIEpqajZKPjONFq/TSoXpubtmxxOq2frHz+FrG
 7VMsSrKyoLsC0jMkwsJzpPTUMJgjOthxii3DlNO/YgzTcj0gspgEN+Pm+s6xX4Mv
 N4t5r8c9jPTCWC/W6wpwIeIFCCdyPrjr+gMegKnM3bbLT9JHiGWnodsJ4lzwL/pI
 yGivjxp+srOqcpDX3l+V
 =HIcb
 -----END PGP SIGNATURE-----

Merge tag 'iio-for-3.10c' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next

Jonathan writes:
	Third round of IIO cleanups, graduations and new stuff for the 3.10 cycle.

	A small set including 3 things.
	1) A short cleanup series for the ak8975.
	2) Graduation of ak8975 out of staging.
	3) Some additional bits for the at91 adc driver to cover low resolution
	   modes, sleep and a little bit of missing documentation.
2013-04-02 12:37:02 -07:00
Jean-Christophe PLAGNIOL-VILLARD
beca9e767e iio: at91_adc: fix missing Sample and Hold time
On the at91_adc a minimal Sample and Hold Time is necessary for the ADC to
guarantee the best converted final value between two channels selection.
This time has to be programmed through the bitfield SHTIM in the
Mode Register ADC_MR.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-04-02 19:22:16 +01:00
Jean-Christophe PLAGNIOL-VILLARD
e748783c55 iio: at91_adc: add sleep mode support
The sleep mode will allow to put the adc in sleep between conversion.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-04-02 19:17:39 +01:00