Commit graph

520234 commits

Author SHA1 Message Date
Oleg Drokin 61d4a2e4b0 staging/lustre/ldlm: move namespaces/resource_count to sysfs
Move ldlm display of resource_count from procfs to sysfs

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:50:19 +09:00
Oleg Drokin 0f53c823f9 staging/lustre/ldlm: move cancel_unused_locks_before_replay to sysfs
/proc/fs/lustre/ldlm/cancel_unused_locks_before_replay is
moved to /sys/fs/lustre/ldlm/cancel_unused_locks_before_replay

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:50:19 +09:00
Oleg Drokin 18fd8850a4 staging/lustre/ldlm: Preparation to move /proc/fs/lustre/ldlm to sysfs
Add necessary infrastructure, register /sys/fs/lustre/ldlm,
/sys/fs/lustre/ldlm/namespaces and /sys/fs/lustre/ldlm/services

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:50:18 +09:00
Oleg Drokin 070c29ca79 staging/lustre/llite: move /proc/fs/lustre/llite/xattr_cache to sysfs
Move xattr_cache file from /proc/fs/lustre/llite/*
to /sys/fs/lustre/llite/*/

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:50:18 +09:00
Oleg Drokin d36f2b0ba8 staging/lustre/llite: remove llite/*_cookiesize proc files
Since Lustre 2.5, cookiesize is unused on the clients since
MDS now does final object unlink by itself, so drop these
max_cookiesize and default_cookiesize files.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:50:18 +09:00
Oleg Drokin f5501d042e staging/lustre/llite: move /proc/fs/lustre/llite/*_easize to sysfs
Move max_easize and default_easize files from /proc/fs/lustre/llite/*
to /sys/fs/lustre/llite/*/

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:50:18 +09:00
Oleg Drokin c7fe64bdd0 staging/lustre/llite: move /proc/fs/lustre/llite/lazystatfs to sysfs
Move lazystatfs file from /proc/fs/lustre/llite/*
to /sys/fs/lustre/llite/*/

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:50:18 +09:00
Oleg Drokin 4081a3201a staging/lustre/llite: move /proc/fs/lustre/llite/statahead_{max, agl} to sysfs
Move statahead_max and statahead_agl files from /proc/fs/lustre/llite/*
to /sys/fs/lustre/llite/*/

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:50:18 +09:00
Oleg Drokin 62cf4b1315 staging/lustre/llite: move /proc/fs/lustre/llite/stats_track* to sysfs
Move stats_track_pid, stats_track_ppid and stats_track_gid  files
from /proc/fs/lustre/llite/* to /sys/fs/lustre/llite/*/

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:50:18 +09:00
Oleg Drokin 06ed0cd897 staging/lustre/llite: remove unused ll_max_rw_chunk
ll_max_rw_chunk seems to be unused ever since we implemented CLIO in 2.0,
so remove it and all supporting infrastructure.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:50:18 +09:00
Oleg Drokin 40cc864a9f staging/lustre/llite: move /proc/fs/lustre/llite/checksum_pages to sysfs
Move checksum_pages file from /proc/fs/lustre/llite/*
to /sys/fs/lustre/llite/*/

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:48:03 +09:00
Oleg Drokin ec46923586 staging/lustre/llite: move llite/max_read_ahead_whole_mb to sysfs
Move max_read_ahead_whole_mb file from /proc/fs/lustre/llite/*
to /sys/fs/lustre/llite/*/

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:48:03 +09:00
Oleg Drokin 0e6c5a219a staging/lustre/llite: move llite/max_read_ahead_per_file_mb to sysfs
Move max_read_ahead_per_file_mb file from /proc/fs/lustre/llite/*
to /sys/fs/lustre/llite/*/

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:48:03 +09:00
Oleg Drokin e1a1df5e88 staging/lustre/llite: move /proc/fs/lustre/llite/max_read_ahead_mb to sysfs
Move max_read_ahead_mb file from /proc/fs/lustre/llite/*
to /sys/fs/lustre/llite/*/

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:48:03 +09:00
Oleg Drokin ec55a62999 staging/lustre/llite: move /proc/fs/lustre/llite/uuid to sysfs
Move uuid file from /proc/fs/lustre/llite/*
to /sys/fs/lustre/llite/*/

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:48:03 +09:00
Oleg Drokin 0cee667682 staging/lustre/llite: move /proc/fs/lustre/llite/fstype to sysfs
Move fstype file from /proc/fs/lustre/llite/*
to /sys/fs/lustre/llite/*/

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:48:03 +09:00
Oleg Drokin 95e1b6b0cf staging/lustre/llite: move /proc/fs/lustre/llite/client_type to sysfs
Move client_type file from /proc/fs/lustre/llite/*
to /sys/fs/lustre/llite/*/

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:48:03 +09:00
Oleg Drokin 7267ec0d87 staging/lustre/llite: move /proc/fs/lustre/llite/files* to sysfs
Move filestotal and filesfree files from /proc/fs/lustre/llite/*
to /sys/fs/lustre/llite/*/

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:48:02 +09:00
Oleg Drokin 5804b11e14 staging/lustre/llite: move /proc/fs/lustre/llite/kbytes* to sysfs
Move kbytestotal, kbytesavail and kbytesfree files from
/proc/fs/lustre/llite/* to /sys/fs/lustre/llite/*/

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:48:02 +09:00
Oleg Drokin 364bcfc863 staging/lustre/llite: move /proc/fs/lustre/llite/blocksize to sysfs
Move blocksize file from /proc/fs/lustre/llite/*/ to
/sys/fs/lustre/llite/*/blocksize

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:48:02 +09:00
Oleg Drokin fd0d04ba85 staging/lustre/llite: Preparation to move /proc/fs/lustre/llite to sysfs
Add necessary infrastructure, add support for mountpoint
registration in /proc/fs/lustre/llite

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:48:02 +09:00
Oleg Drokin 8b82844505 staging/lustre: Move /proc/fs/lustre root level files to sysfs
except devices, for now.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:48:02 +09:00
Oleg Drokin 5e66f70e96 staging/lustre: Generic helpers for sysfs
Add generic helpers to allow displaying oof lustre-specific values
in /sys/fs/lustre

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:48:02 +09:00
Pedro Marzo Perez 73f11ecbcb Staging: rtl8192u: Correct include indentation and openning braces at new line
Opening braces should never be in a new line.
Correct include indentation.

Signed-off-by: Pedro Marzo Perez <marzo.pedro@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:41:21 +09:00
Colin Cronin 590826061d Staging: vt6656: device: Fixed spelling error
Fixed comment spelling error.

Signed-off-by: Colin Cronin <colinpatrickcronin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:41:21 +09:00
Luis R. Rodriguez 3fb0767172 staging: xgifb: use arch_phys_wc_add() and ioremap_wc()
The same area used for ioremap() is used for the MTRR area.
Convert the driver from using the x86 specific MTRR code to
the architecture agnostic arch_phys_wc_add(). arch_phys_wc_add()
will avoid MTRR if write-combining is available, in order to
take advantage of that also ensure the ioremap'd area is requested
as write-combining.

There are a few motivations for this:

a) Take advantage of PAT when available

b) Help bury MTRR code away, MTRR is architecture specific and on
   x86 its replaced by PAT

c) Help with the goal of eventually using _PAGE_CACHE_UC over
   _PAGE_CACHE_UC_MINUS on x86 on ioremap_nocache() (see commit
   de33c442e titled "x86 PAT: fix performance drop for glx,
   use UC minus for ioremap(), ioremap_nocache() and
   pci_mmap_page_range()")

The conversion done is expressed by the following Coccinelle
SmPL patch, it additionally required manual intervention to
address all the #ifdery and removal of redundant things which
arch_phys_wc_add() already addresses such as verbose message
about when MTRR fails and doing nothing when we didn't get
an MTRR.

@ mtrr_found @
expression index, base, size;
@@

-index = mtrr_add(base, size, MTRR_TYPE_WRCOMB, 1);
+index = arch_phys_wc_add(base, size);

@ mtrr_rm depends on mtrr_found @
expression mtrr_found.index, mtrr_found.base, mtrr_found.size;
@@

-mtrr_del(index, base, size);
+arch_phys_wc_del(index);

@ mtrr_rm_zero_arg depends on mtrr_found @
expression mtrr_found.index;
@@

-mtrr_del(index, 0, 0);
+arch_phys_wc_del(index);

@ mtrr_rm_fb_info depends on mtrr_found @
struct fb_info *info;
expression mtrr_found.index;
@@

-mtrr_del(index, info->fix.smem_start, info->fix.smem_len);
+arch_phys_wc_del(index);

@ ioremap_replace_nocache depends on mtrr_found @
struct fb_info *info;
expression base, size;
@@

-info->screen_base = ioremap_nocache(base, size);
+info->screen_base = ioremap_wc(base, size);

@ ioremap_replace_default depends on mtrr_found @
struct fb_info *info;
expression base, size;
@@

-info->screen_base = ioremap(base, size);
+info->screen_base = ioremap_wc(base, size);

Generated-by: Coccinelle SmPL
Cc: Arnaud Patard <arnaud.patard@rtp-net.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Brian Vandre <bvandre@gmail.com>
Cc: Thomas Gummerer <t.gummerer@gmail.com>
Cc: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Cc: Lubomir Rintel <lkundrak@v3.sk>
Cc: Vitor Braga <vitorpybraga@gmail.com>
Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Suresh Siddha <sbsiddha@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Juergen Gross <jgross@suse.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Antonino Daplas <adaplas@gmail.com>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: devel@driverdev.osuosl.org
Cc: linux-fbdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:30:40 +09:00
Fabian Frederick 64746c0c6a staging: xgifb: use swap() in XGI_WriteDAC()
Use kernel.h macro definition.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:30:40 +09:00
Colin Cronin 3786a0f2bc Staging: xgifb: vb_setmode: Fixed spelling error
Fixed spelling error in comment.

Signed-off-by: Colin Cronin <colinpatrickcronin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:30:40 +09:00
Colin Cronin 20ba458156 Drivers: staging: skein: skein_api: Fixed spelling errors
Fixed a few spelling errors in comments.

Signed-off-by: Colin Cronin <colinpatrickcronin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:30:40 +09:00
Gujulan Elango, Hari Prasath (H.) 7960386273 staging: dgnc: delete all references to 'flipbuf'
This patch deletes all references to 'flipbuf'.Memory is allocated and
freed but never used anywhere in the driver.Also deleted an ununsed
Macro defined in the header file.

Signed-off-by: Gujulan Elango Hari Prasath <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:26:27 +09:00
Wim de With 8ad524ffb2 staging: dgnc: fix line length over 80 chars in dgnc_sysfs.c
This patch fixes most of the lines over 80 characters long in
dgnc_sysfs.c. I couldn't find a way to break line 202-207 in a sensible
way. If there is a way, let me know.

Signed-off-by: Wim de With <nauxuron@wimdewith.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:26:27 +09:00
Buţiu Alexandru Octavian b2d3977f7d Staging: dgnc: fixed coding style issue in digi.h
Fixed coding style issue "warning line over 80 characters"
detected by checkpatch.pl in digi.h

Signed-off-by: Buţiu Alexandru Octavian <predator5047@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:26:26 +09:00
Matthew Needes d0e2f8f0be staging: comedi/drivers/pcl.* coding style fixes
pcl812.c (resend of earlier patch)
    Fixed lines exceeding 80 columns, correcting some spelling in process

Signed-off-by: Matthew Needes <mneedes@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:07:18 +09:00
Matthew Needes 8b4e7da516 staging: comedi/drivers/pcl.* coding style fixes
pcl812.c / pcl816.c (resend of earlier patch)
   Fixed indentation problems.

Signed-off-by: Matthew Needes <mneedes@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:07:18 +09:00
Geliang Tang 71f50e25c0 staging: comedi: keep the consistency
Changed "register 0x%x" to "register=0x%x" to keep the consistency
of this file.

Signed-off-by: Geliang Tang <geliangtang@163.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:07:18 +09:00
Geliang Tang cdfba23d77 staging: comedi: fix checkpatch error
Fixed an error found by checkpatch.pl.
ERROR: space required after that ',' (ctx:VxV)
./drivers/ni_mio_common.c:3764

Signed-off-by: Geliang Tang <geliangtang@163.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:07:17 +09:00
Ian Abbott 3a62cdb7f6 staging: comedi: comedi_isadma.h: make self-reliant
The Comedi "comedi_isadma.h" header is included by the source for the
"comedi_isadma" helper module and other modules that use it.  It does
not compile cleanly when it is the first header file included.  It uses
the `dma_addr_t` type, so include <linux/types.h> to declare it.  (Also,
that indirectly takes care of the use of `NULL`.)  It uses `struct
comedi_device *` in various function prototypes, so add an incomplete
declaration of `struct comedi_device`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:07:17 +09:00
Ian Abbott b727255f01 staging: comedi: comedi_8254.h: make self-reliant
The Comedi "comedi_8254.h" header file is included by various Comedi
drivers with timer/counters based on the 8254 chip.  The drivers do not
compile cleanly if this header file is included first.  It uses pointers
to the `struct comedi_device`, `struct comedi_subdevice`, and `struct
comedi_insn` structures in various function prototypes, so declare those
as incomplete types.  It use the `bool` type, so include
<linux/types.h>.  It also uses the `__iomem` tag, but that seems to be
taken care of indirectly by including <linux/types.h>.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:07:17 +09:00
Ian Abbott e57180c85a staging: comedi: addi_watchdog.h: don't include "../comedidev.h"
The Comedi "addi_watchdog.h" header doesn't use anything form
"comedidev.h" apart from `struct comedi_subdevice`, which it only uses
to construct a corresponding pointer type within the parameter list of a
function prototype.  Just declare the structure type incompletely and
don't bother including the header file.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:05:27 +09:00
Ian Abbott 7da42b5fda staging: comedi: amplc_dio200_pci.c: reformat copyright comment
Reformat the copyright comment at the top of the file to use the
preferred block comment style.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:05:27 +09:00
Ian Abbott 4cb1dec981 staging: comedi: amplc_dio200_common.c: fix up brace style
Use braces when the single statement following an `if` (or `else`)
spans more than one line (including any preceding comments).

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:05:26 +09:00
Ian Abbott 94ef971811 staging: comedi: amplc_dio200_common.c: reformat copyright comment
Reformat the copyright comment at the top of the file to use the
preferred block comment style.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:05:26 +09:00
Ian Abbott 158bb7287e staging: comedi: amplc_dio200.c: reformat copyright comment
Reformat the copyright comment at the top of the file to use the
preferred block comment style.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:05:26 +09:00
Ian Abbott 8ea6663284 staging: comedi: amplc_dio200.h: make self-reliant
The Comedi "amplc_dio200.h" header file included by drivers for Amplicon
DIO200 series cards does not compile cleanly when it is the first header
included by the ".c" file.  It uses `struct comedi_device *` in the
parameter lists of some function prototypes, so just declare `struct
comedi_device` as an incomplete type.  It also uses `bool`, so include
<linux/types.h> to declare it.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:05:26 +09:00
Ian Abbott d94e5c6352 staging: comedi: amplc_dio200.h: reformat copyright comment
Reformat the copyright comment at the top of the file to use the
preferred block comment style.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:05:26 +09:00
Ian Abbott 968d17786d staging: comedi: comedi_8255: new module split from 8255
The Comedi "8255" module is both a standalone Comedi device driver
module for simple devices with one or more 8255 "Programmable Peripheral
Interface" chips at known I/O base addresses (configured at run-time),
and a helper module to configure a 8255-based digital I/O subdevice for
other Comedi drivers.

Split the "8255 subdevice helper" functionality into a new module:
"comedi_8255", leaving the standalone 8255 Comedi driver in the "8255"
module.

The Comedi "detach" routine of the standalone "8255" driver needs to
retrieve the I/O base address passed to the "comedi_8255" module to set
up each subdevice in order to release the I/O port regions it requested
in its "attach" routine.  The "comedi_8255" module stores it in a
"subdevice private" data structure that is no longer known to the "8255"
module, so add a new, exported function `subdev_8255_regbase()` to
retrieve it.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:05:26 +09:00
Ian Abbott dc54ba4d88 staging: comedi: 8255: document callback parameters better
Several Comedi driver modules call `subdev_8255_init()` or
`subdev_8255_mm_init()` to set up a digital I/O subdevice based on the
"8255" chip.  One of the parameters to these functions is an optional
pointer to an I/O callback function to perform the actual register
accesses (an internal default callback function is used if NULL).

The kerneldoc for `subdev_8255_init()` and `subdev_8255_mm_init()`
describe the prototype of the optional I/O callback function
incorrectly (my fault), adding a non-existent parameter of type `struct
comedi_subdevice *`.  Fix the kerneldoc.  Also add parameter names to
the callback function pointer type wherever it occurs to make the usage
clearer.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:05:26 +09:00
Ian Abbott d2c9deac56 staging: comedi: 8255.h: don't include "../comedidev.h"
The Comedi "8255.h" header doesn't use anything from "comedidev.h" apart
from `struct comedi_device` and `struct comedi_subdevice`, which are
only used to construct corresponding pointer types within the parameter
lists of function prototypes.  Just declare those structure types
incompletely and don't bother including "comedidev.h".

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:05:26 +09:00
Ian Abbott 7e0b1b60cb staging: comedi: 8255: fix I/O region leak on failure
The Comedi "8255" driver does not clean up properly on failure.  It can
leave requested I/O port regions unreleased.  Specifically, the Comedi
"attach" handler (`dev_8255_attach()`) requests a specified I/O port
region before calling `subdev_8255_init()` to set up the subdevice.  If
that fails, the "attach" handler returns an error and the Comedi core
will call the "detach" handler (`dev_8255_detach()`) to clean up.  The
"detach" handler is responsible for releasing the I/O port regions
successfully requested by the "attach" handler.  Unfortunately, it is
unable to obtain the base address of the region if the call to
`subdev_8255_init()` failed.

Fix the I/O region leak by releasing the region in the "attach" handler
directly if the call to `subdev_8255_init()` fails.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:05:26 +09:00
chaehyun lim 613462e1e4 staging: wlan-ng: fix checkpatch warnings
clean up checkpatch.pl in prism2sta.c
 WARNING : line over 80 characters

Signed-off-by: chaehyun lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:01:51 +09:00