Commit Graph

18703 Commits

Author SHA1 Message Date
Geert Uytterhoeven d1e183c8dd console/font: Refactor font support code selection logic
The current Makefile rules to build font support are messy and buggy.
Replace them by Kconfig rules:
  - Introduce CONFIG_FONT_SUPPORT, which controls the building of all font
    code,
  - Select CONFIG_FONT_SUPPORT for all drivers that use fonts,
  - Select CONFIG_FONT_8x16 for all drivers that default to the VGA8x16
    font,
  - Drop the bogus console dependency for CONFIG_VIDEO_VIVI,
  - Always process drivers/video/console/Makefile, as some drivers need
    fonts even if CONFIG_VT is not set.

This fixes (if CONFIG_SOLO6X10=y and there are no built-in console
drivers):

drivers/built-in.o: In function `solo_osd_print':
drivers/staging/media/solo6x10/solo6x10-enc.c:144: undefined reference to `.find_font'

This fixes (if CONFIG_VT=n):

drivers/built-in.o: In function `vivi_init':
vivi.c:(.init.text+0x1a3da): undefined reference to `find_font'

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com> [original part]
Acked-by: Randy Dunlap <rdunlap@infradead.org> [drivers/video/Makefile]
2013-06-23 15:55:16 +02:00
Geert Uytterhoeven 866f321339 Revert "staging/solo6x10: depend on CONFIG_FONTS"
This reverts commit 8c090cfbf9.

CONFIG_FONTS is not about enabling font support, but about enabling
manual selection of built-in fonts.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2013-06-23 15:55:15 +02:00
Alexey Khoroshilov 5e7db0389f [media] go7007: fix return 0 for unsupported devices in go7007_usb_probe()
probe() should not return 0 for unsupported devices, but go7007_usb_probe() does.
The patch fixes it to return -ENODEV.
Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-06-21 11:33:06 -03:00
Mauro Carvalho Chehab 37c1d2e409 Merge branch 'linus' into patchwork
* linus: (1465 commits)
  ARM: tegra30: clocks: Fix pciex clock registration
  lseek(fd, n, SEEK_END) does *not* go to eof - n
  Linux 3.10-rc6
  smp.h: Use local_irq_{save,restore}() in !SMP version of on_each_cpu().
  powerpc: Fix missing/delayed calls to irq_work
  powerpc: Fix emulation of illegal instructions on PowerNV platform
  powerpc: Fix stack overflow crash in resume_kernel when ftracing
  snd_pcm_link(): fix a leak...
  use can_lookup() instead of direct checks of ->i_op->lookup
  move exit_task_namespaces() outside of exit_notify()
  fput: task_work_add() can fail if the caller has passed exit_task_work()
  xfs: don't shutdown log recovery on validation errors
  xfs: ensure btree root split sets blkno correctly
  xfs: fix implicit padding in directory and attr CRC formats
  xfs: don't emit v5 superblock warnings on write
  mei: me: clear interrupts on the resume path
  mei: nfc: fix nfc device freeing
  mei: init: Flush scheduled work before resetting the device
  sctp: fully initialize sctp_outq in sctp_outq_init
  netiucv: Hold rtnl between name allocation and device registration.
  ...
2013-06-20 05:19:09 -03:00
Ben Hutchings 2206209e75 net: Add missing dependencies on NETDEVICES
ETRAX_ETHERNET selects ETHERNET and MII, which depend on NETDEVICES.
I don't think anything should select NETDEVICES, so make it a
dependency.  It also doesn't need to select or depend on ETHERNET,
which has nothing to do with the Ethernet library functions.

BPCTL selects MII, which depends on NETDEVICES.  But everything in the
drivers/staging/silicom directory is related to net devices, so make
NET_VENDOR_SILICOM depend on NETDEVICES and remove the now-redundant
dependencies on NET.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-06-19 22:22:56 -07:00
Ben Hutchings a1606c7dc6 net: Move MII out from under NET_CORE and hide it
All drivers that select MII also need to select NET_CORE because MII
depends on it.  This is a bit ridiculous because NET_CORE is just a
menu option that doesn't enable any code by itself.

There is also no need for it to be a visible option, since its users
all select it.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-06-19 22:22:56 -07:00
H Hartley Sweeten 2eb226dced staging: comedi: addi-data: remove unused 'i_NbrTTLChannel' boardinfo
None of the addi-data drivers that still use the "common" code have
ttl digital i/o. Remove the unnecessary boardinfo as well as the
subdevice initialization 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>
2013-06-19 09:45:58 -07:00
H Hartley Sweeten 41a3999eb0 staging: comedi: addi-data: remove unused 'i_Dma' present flag
None of the addi-data drivers that still use the "common" code support
dma. Remove the unnecessaary boardinfo and private data flags.

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>
2013-06-19 09:45:56 -07:00
H Hartley Sweeten b34e3ca28e staging: comedi: addi-data: remove unused vars from boardinfo
Due to the on-going cleanup of the addi-data drivers, the boardinfo
used in the "common" code has a number of variables that are not
used. Remove the cruft.

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>
2013-06-19 09:45:56 -07:00
H Hartley Sweeten d4c2fa605a staging: comedi: addi-data: remove unused defines in addi_common.h
Due to the on-going cleanup of the addi-data drivers, there are a
number of unused defines in addi_common.h. Remove the cruft.

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>
2013-06-19 09:45:56 -07:00
H Hartley Sweeten 9d9cfa188b staging: comedi: addi-data: simplify the PCI bar reading
All of the remaining addi-data drivers that use the "common" code
either do not have an eeprom or the PCI controller chip is not a
PLX PCI 9054. Knowing this we can simplify the common code that
reads the PCI bars to get the iobase addresses.

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>
2013-06-19 09:45:56 -07:00
H Hartley Sweeten 7e5c304c5b staging: comedi: addi-data: remove unused vars from private data
Due to the on-going cleanup of the addi-data drivers, the private
data used in the "common" code has a number of variables that
either are not used at all or or set but never used.

Remove all of them from the private data and the unnecessary use
in the drivers.

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>
2013-06-19 09:45:55 -07:00
Xenia Ragiadakou 5f2392b865 staging: rtl8192u: fix comments in r819xU_phy.c
This patch fixes the comments in r819xU_phy.c by:
- replacing "// ..." with "/* .... */"
- removing unnecessary comments, the dates and names of
  developers from comments
- fixing some inconsistent comments
- fixing some typos
- fixing alignment issues

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-19 09:41:40 -07:00
Xenia Ragiadakou 83e6d9e262 staging: rtl8192u: fix spaces around ',' in r819xU_phy.c
This patch fixes the whitespace around ',' to meet the
linux kernel coding style.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-19 09:41:40 -07:00
Xenia Ragiadakou c4b5eb8c01 staging: rtl8192u: remove variable 'Ret' in r819xU_phy.c
This patch removes variable 'Ret' from rtl8192_QueryBBReg()
since its value is returned immediately after it is
assigned. The name 'Ret', anyway, does not give any
insight and the function description comment is sufficiently
informative regarding the returned value.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-19 09:41:39 -07:00
Wei Yongjun c639b9fbe3 Staging: netlogic: fix missing free_netdev() on error in xlr_net_probe()
Fix missing free_netdev() before return from function xlr_net_probe()
in the devm_ioremap_resource() error handling case.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-19 09:41:37 -07:00
Sakari Ailus 7bb151b23b [media] davinci_vpfe: Clean up media entity after unregistering subdev
media_entity_cleanup() frees the links array which will be accessed by
media_entity_remove_links() called by v4l2_device_unregister_subdev().

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-06-19 08:58:39 -03:00
Chad Williamson d0941b1e07 Staging: silicom: move more assignments out of if conditions
Remove more assignments from if-statement conditions in bpctl_mod.c,
resolving checkpatch.pl errors. Those that remain need more attention
than I'm presently prepared to give them.

Signed-off-by: Chad Williamson <chad@dahc.us>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-18 11:41:41 -07:00
Chad Williamson 3f3c1fc9ad Staging: silicom: move assignments out of if conditions
Remove a bunch of assignments from if-statement conditions in
bpctl_mod.c, resolving checkpatch.pl errors. (This isn't all of
them, but the patch is getting rather long...)

Signed-off-by: Chad Williamson <chad@dahc.us>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-18 11:40:26 -07:00
Chad Williamson ea675ee5b8 Staging: silicom: remove unnecessary braces in bpctl_mod.c
Remove unnecessary braces in bpctl_mod.c, resolving checkpatch.pl
warnings.

Signed-off-by: Chad Williamson <chad@dahc.us>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-18 11:34:08 -07:00
Xenia Ragiadakou 7993163901 staging: rtl8192u: rename general variables in r819xU_phy.c
This patch renames the following variables:
- dwRegAddr and RegAddr into reg_addr
- dwData and Data       into data
- BitShift              into bitshift
- Offset                into offset
- NewOffset             into new_offset
- Bandwidth             into bandwidth

The renaming was done to remove camel case and
unnecessary 'dw' prefix from the above variable names.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-18 11:32:39 -07:00
Xenia Ragiadakou 9f66ddb5f7 staging: rtl8192u: rename *BitMask variables in r819xU_phy.c
This patch renames BitMask and dwBitMask variables into
bitmask to remove camel case.
dwBitMask in the given context can be renamed into simply
bitmask since its number of bits (dw->32) can be deduced
by its type which is u32.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-18 11:32:39 -07:00
Xenia Ragiadakou 07ecbbf1a3 staging: rtl8192u: replace *Value variables in r819xU_phy.c
This patch renames the variables OriginalValue, NewValue,
Original_Value, New_Value and retValue to reg, and
the variables bRegValue and dwRegValue to reg_u8 and
reg_u32, respectively. This is done primarily in
order to reduce the variable name length and consequently
line length.

Also, it replaces the pair of Original and New variables
with one variable.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-18 11:32:39 -07:00
Xenia Ragiadakou 9d8e79ed32 staging: rtl8192u: fix spaces around relational operators in r819xU_phy.c
This patch fixes the whitespace around relational operators
to meet the linux kernel coding style.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-18 11:32:39 -07:00
Xenia Ragiadakou 111857c983 staging: rtl8192u: fix spaces around ';' in r819xU_phy.c
This patch fixes the whitespace around ';' to meet the
linux kernel coding style.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-18 11:32:38 -07:00
Xenia Ragiadakou ec5d319bbf staging: rtl8192u: fix spaces around '=' in r819xU_phy.c
This patch fixes the whitespace around the assignment
operator to meet linux kernel coding style.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-18 11:32:38 -07:00
Markus Niebel 000d73fc3b staging: imx_drm: imx_ldb: fix 18 bit format
Since 18 bit is supported as datawidth in device tree it should be
supported in driver. Beside the LDB channel the IPU channel has also
to be configured to use BGR666.

Signed-off-by: Markus Niebel <Markus.Niebel@tqs.de>
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-18 11:22:58 -07:00
Sascha Hauer ac4c1a9b33 staging: drm/imx: Add LDB support
This adds support for the LVDS Display Bridge contained
in i.MX5 and i.MX6 SoCs.

Bit mapping, data width, and video timings are configurable
via device tree. Dual-channel mode is supported for a single
high-resolution source.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-18 11:22:58 -07:00
Dave Jones 0c29359252 staging/rtl8192u: remove commented out __list_for_each usage
Also remove another commented out open-coded list manipulation while we're there.

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-18 11:22:58 -07:00
Dave Jones cbe97c4593 staging/rtl8187se: Convert __list_for_each use to list_for_each
Also remove commented out list manipulation

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-18 11:22:58 -07:00
Aaro Koskinen d935217df1 staging: octeon-usb: octeon-hcd: eliminate printk()s
Replace one printk() with dev_dbg(), and delete the other.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-18 11:17:04 -07:00
Aaro Koskinen 334715f31b staging: octeon-usb: octeon-hcd: delete commented-out code
Delete commented-out code.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-18 11:17:04 -07:00
Aaro Koskinen 87e7e57acd staging: octeon-usb: octeon-hcd: reformat long comments
Fix some comments to fit into 80 colums.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-18 11:17:03 -07:00
Aaro Koskinen 71e06db3b9 staging: octeon-usb: octeon-hcd: use dev_dbg
Replace DEBUG macros with dev_dbg. Some less useful are completely
deleted.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-18 11:17:03 -07:00
Linus Torvalds aad7601365 Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media fixes from Mauro Carvalho Chehab:
 "Series of fixes for 3.10.  There are some usual driver fixes (mostly
  on s5p/exynos playform drivers), plus some fixes at V4L2 core"

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (40 commits)
  [media] soc_camera: error dev remove and v4l2 call
  [media] sh_veu: fix the buffer size calculation
  [media] sh_veu: keep power supply until the m2m context is released
  [media] sh_veu: invoke v4l2_m2m_job_finish() even if a job has been aborted
  [media] v4l2-ioctl: don't print the clips list
  [media] v4l2-ctrls: V4L2_CTRL_CLASS_FM_RX controls are also valid radio controls
  [media] cx88: fix NULL pointer dereference
  [media] DocBook/media/v4l: update version number
  [media] exynos4-is: Remove "sysreg" clock handling
  [media] exynos4-is: Fix reported colorspace at FIMC-IS-ISP subdev
  [media] exynos4-is: Ensure fimc-is clocks are not enabled until properly configured
  [media] exynos4-is: Prevent NULL pointer dereference when firmware isn't loaded
  [media] s5p-mfc: Add NULL check for allocated buffer
  [media] s5p-mfc: added missing end-of-lines in debug messages
  [media] s5p-mfc: v4l2 controls setup routine moved to initialization code
  [media] s5p-mfc: separate encoder parameters for h264 and mpeg4
  [media] s5p-mfc: Remove special clock usage in driver
  [media] s5p-mfc: Remove unused s5p_mfc_get_decoded_status_v6() function
  [media] v4l2: mem2mem: save irq flags correctly
  [media] coda: v4l2-compliance fix: add VIDIOC_CREATE_BUFS support
  ...
2013-06-18 06:25:08 -10:00
Isaku Yamahata a267a6041f staging/rtl8192u: convert skb->tail into skb_tail_pointer(skb)
The change set of 7a884dc "[SK_BUFF]: Convert skb->tail to sk_buff_data_t"
converted skb->tail from pointer into sk_buff_data_t.
Thus skb->tail is not always pointer, the area pointed by skb->tail
should be accessed via skb_tail_pointer().

Found by inspection. Compile tested only.

Cc: Simon Horman <horms@verge.net.au>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: devel@driverdev.osuosl.org
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Reviewed-by: Simon Horman <horms@verge.net.au>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-06-17 17:12:21 -07:00
Greg Kroah-Hartman bb07b00be7 Merge 3.10-rc6 into driver-core-next
We want these fixes here too.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17 16:57:20 -07:00
Lorenz Haspel 28352c3fdc silicom: checkpatch: trailing statements
fixed checkpatch error:
trailing statements that should be on next line

Signed-off-by: Lorenz Haspel <lorenz@badgers.com>
Signed-off-by: Michael Banken <michael.banken@mathe.stud.uni-erlangen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17 15:49:17 -07:00
Lorenz Haspel 75177588de silicom: checkpatch: fixed whitespace errors
started cleanfile
also fixed some other whitespace errors cleanfile didn't find

Signed-off-by: Lorenz Haspel <lorenz@badgers.com>
Signed-off-by: Michael Banken <michael.banken@mathe.stud.uni-erlangen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17 15:49:17 -07:00
Bernd Bassimir ef2af12262 staging: serqt_usb2: lines over 80 characters fixed
Changed name of one variable, so that all lines are now below 80
characters.

Signed-off-by: Bernd Bassimir <bassimir.kernel@gmx.de>
Signed-off-by: Nico Doerr <nico.doerr@hawo.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17 15:47:44 -07:00
Bernd Bassimir d68edc2881 staging: serqt_usb2: Fixed coding style CamelCases
Changed names of several variables, that contained CamelCases.

Signed-off-by: Bernd Bassimir <bassimir.kernel@gmx.de>
Signed-off-by: Nico Doerr <nico.doerr@hawo.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17 15:47:44 -07:00
Xenia Ragiadakou 442543d78c staging: rtl8192u: fix function arguments position in r819xU_phy.c
This patch fixes the alignment of function arguments to make
it uniform across the driver trying to keep the line size
below 80 characters.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17 15:45:44 -07:00
Xenia Ragiadakou ceb5659758 staging: rtl8192u: fix spaces around ( and ) in r819xU_phy.c
This patch removes whitespace after ')' and before ')'
following the linux kernel coding style conventions.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17 15:45:44 -07:00
Xenia Ragiadakou d75340eb05 staging: rtl8192u: remove commented-out code in r819xU_phy.c
This patch removes commented-out code to improve code
readability.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17 15:45:44 -07:00
Xenia Ragiadakou eadb188c78 staging: rtl8192u: fix spaces around for and while in r819xU_phy.c
This patch fixes whitespace around 'for' and 'while'
following the linux kernel coding style conventions.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17 15:45:44 -07:00
Xenia Ragiadakou 1111b8769a staging: rtl8192u: fix spaces around 'if' in r819xU_phy.c
This patch fixes whitepace around 'if' following the linux
kernel coding style convention.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17 15:45:44 -07:00
Xenia Ragiadakou 4c8dd92620 staging: rtl8192u: fix return statements in r819xU_phy.c
This patch fixes the following checkpatch error:
ERROR: return is not a function, parentheses are not required

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17 15:45:43 -07:00
Xenia Ragiadakou 4a6094c317 staging: rtl8192u: fix braces in r819xU_phy.c
This patch fixes the brace position and the whitespace
around braces.

That corrects the following checkpatch errors:
ERROR: that open brace { should be on the previous line
ERROR: else should follow close brace '}'
ERROR: space required after that close brace '}'

Also, it removes completely an if(0) statement,
instead of correcting its braces.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17 15:45:43 -07:00
Xenia Ragiadakou 391c72a30b staging: rtl8192u: fix bitshift calculation in r819xU_phy.c
This patch uses the ffs linux built-in routine in the
computation of the bitshift to take advantage of
architecture specific instructions that implement this
computation more efficiently.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17 15:45:43 -07:00
Malcolm Priestley 409359a12d staging: vt6656: mac.c MACvDisableKeyEntry remove dead code wOffset
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17 14:55:32 -07:00
Malcolm Priestley bef6779d62 staging: vt6656: mac.c Remove commented out dead code
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17 14:55:32 -07:00
Malcolm Priestley 13d8d8904a staging: vt6656: mac.c pbyData Remove magic number array size
Array size always equals ARRAY_SIZE of pbyData

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17 14:55:32 -07:00
Aaro Koskinen f5ed3a3870 staging: octeon-usb: octeon-hcd: make internal variable static
Make an internal variable static.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17 14:53:07 -07:00
Aaro Koskinen 2a81d2b01f staging: octeon-usb: octeon-hcd: fix some includes
Avoid including from "asm/".

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17 14:51:36 -07:00
Aaro Koskinen c7609eac88 staging: octeon-usb: octeon-hcd: add missing braces
One else branch was missing braces.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17 14:50:47 -07:00
Aaro Koskinen 771378bb05 staging: octeon-usb: octeon-hcd: use tabs for code indent
Replace spaces with tabs where possible.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17 14:49:14 -07:00
Tobias Polzer 0a58857707 staging: csr: Fix obvious logic error in staging/csr
In uf_process_ma_packet_req() (staging/csr/unifi_pdu_processing.c), the
test for
(staInfo->timSet != CSR_WIFI_TIM_RESET) || (staInfo->timSet !=
CSR_WIFI_TIM_RESETTING)
obviously makes no sense and causes GCC to emit a warning if
-Wlogical-op is enabled.
As suggested in the referenced bug report, || was replaced by &&.

References: https://bugzilla.kernel.org/show_bug.cgi?id=46571
Reported-By: David Binderman <dcb314@hotmail.com>
Signed-off-by: Tobias Polzer <tobias.polzer@fau.de>
Signed-off-by: Dominik Paulus <dominik.paulus@fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17 14:48:12 -07:00
Li RongQing 126898b0a2 staging: csr: fix the reset of skb mac header
mac_header can be offset if NET_SKBUFF_DATA_USES_OFFSET is set, so
we should call skb_reset_mac_header to reset mac_header.

Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17 14:48:12 -07:00
Rupesh Gujare 255ece7c4d staging: ozwpan: remove event tracing code.
Removes event tracing code as it can be replaced
by in-kernel tracing infrastructure.

Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17 14:48:12 -07:00
Laura Lawniczak 9acd5b654d staging: keucr: removed unnecessary variables and comments
blen and bn were only used in commented code fragments.
since comments should be informative and not for storing old
code, both, commented code and variables, were removed.

Signed-off-by: Laura Lawniczak <laura.lawniczak@googlemail.com>
Signed-off-by: Johannes Schilling <of82ecuq@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17 14:46:18 -07:00
H Hartley Sweeten 656e39fedc staging: comedi: addi_apci_3xxx: only allocate needed subdevices
The number of subdevices needed by a given board supported by this
driver can cary from 2 (for the apci3500) to a maximum of 5. Currently
this driver always allocates 7 subdevices and sets the subdevice type
to COMEDI_SUBD_UNUSED for the ones that are not needed.

Calculate the actual number of needed subdevices from the boardinfo
and only allocate and setup the ones that are used.

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>
2013-06-17 14:33:56 -07:00
H Hartley Sweeten f32376e993 staging: comedi: addi_apci_3xxx: fix the analog input subdevice
The analog input subdevice support functions in hwdrv_apci3xxx.c
do not follow the comedi API.

The (*insn_config) function overrides the INSN_CONFIG_DIO_INPUT
instruction as an internal APCI3XXX_CONFIGURATION instruction. The
APCI3XXX_CONFIGURATION instruction requires 4 data parameters but
the comedi core sanity checks the INSN_CONFIG_DIO_INPUT instruction
which only has 1 data parameter. Because of this the (*insn_config)
function can never be called.

The (*insn_read) function is supposed to do "one-shot" or "software-
triggered" reads and return the data. The function in hwdrv_apci3xxx.c
does do this but it also is used to optionally start a "hardware-
triggered" conversion. Hardware-triggered conversions should be done
with the comedi_async command functions.

Delete the hwrdv_apci3xxx.c file and fix the analog input subdevice
in the driver by:

1) add a new (*insn_read) function for "one-shot" reads
2) implement the (*do_cmdtest) and (*do_cmd) functions for
   "hardware-triggered" asyncronous reads
3) fix the interrupt handler to return the read data via the
   comedi_async buffer

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>
2013-06-17 14:33:56 -07:00
H Hartley Sweeten 66573991c4 staging: comedi: addi_apci_3xxx: stub in analog input command support
The analog input subdevice in this driver is broken. The attach of
this driver requests the irq and sets the dev->read_subdev to the
analog input subdevice but it does not setup the subdevice to support
commands.

Stub in the command support functions so we can fix the subdevice.

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>
2013-06-17 14:33:56 -07:00
H Hartley Sweeten 308380e696 staging: comedi: addi_apci_3xxx: tidy up analog input subdevice init
For aesthetic reasnons, add some whitespace to the analog input
subdevice initialization.

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>
2013-06-17 14:33:56 -07:00
H Hartley Sweeten 040540763b staging: comedi: addi_apci_3xxx: remove 'b_SingleDiff' private data
The analog reference desired for the acquisition is stored in the
insn->chanspec that is passed to the (*insn_read) function. There is
no need to use a private data variable to hold the desired analog
reference that is set in the (*insn_config).

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>
2013-06-17 14:33:56 -07:00
H Hartley Sweeten 8d4729066c staging: comedi: addi_apci_3xxx: remove 'i_NbrAiChannelDiff' boardinfo
The number of differential analog input channels is always half the
number of single-ended channels, 'ai_n_chan', or all the channels
if the board does not support single-ended channels. We can use the
'ai_subdev_flags' boardinfo to determine if the board does not support
single-ended channels.

To simplify the boardinfo, remove the 'i_NbrAiChannelDiff' and just
use 'ai_n_chan' to specify the number of channels.

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>
2013-06-17 14:33:56 -07:00
H Hartley Sweeten 47bd1ad800 staging: comedi: addi_apci_3xxx: rename 'i_NbrAiChannel'
Rename this CamelCase boardinfo variable.

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>
2013-06-17 14:33:55 -07:00
H Hartley Sweeten 8edd44251e staging: comedi: addi_apci_3xxx: rename 'ui_MinAcquisitiontimeNs'
Rename this CamelCase boardinfo variable.

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>
2013-06-17 14:33:55 -07:00
H Hartley Sweeten a67e0cc7aa staging: comedi: addi_apci_3xxx: clarify 'b_AvailableConvertUnit'
This boardinfo defines the conversion time bases that the analog input
subdevice supports (ns, us, ms).

Add some defines to get rid of the magic numbers and clarify 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>
2013-06-17 14:33:55 -07:00
H Hartley Sweeten 850643bd05 staging: comedi: addi_apci_3xxx: tidy up i_APCI3XXX_AnalogInputConfigOperatingMode()
The analog input subdevice is broken in this driver. To help fix
it, tidy up this (*insn_config) helper function.

Rename the CamelCase function and all the CamelCase local variables.

Refactor the sanity checks to make the function a bit more concise
and remove the printk noise.

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>
2013-06-17 14:33:55 -07:00
H Hartley Sweeten 46572bad94 staging: comedi: addi_apci_3xxx: tidy up i_APCI3XXX_InsnConfigAnalogInput()
The analog input subdevice is broken in this driver. To help fix
it, tidy up this (*insn_config) function.

Rename the CamelCase function.

Move the (insn->n == 4) test from i_APCI3XXX_AnalogInputConfigOperatingMode()
to this function.

Make the function a bit more concise and remove the printk noise.

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>
2013-06-17 14:33:55 -07:00
H Hartley Sweeten 8a1ec30d75 staging: comedi: addi_apci_3xxx: properly set the analog input subdev_flags
Some of the boards supported by this driver only have differential
analog inputs. Add a new boardinfo, 'ai_subdev_flags', to allow
properly setting the subdev_flags for the analog input subdevice.

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>
2013-06-17 14:33:55 -07:00
H Hartley Sweeten 5469d92908 staging: comedi: addi_apci_3xxx: rename boardinfo 'i_AiMaxData'
Rename this CamelCase boardinfo. Also, change its type to match
the type of comedi_subdevice 'maxdata'.

For aesthetic reasons, change the values to hex since this is more
common for the 'maxdata' values in comedi drivers.

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>
2013-06-17 14:33:54 -07:00
H Hartley Sweeten 6abeba097b staging: comedi: addi_apci_3xxx: rename boardinfo 'pc_DriverName'
Rename this CamelCase boardinfo.

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>
2013-06-17 14:33:54 -07:00
H Hartley Sweeten 79518d9f9c staging: comedi: addi_apci_3xxx: remove 'i_AiChannelList' from the boardinfo
The analog input s->len_chanlist for the boards supported by this driver
should always be the number of channels (s->n_chan). Use that instead
and remove the 'i_AiChannelList' from the boardinfo.

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>
2013-06-17 14:33:54 -07:00
H Hartley Sweeten 283ce66926 staging: comedi: addi_apci_3xxx: remove 'tsk_Current' from private data
The interrupt function should be using comedi_event() to let the user
know data is available from the analog input subdevice.

The analog input subdevice is currently broken and nothing sets
tsk_Current anyway so just remove it.

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>
2013-06-17 14:33:54 -07:00
H Hartley Sweeten f43abbb4ff staging: comedi: addi_apci_3xxx: rename 'dw_AiBase' in private data
This variable holds the ioremap'ed PCI bar 3 used to read/write the
analog input and output registers. Rename it to simply 'mmio'.

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>
2013-06-17 14:33:54 -07:00
H Hartley Sweeten dc63364691 staging: comedi: addi_apci_3xxx: remove 'iobase' from private data
The private data 'iobase' is the same as the comedi_device 'iobase'.
Use the one in the comedi_device instead.

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>
2013-06-17 14:33:44 -07:00
H Hartley Sweeten 9cfd70de79 staging: comedi: addi_apci_3xxx: remove 'i_IobaseReserved' from private data
This variable is not used by the driver. Remove it.

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>
2013-06-17 14:33:43 -07:00
H Hartley Sweeten 088e2e053d staging: comedi: addi_apci_3xxx: tidy up i_APCI3XXX_InsnReadAnalogInput()
The analog input subdevice in this driver is broken. It abuses the
comedi API and will not work as-is. Start cleaning it up so it can
be fixed.

Rename the CamelCase function and the local variables.

Refactor the function to remove the indents. Most of the indents are
left over from the previous patches.

Invert the early tests to provide a quick exit from the function.

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>
2013-06-17 14:33:43 -07:00
H Hartley Sweeten f4e694d54e staging: comedi: addi_apci_3xxx: remove sanity checks in i_APCI3XXX_InsnReadAnalogInput()
The comedi core validates the insn->chanspec channel and range before
calling the subdevice (*insn_read) function.

Remove the unnecessary sanity checks.

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>
2013-06-17 14:33:43 -07:00
H Hartley Sweeten 08be3097fa staging: comedi: addi_apci_3xxx: remove 'b_AiInitialisation' from private data
This variable is set during the attach of the board and never cleared
so the test in i_APCI3XXX_InsnReadAnalogInput() will always succeed.
Just remove the variable to help with cleaning up this driver.

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>
2013-06-17 14:33:42 -07:00
H Hartley Sweeten 61048cf4b9 staging: comedi: addi_apci_3xxx: remove unused define
This define is not used by the driver. Remove it.

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>
2013-06-17 14:33:42 -07:00
H Hartley Sweeten da6578abd7 staging: comedi: addi_apci_3xxx: refactor the ttl digital i/o support
Currently, the subdevice functions used to configure and read/write the
ttl digital i/o ports is way over to complicated. The (*insn_config)
function also abuses the comedi API by overriding the instruction
command passed in data[0].

Fix the ttl digital i/o support to work like the comedi core expects.

The (*insn_config) function supports the three instructions common for
COMEDI_SUBD_DIO subdevices:

    INSN_CONFIG_DIO_INPUT - configure the specified channel as input
    INSN_CONFIG_DIO_OUTPUT - configure the specified channel as output
    INSN_CONFIG_DIO_QUERY - returns the status of the specified channel

    Port 0 (channels 0-7) is always input
    Port 1 (channels 8-15) is always output
    Port 2 (channels 9-23) are programmable i/o (all channels are input or output)

The (*insn_bits) function allows writing to the output channels and returns
the state of all channels.

The (*insn_read) and (*insn_write) functions are not required. The comedi
core will emulate them using the (*insn_bits) function.

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>
2013-06-17 14:33:42 -07:00
H Hartley Sweeten 0e771e49fc staging: comedi: addi_apci_3xxx: absorb i_APCI3XXX_InsnWriteAnalogOutput()
Rename this CamelCase function and absorb it from hwdrv_apci3xxx.c
directly into the driver.

Tidy up the analog output subdevice init by adding some whitespace.

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>
2013-06-17 14:33:42 -07:00
H Hartley Sweeten fa81e2f186 staging: comedi: addi_apci_3xxx: refactor 'i_NbrAoChannel' boardinfo
The boards that have analog outputs always have 4 channels.

Remove the 'i_NbrAoChannel' data from the boardinfo and add a bit
field to indicate that the board 'has_ao'. Use that to conditionally
initialize the subdevice and open code the s->n_chan value of 4.

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>
2013-06-17 14:33:42 -07:00
H Hartley Sweeten f73abd3334 staging: comedi: addi_apci_3xxx: refactor i_APCI3XXX_InsnWriteAnalogOutput()
Rename the CamelCase local variables.

The comedi core validates the insn->chanspec to make sure the channel
number and range are valid for the subdevice. The extra checks in this
function are not required.

(*insn_write) functions are supposed to write all the data passed
in the data pointer (insn->n values) then return the number of data
values written of an errno. Fix this function to work like the core
expects.

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>
2013-06-17 14:33:42 -07:00
H Hartley Sweeten 383390cfd4 staging: comedi: addi_apci_3xxx: tidy up the ttl digital i/o subdevice init
For aesthetic reasons, add some whitespace to the initialization of the
ttl digital i/o subdevices.

Fix the subdev_flags for the subdevice. The SDF_GROUND and SDF_COMMON
flags only apply to analog subdevices.

Fix the s->iobits for the subdevice. According to the datasheet:
	Port 0 (channels 0-7) are always outputs
	Port 1 (channels 8-15) are always inputs
	Port 2 (channels 9-23) are programmable i/o (default to inputs)

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>
2013-06-17 14:33:41 -07:00
H Hartley Sweeten ca1cc85b0e staging: comedi: addi_apci_3xxx: tidy up the digital in and out subdevice init
For aesthetic reasons, add some whitespace to the initialization of the
digital input and output subdevices.

Fix the subdev_flags for both subdevices. The SDF_GROUND and SDF_COMMON
flags only apply to analog subdevices. Digital output subdevices do not
need the SDF_READABLE flag set.

Remove the initialization of s->io_bits. It only has meaning for
COMEDI_SUBD_DIO subdevices.

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>
2013-06-17 14:33:41 -07:00
H Hartley Sweeten f1861cb0d2 staging: comedi: addi_apci_3xxx: analog output 'maxdata' is always 12-bit
The boards that have analog outputs always have 12-bit resolution.

Remove the 'i_AoMaxdata' data from the boardinfo and open code the
s->maxdata. Use the hex value for the resolution since that is more
common in comedi drivers.

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>
2013-06-17 14:33:41 -07:00
H Hartley Sweeten 0ed9f25fbc staging: comedi: addi_apci_3xxx: refactor 'i_NbrTTLChannel' boardinfo
The boards that have ttl input and output channels always have 24
channels.

Remove the 'i_NbrTTLChannel' data from the boardinfo and add a bit
field to indicate that the board 'has_ttl_io'. Use that to conditionally
initialize the subdevice and open code the s->n_chan value of 24.

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>
2013-06-17 14:33:41 -07:00
H Hartley Sweeten 4aab8bfd1d staging: comedi: addi_apci_3xxx: refactor 'i_NbrD[io]Channel' boardinfo
The boards that have digital input and output channels always have
4 inputs and 4 outputs.

Remove the 'i_NbrD[io]Channel' data from the boardinfo and add two
bit fields to indicate that the board 'has_dig_in' and 'has_dig_out'.
Use those to conditionally initialize the subdevices and open code
the s->n_chan value of 4 for both subdevices.

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>
2013-06-17 14:33:41 -07:00
H Hartley Sweeten 1b5f2f4fa5 staging: comedi: addi_apci_3xxx: remove 'i_IorangeBase1' from boardinfo
This data in the boardinfo is not used. Remove it.

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>
2013-06-17 14:33:41 -07:00
H Hartley Sweeten 5c70cbfb3a staging: comedi: addi_apci_3xxx: move the copyright info to the driver
Move the copyright information from hwdrv_apci3xxx.c to the actual
driver, addi_apci_3xxx.c.

Reformat the information to follow the CodingStyle.

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>
2013-06-17 14:33:41 -07:00
H Hartley Sweeten 225dfd10bf staging: comedi: addi_apci_3xxx: remove some unused includes
This driver does not use anything provided by these includes.
Remove them.

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>
2013-06-17 14:33:40 -07:00
H Hartley Sweeten 641abdac09 staging: comedi: addi_apci_3xxx: remove COMEDI_SUBD_TTLIO
This driver abuses the enum comedi_subdevice_type by redefining
enum 11 - COMEDI_SUBD_SERIAL as COMEDI_SUBD_TTLIO. The subdevice
that uses COMEDI_SUBD_TTLIO is a TTL Digital Input/Output subdevice.

Remove COMEDI_SUBD_TTLIO and just use COMEDI_SUBD_DIO as the
subdevice type.

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>
2013-06-17 14:33:40 -07:00
H Hartley Sweeten 1867add98e staging: comedi: addi_apci_3xxx: introduce a local private data definition
The struct addi_private definition from the addi-data "common" code is
very bloated. Introduce a local struct apci3xxx_private that just has
the data needed by this driver.

Add a couple includes that this driver depends on and remove the include
of "addi-data/addi_common.h" since this driver no longer depends on it.

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>
2013-06-17 14:33:40 -07:00
H Hartley Sweeten e053b2419f staging: comedi: addi_apci_3xxx: introduce a private boardinfo definition
The struct addi_board definition from the addi-data "common" code is
very bloated. Introduce a private struct apci3xxx_boardinfo that just
has the data needed by this driver.

Move the #include "addi-data/hwdrv_apci3xxx.c" so it will have the new
struct definition.

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>
2013-06-17 14:33:40 -07:00
H Hartley Sweeten b9671585a9 staging: comedi: addi_apci_3xxx: remove (*insn_*) callbacks from boardinfo
The same subdevice callbacks are used by all the boards supported by
this driver. Remove the information from the boardinfo and initialize
the subdevices directly.

Remove the callback initializations that are always = NULL.

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>
2013-06-17 14:33:40 -07:00
H Hartley Sweeten f57b428c00 staging: comedi: addi_apci_3xxx: remove need for s_EeParameters
The boards supported by this driver do not have an eeprom. Remove the
need for the devpriv->s_EeParameters values by just using the values
from the boardinfo directly.

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>
2013-06-17 14:33:40 -07:00
H Hartley Sweeten 56e18770ae staging: comedi: addi_apci_3xxx: digital output 'maxdata' is always '1'
Digital output subdevices always have a 'maxdata' of '1'. Remove the
'i_DoMaxData' boardinfo and just open code the value.

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>
2013-06-17 14:33:39 -07:00
H Hartley Sweeten 93c0dc284d staging: comedi: addi_apci_3xxx: boards do not have an eeprom
All of the boards supported by this driver have a PCI 9054 chip
without an attached eeprom.

Remove the unused support code that reads the eeprom.

Also, remove the unnecessary 'i_PCIEeprom' and 'pc_EepromChip' data
from the boardinfo.

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>
2013-06-17 14:33:39 -07:00
H Hartley Sweeten 178bd8d3a6 staging: comedi: addi_apci_3xxx: boards do not have a timer
None of the boards supported by this driver have a timer. Remove
the unnecessary 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>
2013-06-17 14:33:39 -07:00
H Hartley Sweeten fe220a444f staging: comedi: addi_apci_3xxx: driver does not use dma
This driver does not use dma. Remove the unnecessary 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>
2013-06-17 14:33:39 -07:00
H Hartley Sweeten 2107347327 staging: comedi: addi_apci_3xxx: simplify the PCI bar reading
The boards supported by this driver all have an ADDIDATA_9054 eeprom.
Knowing this we can simplify the code that reads the PCI bars to get
the iobase address used by the driver.

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>
2013-06-17 14:33:39 -07:00
H Hartley Sweeten 98a856213e staging: comedi: addi_apci_3xxx: absorb the private comedi_lrange tables
All the boards supported by this driver have the same private
analog input and output ranges.  Absorb the comedi_lrange tables
from hwdrv_apci3xxx.c directly into the driver. For aesthetic
reasons, rename the tables so they have namespace associated
with the driver.

Remove the 'pr_AiRangelist' and 'pr_AoRangelist' data from the
boardinfo and use the range tables directly when initializing
the subdevices.

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>
2013-06-17 14:33:39 -07:00
H Hartley Sweeten 6c5b0fff8e staging: comedi: addi_apci_3xxx: absorb v_APCI3XXX_Interrupt()
All the boards supported by this driver use the same 'interrupt'
callback in the boardinfo. Absorb the interrupt function from
hwdrv_apci3xxx.c directly into the driver. Rename the CamelCase
function to apci3xxx_irq_handler().

Remove v_ADDI_Interrupt(), which indirectly called the interrupt
function, and use apci3xxx_irq_handler instead when requesting
the irq. Remove the 'interrupt' callback from the boardinfo.

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>
2013-06-17 14:33:38 -07:00
H Hartley Sweeten be68a01e30 staging: comedi: addi_apci_3xxx: tidy up v_APCI3XXX_Interrupt()
Remove the extra comments and rename the CamelCase local variables.

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>
2013-06-17 14:33:38 -07:00
H Hartley Sweeten ae57b69639 staging: comedi: addi_apci_3xxx: absorb apci3xxx_di_insn_bits()
All the boards supported by this driver that have digital inputs use
the same 'di_bits' callback in the boardinfo. Absorb the function from
hwdrv_apci3xxx.c directly into the driver.

Remove the 'di_bits' callback from the boardinfo and use the function
directly to set the subdevice (*insn_bits).

None of the boards supported by this driver have a 'di_config', 'di_read',
or 'io_write' callback. Remove the unnecessary setting of the subdevice
callbacks.

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>
2013-06-17 14:33:38 -07:00
H Hartley Sweeten c3d8605fca staging: comedi: addi_apci_3xxx: absorb apci3xxx_do_insn_bits()
All the boards supported by this driver that have digital outputs use
the same 'do_bits' callback in the boardinfo. Absorb the function from
hwdrv_apci3xxx.c directly into the driver.

Remove the 'do_bits' callback from the boardinfo and use the function
directly to set the subdevice (*insn_bits).

None of the boards supported by this driver have a 'do_config', 'do_write',
or 'do_read' callback. Remove the unnecessary setting of the subdevice
callbacks.

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>
2013-06-17 14:33:38 -07:00
H Hartley Sweeten 5e72c7a507 staging: comedi: addi_apci_3xxx: absorb apci3xxx_reset()
All the boards supported by this driver use the same 'reset' callback
in the boardinfo. Absorb the reset function, apci3xxx_reset(), from
hwdrv_apci3xxx.c directly into the driver.

Remove i_ADDI_Reset(), which indirectly called the reset function, and
just call apci3xx_reset() directly. Remove the 'reset' callback from
the boardinfo.

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>
2013-06-17 14:33:38 -07:00
H Hartley Sweeten 98d3385dd6 staging: comedi: addi_apci_3xxx: separate from addi_common.c
This driver currently uses the addi-data "common" code and contains
a lot of bloat.

Copy the code in addi_common.c to this driver and remove the #include
that caused it to be compiled with the driver. This will allow removing
the bloat.

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>
2013-06-17 14:33:38 -07:00
H Hartley Sweeten 7fd1fd30fd staging: comedi: addi_apci_3xxx: clean up i_APCI3XXX_Reset()
Rename the CamelCase function and variables.

Remove the extra comments. Leave the main comments to help with further
cleanup of this driver.

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>
2013-06-17 14:33:37 -07:00
H Hartley Sweeten 588ba6dc5f staging: comedi: drivers: let core handle freeing s->private
Introduce a new subdevice runflags, SRF_FREE_SPRIV, and a new helper
function, comedi_set_spriv(), that the drivers can use to set the
comedi_subdevice private data pointer. The helper function will also
set SRF_FREE_SPRIV to allow the comedi core to automatically free the
subdevice private data during the cleanup_device() stage of the detach.

Currently s->private is only allocated by the 8255, addi_watchdog,
amplc_dio200_common, and ni_65xx drivers. All users of those drivers
can then have the comedi_spriv_free() calls removed and in many cases
the (*detach) can then simply be the appropriate comedi core provided
function.

The ni_65xx driver uses a helper function, ni_65xx_alloc_subdevice_private(),
to allocate the private data. Refactor the function to return an errno
or call comedi_set_spriv() instead of returning a pointer to the private
data and requiring the caller to handle it.

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>
2013-06-17 14:31:10 -07:00
Chad Williamson cadf87a090 Staging: silicom: move symbol exports beneath definitions in bpctl_mod.c
Move the EXPORT_SYMBOL macros in bpctl_mod.c beneath the definitions
they refer to, resolving checkpatch.pl warnings. While we're at it, use
EXPORT_SYMBOL rather than EXPORT_SYMBOL_NOVERS.

Signed-off-by: Chad Williamson <chad@dahc.us>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17 14:31:10 -07:00
Chad Williamson 22ca14a9d9 Staging: silicom: move symbol exports beneath definitions in bypass.c
Move the EXPORT_SYMBOL macros in bypass.c beneath the definitions
they refer to, resolving checkpatch.pl warnings. While we're at it, use
EXPORT_SYMBOL rather than EXPORT_SYMBOL_NOVERS.

Signed-off-by: Chad Williamson <chad@dahc.us>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17 14:31:10 -07:00
Chad Williamson c482ca7294 Staging: silicom: remove the EXPORT_SYMBOL_NOVERS macro
Since all references to EXPORT_SYMBOL_NOVERS have been removed,
we can remove its definition from bp_mod.h and bypasslib/bplibk.h.

Signed-off-by: Chad Williamson <chad@dahc.us>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17 14:31:09 -07:00
Greg Kroah-Hartman e5b1e2062e USB: serial: make minor allocation dynamic
This moves the allocation of minor device numbers from a static array to
be dynamic, using the idr interface.  This means that you could
potentially get "gaps" in a minor number range for a single USB serial
device with multiple ports, but all should still work properly.

We remove the 'minor' field from the usb_serial structure, as it no
longer makes any sense for it (use the field in the usb_serial_port
structure if you really want to know this number), and take the fact
that we were overloading a number in this field to determine if we had
initialized the minor numbers or not, and just use a flag variable
instead.

Note, we still have the limitation of 255 USB to serial devices in the
system, as that is all we are registering with the TTY layer at this
point in time.

Tested-by: Tobias Winter <tobias@linuxdingsda.de>
Reviewed-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17 13:30:02 -07:00
Alexey Khoroshilov e049ca5e85 [media] staging/media: lirc_imon: fix leaks in imon_probe()
Error handling of usb_submit_urb() is not as all others in imon_probe().
It just unlocks mutexes and returns nonzero leaving all already
allocated resources unfreed.
The patch makes sure all the resources are deallocated.
Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-06-17 15:52:20 -03:00
Ismael Luceno 8460d519bc [media] solo6x10: reimplement SAA712x setup routine
This cleans up the saa712x setup code and there are no functional changes.

Signed-off-by: Ismael Luceno <ismael.luceno@corp.bluecherry.net>
[hans.verkuil@cisco.com: add clarification that this is cleanup only]
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-06-17 09:53:09 -03:00
Hans Verkuil 8f73d3bbf8 [media] dt3155v4l: remove deprecated current_norm
Since this driver provides a g_std op the current_norm field isn't used
anyway, so just drop it.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-06-17 09:39:27 -03:00
Ville Syrjälä fb85ac4da8 drm: Drop all the stub gamma_get, gamma_set, load_lut functions from drivers
Many of the drivers didn't implement palette/gamma handling, but were forced
to provide stubs for the hooks to avoid drm_fb_helper from oopsing. Now that
the hooks are optional, we can eliminate all the stubs.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@gmail.com>
2013-06-17 19:42:47 +10:00
Greg Kroah-Hartman bad15f2c38 Third round of IIO new stuff, cleanups and staging graduations for the 3.11
cycle.
 
 1) Add clock consumer support and device tree bindings to adf4350.
    The clock consumer part depends on a not so optional 'optional'
    implementation of clock_round_rate which is not present for pxa27x.
    It will be shortly and as no one actually uses this chip with that
    sub arch as far as we know, no need to delay the inclusion in the
    meantime. See
    http://lkml.indiana.edu/hypermail/linux/kernel/1306.1/00023.html
    for the brief discussion.  This may be the first non soc specific driver
    that makes use of that function.
 
 2) AD7303 DAC new driver.
 
 3) ADIS16130 minor fixes and improvements plus move out of staging.
 
 4) AD7291 improvements to bring it inline with more recent drivers.
 
 5) Update to the sysfs ABI doc to fix some out of date paths.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.20 (GNU/Linux)
 
 iQIcBAABAgAGBQJRve0gAAoJEFSFNJnE9BaI1zwP/jLgKrp+9l1W9ZORDEm9YrPw
 BlnLhAIOgbeO2kZf6UEAo//0yYJ1C7fTGPfx65J9sFeIx5oiqH9/JKJkQKholX32
 uvrz/uPtPBUD8O3g4hc1fokRocHc0JR5jDzJUCkVq9Sbw5Ed9ufNAUWxZ44oFTHj
 6oGKJQG8Whhdh2S/E9NHspXxp70Fqg6v8CKG/dQ6hnrrBOHoL5QTJidsiZIXxJDy
 fRknSrp6KTcDJxOyUGzV/yVRLrXCvH97Op+oxpMZB4j1RVxKlQ8yjNMKaCO3yWnl
 WH2wVx1WytwbkfjwrJTxfHERNs0pPjcp7bA/C34FnPfgGA4dTv6TBYcSYQN3ZHzt
 W/Pdy28p/xptXNATNb27N9nRWXh+1fQnCdYECrB5d4K6JfG4eMo0q6r+HcFr96kO
 zc0zH7HtNBBR4CT0MKo5OWs7/srv7guI5gL5Hu6uMgRG+yrSRaRkDNQz9IEnIQyQ
 KWRFNpgnAIWNWmUpm0kWWShLFmLcI0uWz0g+6aGFnVc01HXFItLuhY959liiVxI8
 7DFBhXi/A2t9yE9q5qj74OL+L4fuYwSRxzDQbN98js8zqAWGNDS1XF4wRXAwOG8m
 5m8OhbYKNilEh7hsuIq5o67WVxbaE2XJzZgNVeL/GiAVtctprENdBdOT2XDOLc/a
 LiKQND/qJTNY39YIHBFI
 =MiTn
 -----END PGP SIGNATURE-----

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

Jonathan writes:

Third round of IIO new stuff, cleanups and staging graduations for the 3.11
cycle.

1) Add clock consumer support and device tree bindings to adf4350.
   The clock consumer part depends on a not so optional 'optional'
   implementation of clock_round_rate which is not present for pxa27x.
   It will be shortly and as no one actually uses this chip with that
   sub arch as far as we know, no need to delay the inclusion in the
   meantime. See
   http://lkml.indiana.edu/hypermail/linux/kernel/1306.1/00023.html
   for the brief discussion.  This may be the first non soc specific driver
   that makes use of that function.

2) AD7303 DAC new driver.

3) ADIS16130 minor fixes and improvements plus move out of staging.

4) AD7291 improvements to bring it inline with more recent drivers.

5) Update to the sysfs ABI doc to fix some out of date paths.
2013-06-16 11:46:05 -07:00
Lars-Peter Clausen 1df9d1d4a1 staging:iio:ad7291: Rework regulator handling
Add platform_data for the driver which allows to specify whether an external
reference voltage is used or not. It is not possible to use the return value of
regulator_get() for this since the regulator framework is able to return a dummy
regulator in case no regulator has been specified. In this case the driver will
always get a valid regulator, no matter if it has been specified or not.  Also
make the regulator non-optional if platform_data states that an external
reference voltage should be used.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-06-14 21:55:17 +01:00
Lars-Peter Clausen 88198d2b42 staging:iio:ad7291: Use sign_extend32 instead of open-coding it
This makes it a bit more obvious what is going on than open-coding it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-06-14 21:54:09 +01:00
Lars-Peter Clausen 7bd49fe120 staging:iio:ad7291: Use i2c_smbus_{read,write}_word_swapped instead of open-coding it
No need to swap the upper and lower byte by hand if there is a helper function
which already does this.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-06-14 21:53:31 +01:00
Lars-Peter Clausen 3f8db0d46b staging:iio:ad7291: Simplify threshold register lookup
The AD7291 register map is nicely uniform and we can easily compute the
threshold register address for a certain channel using simple math instead of
using a look-up table.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-06-14 21:52:54 +01:00
Lars-Peter Clausen 08d7a70c01 staging:iio:ad7291: Remove unnecessary dev_info() from probe()
No need spam the log during probe if nothing went wrong.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-06-14 21:52:04 +01:00
Lars-Peter Clausen 83740d53d0 staging:iio:ad7291: Remove userspace reset
There is no reason why userspace should want to trigger a manual reset of the
device, so remove this functionality.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-06-14 21:51:28 +01:00
Lars-Peter Clausen 73a4445f30 staging:iio:ad7291: Use IIO_VAL_FRACTIONAL_LOG2
This is a bit more straight forward and also allows better precession when using
the an in-kernel consumer.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-06-14 21:50:51 +01:00
Xenia Ragiadakou 4a8d113554 staging: rtl8192u: fix macros in r8192U.h
This patch fixes the macros in r8192U.h.
More specifically:

1) removes the ';' from the end of the macro definition
   and changes according the files that are affected by
   this change by adding ';' at the end of the macro call
2) replaces printk with pr_debug, when applicable
3) replaces __FUNCTION__ with __func__
4) fixes the framing when the macro contains complex expressions
5) renames macro 'assert' as 'RTL9192U_ASSERT', so that it
   cannot be confused with the c function assert(), and changes
   accordingly the files affected by this change

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-11 17:18:04 -07:00
Xenia Ragiadakou 631edcdc45 staging: rtl8192u: fix whitespace around '(=<, ' in r8192U.h
This parch fixes the following checkpatch errors:
ERROR: space required before the open parenthesis '('
ERROR: spaces required around that '='
ERROR: spaces required around that '<'
ERROR: space required after that ','

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-11 17:18:03 -07:00
Xenia Ragiadakou 2da4fc24f5 staging: rtl8192u: fix braces in r8192U.h
This patch fixes the whitespace around braces and brace
position, and corrects the following checkpatch errors:
ERROR: space required after that close brace '}'
ERROR: space required before the open brace '{'
ERROR: that open brace { should be on the previous line
ERROR: open brace '{' following enum go on the same line

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-11 17:18:03 -07:00
Xenia Ragiadakou 4e0be66853 staging: rtl8192u: fix comments in r8192U.h
This patch fixes the comments in r8192U.h by:

1) replacing '// ... ' comments with '/* ... */' comments
2) removing from the comments the date and the developer's name
3) removing unnecessary comments when variables naming is
   descriptive enough

Also, it fixes some typos found in the comments and arranges
the comments placement and content aiming to improve code
readability and to limit line length below 80 chars, without
loosing the comment's substance.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-11 17:18:02 -07:00
Xenia Ragiadakou 93a8265290 staging: rtl8192u: remove commented-out code in r8192U.h
This patch removes commented-out code to improve code
readability.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-11 17:18:01 -07:00
H Hartley Sweeten d50a2d5483 staging: comedi: pcl724: update the MODULE_DESCRIPTION
Change the MODULE_DESCRIPTION to something more useful than the
generic "Comedi low-level driver".

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>
2013-06-11 17:16:48 -07:00
H Hartley Sweeten 8091fb739a staging: comedi: pcl724: fix 96 DIO configuration option
According to the comedi documentation at the beginning of the file,
configuration option 2 sets the number of DIO channels on the boards
that support 144 or 96 channels.

Fix the (*attach) to use the correct configuration option.

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>
2013-06-11 17:16:48 -07:00
H Hartley Sweeten e33437fc30 staging: comedi: pcl724: tidy up multi-line comments
Tidy up the multi-line comments are the beginning of the file to follow
the CodingStyle.

Cleanup the comedi comment block about the driver to follow the normal
comedi style.

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>
2013-06-11 17:16:47 -07:00
H Hartley Sweeten eea410ce66 staging: comedi: pcl724: remove 'dio' from boardinfo
This data in the boardinfo is not used by the driver. Remove it.

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>
2013-06-11 17:16:47 -07:00
H Hartley Sweeten 57aade1dae staging: comedi: pcl724: tidy up pcl724_attach()
Consolidate the special handling of the 'hoard->can_have96' flag.
This flag overrides the iorange and n_subdevices for the PCL-724
board when it is used in a 96 DIO configuration.

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>
2013-06-11 17:16:46 -07:00
H Hartley Sweeten 84f7db9d8f staging: comedi: pcl724: tidy up subdev_8255_init() calls
subdev_8255_init() can fail, make sure to check for it and return
the errno.

The private function subdev_8255_cb() is identical to the default
io callback used by the 8255 driver. Remove it and pass NULL to
subdev_8255_init() so the default callback will be used.

The private function subdev_8255mapped_cb() is used for the memory
memory mapped io of the pet48dio board. Rename this function so
it has namespace associated with the driver.

Casting the iobase passed to subdev_8255_init() is not needed.
Use a local variable for the iobase and remove the casts.

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>
2013-06-11 17:16:46 -07:00
H Hartley Sweeten 0a0c2cb96b staging: comedi: pcl724: tidy up the boardinfo struct definition
Remove the unnecessary comments and reorder the variables a bit.

Change the 'is_*' and 'can_*' flags to bit fields.

Remove the '*_SIZE' defines and open code the values.

Reorder the boardinfo declaration to follow the definition.

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>
2013-06-11 17:16:45 -07:00
H Hartley Sweeten 0d4dd7d61b staging: comedi: pcl724: remove all '= 0' boardinfo
All uninitialized data will default to 0.

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>
2013-06-11 17:16:44 -07:00
H Hartley Sweeten 0b69b44901 staging: comedi: pcl724: tidy up the boardinfo
Convert the boardinfo declaration to C99 format and move it near the
struct definition.

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>
2013-06-11 17:16:44 -07:00
H Hartley Sweeten 313b83d390 staging: comedi: pcl724: remove interrupt support
Interrupt support in this driver is not complete.

Remove the #ifdef'ed out code in pcl724_attach() that validates
the interrupt number and does the request_irq().

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>
2013-06-11 17:16:43 -07:00
Tushar Behera 803c83fc11 Staging: netlogic: Convert to use devm_ioremap_resource
Commit 75096579c3 ("lib: devres: Introduce devm_ioremap_resource()")
introduced devm_ioremap_resource() and deprecated the use of
devm_request_and_ioremap().

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
CC: devel@driverdev.osuosl.org
CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-11 17:13:38 -07:00
Alexey Khoroshilov 773fe724ab staging: ft1000: fix memory leak on error path in ft1000_probe()
ft1000dev->tx_urb and ft1000dev->rx_urb are not deallocated
if something goes wrong in ft1000_probe(). Also there is no
check for success of urb allocation. The patch fixes the both issues.

By the way, there is no sense in GFP_ATOMIC for urb allocation here,
so it is changed to GFP_KERNEL.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-11 17:13:37 -07:00
Lars-Peter Clausen 32341859f0 staging:iio:adis16130: Move out of staging
The adis16130 driver is fairly simple and it a good shape now, so move it out of
staging. Remove an outdated FIXME along the way.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-06-11 20:34:36 +01:00
Lars-Peter Clausen 597e1a86df staging:iio:adis16130: Report scale and offset
Report scale and offset for the temperature and voltage channels.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-06-11 20:33:40 +01:00
Lars-Peter Clausen 19155762f1 staging:iio:adis16130: Fix sample reading
The driver first does a proper read of the data register, but right after that
it does a spi_read, which will overwrite the initial result.

It looks as if the extra spi_read was accidentally introduced in commit
a5e7363ca ("staging:iio:gyro:adis16130 drop control of adc resolution."), quite
likely due to a bad rebase.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-06-11 20:31:00 +01:00