This driver only needs an irq in order to support async commands.
If the irq is not available the driver will still function for
single analog input reads.
Tidy up the code that does the irq requests so that the driver
will still attach if it is not avaliable.
Remove the noise about the irq during the attach.
Only hook up the async commands support if the irq is available.
Remove the then unnecessary sanity check in das1800_ai_do_cmd().
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: ni_at_2150: tidy up irq/dma request
This driver needs both an irq and dma in order to support async
commands. If the irq and dma are not available the driver will
still function for single analog input reads.
Tidy up the code that does the irq and dma requests so that the
driver will still attach if they are not avaliable. The attach
will still fail, with -ENOMEM, if the dma buffer cannot be allocated.
Remove the noise about the irq and dma during the attach.
Only hook up the async commands support if the irq and dma are
available. Remove the then unnecessary sanity check in a2150_ai_cmd().
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mark Einon [Thu, 5 Dec 2013 22:37:41 +0000 (22:37 +0000)]
staging: et131x: Remove unnecessary phydev checks
Several checks for a valid adapter->phydev pointer are made where the
pointer has already been checked previously in the code path.
Remove these redundant checks.
Signed-off-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stephen Warren [Wed, 4 Dec 2013 03:56:05 +0000 (20:56 -0700)]
staging: dwc2: disable uframe_sched on the bcm2835
While Paul said that .uframe_sched should be enabled on the BCM2835,
and doing so works fine with the built-in wired Ethernet, it prevents
my WiFi dongle from operating correctly. Hence, disable the option so
that everything works.
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> Acked-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peng Tao [Tue, 3 Dec 2013 17:54:59 +0000 (01:54 +0800)]
staging/lustre: don't compile procfs code when CONFIG_PROC_FS is off
The patch changes to conditionally compile procfs related source files.
This includes lproc_fid.c, lproc_fld.c, lproc_lov.c, lvfs_lib.c, lproc_mdc.c,
lproc_mgc.c, lprocfs_status.c, lproc_osc.c and sec_lproc.c.
There is a checkpatch warning about usage of simple_strtoul() in the patch.
But it needs to be fixed in a separate patch because it is not related to
CONFIG_PROC_FS breakage here.
Signed-off-by: Peng Tao <bergwolf@gmail.com> Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peng Tao [Tue, 3 Dec 2013 17:54:58 +0000 (01:54 +0800)]
staging/lustre: fix undefined reference if CONFIG_PROC_FS is off
When building Lustre with CONFIG_PROC_FS off, we'll get many errors like:
drivers/staging/lustre/lustre/obdclass/llog_test.c:1053: error: implicit declaration of function ‘lprocfs_llog_test_init_vars’
make[3]: *** [drivers/staging/lustre/lustre/obdclass/llog_test.o] Error 1
make[2]: *** [drivers/staging/lustre/lustre/obdclass] Error 2
make[2]: *** Waiting for unfinished jobs....
CC [M] drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.o
drivers/staging/lustre/lustre/ptlrpc/pinger.c: In function ‘ptlrpc_pinger_main’:
drivers/staging/lustre/lustre/ptlrpc/pinger.c:331: error: implicit declaration of function ‘obd_update_maxusage’
The patch defines following symbols when CONFIG_PROC_FS is off:
fld_type_proc_dir, obd_update_maxusage(), obd_max_pages, obd_max_alloc, obd_alloc,
obd_pages, lprocfs_llog_test_init_vars().
Signed-off-by: Peng Tao <bergwolf@gmail.com> Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
It exactly copies generic_segment_checks() except wrongly calling
access_ok(VERIFY_READ) for aio read range. Drop it and just call
generic_segment_checks() instead.
Signed-off-by: Peng Tao <bergwolf@gmail.com> Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peng Tao [Tue, 3 Dec 2013 17:54:56 +0000 (01:54 +0800)]
staging/lustre: fix build error in ll_setxattr_common
With CONFIG_FS_POSIX_ACL off, we'll get
drivers/staging/lustre/lustre/llite/xattr.c: In function ‘ll_setxattr_common’:
drivers/staging/lustre/lustre/llite/xattr.c:187:7: error: ‘rce’ undeclared (first use in this function)
drivers/staging/lustre/lustre/llite/xattr.c:187:7: note: each undeclared identifier is reported only once for each function it appears in
It was introduced by 7fc1f83 (staging/lustre/llite: extended attribute cache)
that added new reference but didn't take care of CONFIG_FS_POSIX_ACL.
Reported-by: Fengguang Wu <fengguang.wu@intel.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Peng Tao <bergwolf@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: pcl812: only init async command members when needed
The 'len_chanlist' and 'cancel' members of the comedi_subdevice are
only used with async command support. Only initialize them if the irq
was sucessfully requested.
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>
The subdevice 'len_chanlist' member is only used with async command
support. Remove the initialization of this member for the subdevices
that do not support commands. The core will then correctly initialize
it to the default value of '1'.
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>
The subdevice 'len_chanlist' member is only used with async command
support. Remove the initialization of this member for the subdevices
that do not support commands. The core will then correctly initialize
it to the default value of '1'.
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>
staging: comedi: pcl818: remove 'sub_ai' from private data
This member of the private data is a duplicate of the comedi_device
'read_subdev' member. Remove the private data member and use the
comedi_device member 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>
staging: comedi: pcl818: only init async command members when needed
The 'len_chanlist' and 'cancel' members of the comedi_subdevice are
only used with async command support. Only initialize them if the irq
was sucessfully requested.
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>
staging: comedi: pcl816: remove 'sub_ai' from private data
This member of the private data is a duplicate of the comedi_device
'read_subdev' member. Remove the private data member and use the
comedi_device member 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>
staging: lustre: reapply an older patch that was reverted
This reapplies part of 9edf0f670bdc8fa8b6676893b0a3bd2bf3 (staging:
lustre: clean up format string usages) as it was reverted in a recent
change to this file.
That proves the big problem of having external trees you have to have
patches flowing back into them from upstream or things break down...
Reported-by: Kees Cook <keescook@chromium.org> Reported-by: kbuild test robot <fengguang.wu@intel.com> Cc: Peng Tao <bergwolf@gmail.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martyn Welch [Fri, 8 Nov 2013 11:58:35 +0000 (11:58 +0000)]
VME: Rename vme_slot_get to avoid confusion with reference counting
Traditionally the "get" functions increment the reference count of the
object that is returned, which does not happen with vme_slot_get. The
function vme_slot_get returns the physical VME slot associated with a
particular struct vme_dev. Rename vme_slot_num to avoid any confusion.
Martyn Welch [Fri, 8 Nov 2013 11:58:34 +0000 (11:58 +0000)]
VME: Provide access to VME bus enumeration and fix vme_user match function
The match function for vme_user is completely wrong. It will blindly bind
against the first VME slot on each bus (at this point that would be just the
first bus as the driver can only handle one bus).
The original intention (before some major subsystem changes) was that the
driver bind against the slot to which the bridge was attached in the VME
system and to the bus(es) provided via the "bus" module parameter.
To do this cleanly (i.e. without poking arround in the subsystems internal
stuctures) a functionality has been added to provide access to the bus
enumeration.
staging: comedi: dt282x: tidy up the irq support in dt282x_attach()
An irq is only needed by this driver in order to support async commands.
Since it is optional, modify the attach so that if the request_irq() fails
the attach does not fail.
Remove the printk noise about the irq.
Only hookup the async command support if the request_irq() was successful.
Also, only call dt282x_grab_dma() if we have an irq since interrupt support
is needed to support dma.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: dt2814: tidy up the irq support in dt2814_attach()
An irq is only needed by this driver in order to support async commands.
Since it is optional, modify the attach so that if the request_irq() fails
the attach does not fail.
Remove the printk noise about the irq.
Only hookup the async command support if the request_irq() was successful.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: dt2811: remove disabled dt2811_adtrig() function
This function is not used by the driver. It's also suffering from bitrot
since COMEDI_MDEMAND and COMEDI_MCONTS are not defined anywhere. Just
remove the code.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: dmm32at: tidy up the irq support in dmm32at_attach()
An irq is only needed by this driver in order to support async commands.
Since it is optional, modify the attach so that if the request_irq() fails
the attach does not fail.
Remove the printk noise about the irq.
Only hookup the async command support if the request_irq() was successful.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: das16m1: tidy up the irq support in das16m1_attach()
An irq is only needed by this driver in order to support async commands.
Since it is optional, modify the attach so that if an invalid irq is
selected by the user, or the request_irq() fails, the attach does not
fail.
Remove all the printk noise about the irq.
Only hookup the async command support if the request_irq() was successful.
Tidy up das16m1_irq_bits() a bit. This helper returns the value that needs
to be written to the DAS16M1_INTR_CONTROL register to setup the irq routing.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>