Commit graph

311720 commits

Author SHA1 Message Date
Marc Dietrich f5e3352e51 staging: nvec: convert to devm_ functions
This patch cleanups the nvec and its childs by replacing calls to
resource allocations by their devm_* equivalents.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-25 10:55:37 -07:00
Samuel Iglesias Gonsalvez 59d6a29e55 Staging: ipack/devices/ipoctal: remove unneeded lock in IRQ handler
In the rest of the code, the data is protected with spin_lock_irqsave().

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-25 10:50:01 -07:00
Samuel Iglesias Gonsalvez bae8bd165a Staging: ipack/bridges/tpci200: remove unneeded lock in irq handler
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-25 10:50:00 -07:00
Samuel Iglesias Gonsalvez 55c0a6f470 Staging: ipack/devices/ipoctal: remove unneeded includes
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-25 10:50:00 -07:00
Samuel Iglesias Gonsalvez db1db294d9 Staging: ipack/devices/ipoctal: fix oops when accessing "buffer"
The buffer[][] field was replaced by tty_port->xmit_buf field but there was
some places that "buffer" was still accessed, giving a kernel oops because
it was uninitialized.

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-25 10:50:00 -07:00
Justin P. Mattock 7756d3e8b0 staging: sm7xxfb: Fix typos in sm7xxfb
The below patch fixes some typos found in staging "sm7xxfb" while
reading through.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-25 10:50:00 -07:00
Seth Jennings 6e2361720b staging: zram/zcache: swtich Kconfig dependency from X86 to ZSMALLOC
This patch switches zcache and zram dependency to ZSMALLOC
rather than X86.  There is no net change since ZSMALLOC
depends on X86, however, this prevent further changes to
these files as zsmalloc dependencies change.

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-25 10:00:53 -07:00
Randy Dunlap c90e3e80b9 staging: reduce stack usage in prism2fw.c
Fix frame size (stack usage) warning by allocating and freeing
pointers to the data.

drivers/staging/wlan-ng/prism2fw.c:1115:1: warning: the frame size of 4288 bytes is larger than 2048 bytes

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-25 10:00:53 -07:00
Greg Kroah-Hartman bcc66c0b88 Merge 3.5-rc4 into staging-next
This picks up the staging changes made in 3.5-rc4 so that everyone can sync up
properly.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-25 09:31:00 -07:00
Linus Torvalds 6b16351acb Linux 3.5-rc4 2012-06-24 12:53:04 -07:00
Anatol Pomozov 02b7d83436 Fix typo in printed messages
Coult -> Could

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-06-24 11:03:52 -07:00
Linus Torvalds 104452f052 Merge git://git.kernel.org/pub/scm/virt/kvm/kvm
Pull KVM fixes from Avi Kivity:
 "Fixing a scheduling-while-atomic bug in the ppc code, and a bug which
  allowed pci bridges to be assigned to guests."

* git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: PPC: Book3S HV: Drop locks around call to kvmppc_pin_guest_page
  KVM: Fix PCI header check on device assignment
2012-06-24 11:02:09 -07:00
Linus Torvalds 08d49c46cf InfiniBand/RDMA fixes for 3.5-rc:
- Fixes to new ocrdma driver
  - Typo in test in CMA
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABCAAGBQJP5wISAAoJEENa44ZhAt0hWzAQAIV1qnXTz+HDXzz8MLTX8wR0
 6uUAcGxuP1PXB4K+DmYc7Ht0FnvJN0E9KN7cCDo20XbZU9NzXkqP36WL3fWt5+34
 9YKQYK14Rbi65ex+UwbASnyZ35iuNjPSVnnnEWMAoE3ZmEXWdM9FzIX41xav+FTy
 Lw0qIVO28d6Rx9LiODnNgbDqqyPzgqmam6SQszcfDwm+PqgcI/RaI/578GY+88qA
 +qofgDpL5rnzyWa2GMIGlbB21xKlqlhF3GuSSp5hHmDCaiNtfS0KsyHE+ys6r1UC
 uLKkBxlXngPF//DWFPUVVwXLHSHgtQ7qfHbk2kUqZjhrt/Famdju16q5oRSLiVrW
 MoilOEMzbt0AaRn2tEQ4srXHvhNnHkxQsPlSZ+alMWRDZS1jf4ESMOj+V+4gUUUQ
 +xYhyLge3GBUE8qt+zerbmLqRcyG6bF3HHMGFKJZrh3up++yZgZF/E5UXFTLYOv5
 6j9sG+dELFgtAhbC13ysvj5IyiVrFl3oh7Ynf2q5/Fyo2yPtde/hk+TGzXwRFOQg
 WF9SjnQsM3LsXhSX0D30kcjE76pCAcy6SyhE5FKA+mumyf7HG+UC+1lo2bUfNqO0
 HAXcgsc7wGXoOvBO1YOCmpUTyWrCQT3OikltDibnWdoUYpfaYFAiWJKdtLA0HylK
 3QJBh6/0/QGS5WhKr0KD
 =LFia
 -----END PGP SIGNATURE-----

Merge tag 'rdma-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband

Pull InfiniBand/RDMA fixes from Roland Dreier:
 - Fixes to new ocrdma driver
 - Typo in test in CMA

* tag 'rdma-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  RDMA/cma: QP type check on received REQs should be AND not OR
  RDMA/ocrdma: Fix off by one in ocrdma_query_gid()
  RDMA/ocrdma: Fixed RQ error CQE polling
  RDMA/ocrdma: Correct queue SGE calculation
  RDMA/ocrdma: Correct reported max queue sizes
  RDMA/ocrdma: Fixed GID table for vlan and events
2012-06-24 11:00:07 -07:00
Linus Torvalds a4a20fd981 ARM: SoC fixes
Nothing very controversial in here. Most of the fixes are for OMAP this time
 around, with some orion/kirkwood and a tegra patch mixed in.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJP5k/mAAoJEIwa5zzehBx3WkYQAKqiFgS2SeVXiQbRFKm9rMlj
 htGOkMmtBsMG3oT3rRXcYU77DiokdkonFqFcy10GNYS1GnC+kDw9dEUCh1B16UV1
 b/sNA+XIU8aqxGXrlys1HaIxoAvTsHA5ohL3oMrB1djqESfopdI/vpHPK8WZ+aXn
 6Kf/47miVOTokGywdg2l+irKM2WqndnV0z880Hrfqsk/6t07TzCUhmDS8kXS+2kb
 TDhlz8SL/FaU58AAVIcMK+YCvL+uQjLkbYAtqO5zEbKTzvf9CK68UrBqqr0EgKys
 nO/NozwBYfQUjQdzAjhauYbFuVTU/nnamE2gM4yEHB1Q7pkICkHle9dprufrKefB
 B70MZXikExuxn72jhQrE8SL/UA6UGQedZkXlRYT/E+o24eCUaPaG0AwDyFeahC7J
 FkAWX/lvxWWRO6xs35BNfvUBzAOsOySEUz9J2JEmZpz3GXmgf+lM3fAgi6uSFNKH
 KNjCIVrRcbz0CNiR991EVLguaZ6Oj4ZdS1iV4Msr7j8NMOIG54SLqDskdF1FmmtO
 2BzVqfDRqxvItfKLTuGrG8mghaeSCbZbzsIvHVFeZOJXU4NTyMVF6DxIYrJ55iwt
 yYvUYKEer8U0MEpg5kdNuzvwIFq/fqRdpAUGYGD4biikLDo5vmmKvEqBZPDtuaPh
 Qec+Dcvudm+r5QZKw2ge
 =6Ahb
 -----END PGP SIGNATURE-----

Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Olof Johansson:
 "Nothing very controversial in here.  Most of the fixes are for OMAP
  this time around, with some orion/kirkwood and a tegra patch mixed in."

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  ARM: Orion: Fix Virtual/Physical mixup with watchdog
  ARM: Kirkwood: clk_register_gate_fn: add fn assignment
  ARM: Orion5x - Restore parts of io.h, with rework
  ARM: OMAP4: hwmod data: Force HDMI in no-idle while enabled
  ARM: OMAP2+: mux: fix sparse warning
  ARM: OMAP2+: CM: increase the module disable timeout
  ARM: OMAP4: clock data: add clockdomains for clocks used as main clocks
  ARM: OMAP4: hwmod data: fix 32k sync timer idle modes
  ARM: OMAP4+: hwmod: fix issue causing IPs not going back to Smart-Standby
  ARM: OMAP: Fix Beagleboard DVI reset gpio
  arm/dts: OMAP2: Fix interrupt controller binding
  ARM: OMAP2: Fix tusb6010 GPIO interrupt for n8x0
  ARM: OMAP2+: Fix MUSB ifdefs for platform init code
  ARM: tegra: make tegra_cpu_reset_handler_enable() __init
  ARM: OMAP: PM: Lock clocks list while generating summary
  ARM: iconnect: Remove include of removed linux/spi/orion_spi.h
2012-06-24 10:57:59 -07:00
Linus Torvalds 2ecedc478e Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Pull drm fixes from Dave Airlie:
 "Nothing major in here, one radeon SI fix for tiling, and one uninit
  var fix, two minor header file fixes."

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm: drop comment about this header being autogenerated.
  drm/edid: don't return stack garbage from supports_rb
  vga_switcheroo: Add include guard
  drm/radeon: SI tiling fixes for display
2012-06-24 10:57:15 -07:00
Roland Dreier 2e51fd3c13 Merge branches 'cma' and 'ocrdma' into for-linus 2012-06-24 04:59:59 -07:00
Andrew Lunn 0fa1f0609a ARM: Orion: Fix Virtual/Physical mixup with watchdog
The orion watchdog is expecting to be passed the physcial address of
the hardware, and will ioremap() it to give a virtual address it will
use as the base address for the hardware. However, when creating the
platform resource record, a virtual address was being used.

Add the necassary #define's so we can pass the physical address as
expected.

Tested on Kirkwood and Orion5x.

Cc: stable <stable@vger.kernel.org>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Olof Johansson <olof@lixom.net>
2012-06-23 16:19:21 -07:00
Marc Kleine-Budde 5fb2ce119c ARM: Kirkwood: clk_register_gate_fn: add fn assignment
In commit:
    98d9986 ARM: Kirkwood: Replace clock gating
the kirkwood clock gating has been reworked. A custom variant of
clock gating, that calls a custom function before gating the clock
off, has been introduced. However in clk_register_gate_fn() this
custom function "fn" is never assigned.

This patch adds the missing fn assignment.

Cc: stable <stable@vger.kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@blackshift.org>
Tested-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Olof Johansson <olof@lixom.net>
2012-06-23 16:19:02 -07:00
Andrew Lunn b5e12229a4 ARM: Orion5x - Restore parts of io.h, with rework
Commit 4d5fc58dbe (ARM: remove bunch of
now unused mach/io.h files) removed the orion5x io.h. Unfortunately,
this is still needed for the definition of IO_SPACE_LIMIT which
overrides the default 64K. All Orion based systems have 1Mbyte of IO
space per PCI[e] bus, and try to request_resource() this size. Orion5x
has two such PCI buses.

It is likely that the original, removed version, was broken. This
version might be less broken. However, it has not been tested on
hardware with a PCI card, let alone hardware with a PCI card with IO
capabilities.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2012-06-23 16:18:17 -07:00
Olof Johansson a34a3b7264 Some uncontroversial OMAP clock, hwmod, and compiler warning fixes for 3.5-rc
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJP474+AAoJEMePsQ0LvSpLASkP/1A8pu+UeYm13KjDqOCCg2lM
 SyKji76uiEPNRZ3OZcAqeZSs0Cs25gpPey3/9i2asL+xYYl6EHpep4YMCOuaVe5v
 a0xyuPH7H+MlfTTOvMVWOuUdSJQxKrom+BHYfNQNdi4ofGY+MpquYbeO6xg/MiYQ
 D3o6DCamosocPWB3UjXzAiYfrhqBxw6FiWDnL3IivIVboRfIkj3fy2DB1SXMPpx+
 zDYF2FCExqnWkLMYOK2rW80PAyJnXIi0ZyqjfyhXxgNvcVnjBApPNuSEsDI73bVF
 G2Ju3cfYS9VMDsVOo2rIyCR+cWrzVmpDJQDg++mAAQau7xUGgMSDsxneZhNlbedN
 mheAEhLmC1h7ddydxg7yXCRkHzlvLtBfpLTqZzbvuc55Fu7H9ZEW4/YDVHLdCid8
 iJoF6r42J9hlgjn31sKsMmCK+eeRjwHBqtOrjsf0nYyd54JEJuANKNaw+1q35Xh1
 YX+zwUQP1W+u7RPuq1fTY9GFv/ZRVR3/JotqaI+DwlT8baUanUjjank1gC3PoFps
 pPbePJOalPXRSyNAbgoykRdrFja7z3p2ZEfOq+WQAbvRmCNSsAvLwq9jYThXdIpi
 JTvuLp3qliMitFFeGEn/fpfZJBYkQloGPqQD1wNY+5s8S+kopQwduK6aexwjmxTa
 AZwSftW3lxmEBO9MJxQm
 =LDqr
 -----END PGP SIGNATURE-----

Merge tag 'omap-fixes-a-for-3.5rc' of git://git.kernel.org/pub/scm/linux/kernel/git/pjw/omap-pending into fixes

From Paul Walmsley (as per Tony Lindgren's request):
 "Some uncontroversial OMAP clock, hwmod, and compiler warning fixes for 3.5-rc"

* tag 'omap-fixes-a-for-3.5rc' of git://git.kernel.org/pub/scm/linux/kernel/git/pjw/omap-pending:
  ARM: OMAP4: hwmod data: Force HDMI in no-idle while enabled
  ARM: OMAP2+: mux: fix sparse warning
  ARM: OMAP2+: CM: increase the module disable timeout
  ARM: OMAP4: clock data: add clockdomains for clocks used as main clocks
  ARM: OMAP4: hwmod data: fix 32k sync timer idle modes
  ARM: OMAP4+: hwmod: fix issue causing IPs not going back to Smart-Standby
  ARM: OMAP: PM: Lock clocks list while generating summary
2012-06-23 16:16:29 -07:00
Olof Johansson e23d7096f9 Here are a few fixes with the biggest one being fix for Beagle DVI
reset. All of them are regression fixes, except for the missing omap2
 interrupt controller binding that somehow got missed earlier.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJP40b1AAoJEBvUPslcq6Vz9iUP/0JUq0xvUEctn9HMOx4xt4Iz
 MYC4DSwdUk9AHdbfzQSxHHHIYULjXJDtO0WlAgt9wHNG4lSHQHEG7XTTvpkWbyaQ
 fzIQG/U7xW37HjHTS/v2JFftr/ZaF3gE4e1hcu+GJmUifACR5MBkfOPhqmJDqku2
 eN4suYTUoV4Ey4Ijh+bc/T6XKFFyg0YaxyAKaMRpLQKhDK/Ihy8pyA/3+ggLCbnT
 2U/ZszJgbc34N9VEYG2kLvz+JVVtG6JzHjI4Oa7wQQ9UpsK/NVWhbZ/F/0yjjyuw
 TWWUFSxOIrU+/i1G2Bz1NS4rniCAnNlAMsodmrRbSRgJLItIjdILPV/apX5N8WRL
 bus3kV/2I7C1OwbCqiXBCXXQlPZmMzTLhQyQWs6bGhjtmVdpVpoolE4Wgk4okxWJ
 eBDh10xmTHwoYh/y3wAcN7q3s1A6cNj6Vl0+nnUFIfTo2w6ca4znLjZUvhVEBkNg
 wufARvMP1o1YBRN9yS9wlFsLdVS3J+ALu/+zbHeJKWIzPXSaHLfrVTNSCpb3iHEX
 3ZXMPooFjpP23ZYJoi8eILaBP6mD+3vD9eM0PYJYeL181Huihk8i8rQYZDbLQbCL
 avWZAyfgul4Pcg48IlStsjE3pBnr0HZ6WPP8T8TCg6oqS19dKqjSG/Jwv1+iuNo6
 GQuu/hCsFjrJ3YOBgcDj
 =cMPJ
 -----END PGP SIGNATURE-----

Merge tag 'omap-fixes-for-v3.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes

From Tony Lindgren:
"Here are a few fixes with the biggest one being fix for Beagle DVI
 reset. All of them are regression fixes, except for the missing omap2
 interrupt controller binding that somehow got missed earlier."

* tag 'omap-fixes-for-v3.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP: Fix Beagleboard DVI reset gpio
  arm/dts: OMAP2: Fix interrupt controller binding
  ARM: OMAP2: Fix tusb6010 GPIO interrupt for n8x0
  ARM: OMAP2+: Fix MUSB ifdefs for platform init code
2012-06-23 16:11:50 -07:00
Larry Finger 1c1b862157 staging: r8712u: Remove useless driver version info
This driver contains version information that is outdated, has no real
value in terms of the Linux update process, and tends to confuse users.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22 21:24:49 -07:00
Peter Meerwald 8b32b11c2e staging: iio: fix typo, improve timestamp alignment comment
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22 21:24:27 -07:00
Peter Meerwald 970689f10e staging: iio: simplify timestamp alignment in iio_simple_dummy
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22 21:24:27 -07:00
Peter Meerwald 708706ff29 staging: iio: fix trigger handler of iio_simple_dummy driver
accessing first and last channel fails:
fakedata[0] is never accessed, out-of-bound access for last channel

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22 21:24:27 -07:00
Lars-Peter Clausen 971ff1db41 iio:trigger: Use to_iio_trigger() instead of dev_get_drvdata()
Use to_iio_trigger(dev) instead of dev_get_drvdata(dev). Both will return the
trigger which belongs to the device, but the the first on is a bit more
lightweight.

Since this is the last location where we used dev_get_drvdata() for retrieving
the trigger there is no need anymore to assign the the trigger to the devices
drvdata, so we can remove that as well.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22 21:08:11 -07:00
Lars-Peter Clausen 4bf8172772 staging:iio:trigger: Use to_iio_trigger() instead of dev_get_drvdata()
Use to_iio_trigger(dev) instead of dev_get_drvdata(dev). Both will return the
trigger which belongs to the device, but the the first on is a bit more
lightweight. Also this will eventually free up the drvdata pointer of the device
for driver specific data.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22 21:08:10 -07:00
Jesper Juhl 70b3fd34a9 staging: vt6656: Correct a few assignments to be compares in iwctl_siwencodeext()
The result of "foo = bar" is true, so in statements such as
  ...
  if((pDevice->bwextstep0 = TRUE)&&(param->u.wpa_key.key_index ==1))
  ...
an assignment  is most likely not what was intended - a comparison was. As in:
  ...
  if ((pDevice->bwextstep0 == TRUE) && (param->u.wpa_key.key_index == 1))
  ...

There are a 3 such mistakes in the iwctl_siwencodeext() function.
This patch fixes them all.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22 21:04:05 -07:00
Jesper Juhl b15297e912 staging: rts5139: Remove duplicate include of rts51x.h
The header "rts51x.h" is included unconditionally at the start of the
file and then again once more under "#ifdef SUPPORT_FILE_OP".  Once is
enough, so remove the conditional include and just keep the
unconditional one.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22 21:04:05 -07:00
Erik Jones 3852587ac6 staging: rts5139: rts51x_chip: fixed brace coding style issue
Fixed a coding style issue.

Signed-off-by: Erik Jones <erik@ejnode.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22 21:04:05 -07:00
H Hartley Sweeten 6e891af85b staging: comedi: ni_daq_700: refactor the pcmcia attach/detach
Move the pcmcia_disable_device() call where needed in the
pcmcia attach/detach and delete the dio700_release() function.

Move the logic of dio700_config() directly into the attach
function and properly return an error code when the config
fails.

Only set the pcmcia_cur_dev, used by the comedi_driver, if
the pcmcia attach is successful. Also, make sure to NULL it
in the detach.

Remove all the kernel messages in the pcmcia support code. They
are just added noise.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22 20:55:10 -07:00
H Hartley Sweeten cc04ac0fee staging: comedi: ni_daq_700: remove the pcmcia suspend/resume
The pcmcia suspend/resume callbacks don't do anything. Remove
them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22 20:55:10 -07:00
H Hartley Sweeten d2d2a6f275 staging: comedi: ni_daq_700: remove unneeded pcmcia private data
The pcmcia device-specific data is not longer needed by this
driver. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22 20:55:10 -07:00
H Hartley Sweeten 919f6077f2 staging: comedi: ni_daq_700: remove unused pcmcia 'stop' logic
The pcmcia support code in this driver appears to be cut-and-
paste from some other driver. It has code in it to stop the
device during suspend but nothing in the main comedi_driver
uses it.

Remove the 'stop' variable from the pcmcia private data and
all the logic that deals with it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22 20:55:10 -07:00
H Hartley Sweeten 9c1eb8e1a0 staging: comedi: ni_daq_700: cleanup pcmcia debug output messages
These messages should probably just be removed. For now just clean
then up.

Remove a couple redundant KERN_INFO messages in the pcmcia support
code and leave the dev_dbg() ones.

Change the dev_dgb() messages to use __func__ instead of the open
coded string.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22 20:55:09 -07:00
H Hartley Sweeten 740b48be40 staging: comedi: ni_daq_700: fix return for insn_config function
The comedi insn_config functions should return < 0 for errors or
the number of data elements used to perform the command, this value
is available as 'insn->n'. Return that instead of the open coded
number to better indicate what the return means.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22 20:55:09 -07:00
H Hartley Sweeten c11a1ea71b staging: comedi: ni_daq_700: use a local var to fix a > 80 char line issue
The 'data[1] = ...' line is currently kept < 80 chars by breaking a pointer
access after the '->'. This makes the code a bit confusing to follow. Use
a local variable to shorten the line and make it clearer.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22 20:55:09 -07:00
H Hartley Sweeten 4fb209a569 staging: comedi: ni_daq_700: remove some dangling ';'
Functions don't need the ';' at the end.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22 20:55:09 -07:00
H Hartley Sweeten 7448fcd3b8 staging: comedi: ni_daq_700: remove local variable in the 'attach' function
There is no need for the local variable 'iobase' in the attach
function. If it's '0' the attach fails otherwise the value is
just stored in dev->iobase.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22 20:55:08 -07:00
H Hartley Sweeten b88c59972d staging: comedi: ni_daq_700: change the 'attach' printk's to dev_printk's
Use the dev_printk() routines to output the kernel messages in the
attach routine.

The main 'attach' message had a level of KERN_ERR, I believe it should
have been KERN_INFO. Also, move that message to the end of the attach
so it only gets displayed if the attach is successful.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22 20:55:08 -07:00
H Hartley Sweeten 40cfdb9505 staging: comedi: ni_daq_700: remove the #ifdef'ed out irq code
The irq code is not compiled in due to the '#ifdef incomplete'.
And, as stated, it's not even complete. Just remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22 20:55:08 -07:00
H Hartley Sweeten be7085ae31 staging: comedi: ni_daq_700: remove the subdev_700_init function
Move the contents of subdev_700_init into the attach function.
For aesthetic reasone, add some whitespace to the initialization
of the subdevice.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22 20:55:08 -07:00
H Hartley Sweeten 797a9e782a staging: comedi: ni_daq_700: remove a couple unused defines
These defines are not referenced in the driver. Remove them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22 20:55:08 -07:00
H Hartley Sweeten 1de0222535 staging: comedi: ni_daq_700: remove the CALLBACK_* code
This driver was originally copied from the 8255 driver. The 8255
uses a callback function to handle the io operations to the device.
In this driver, the callback adds unneeded complexity.

The CALLBACK_ARG for this driver is always 'dev->iobase' and the
CALLBACK_FUNC is always 'subdev_700_cb'.

The callback function is also overly complex for this driver.
It takes a 'dir' parameter to determine if the io is a write or
read, a 'port' parameter that is not used, a 'data' parameter
that is only used for writes, and an 'arg' which is the iobase
of the device.

Unwind all of it and just put the outb()/inb() call in the code
where needed.

This allows getting rid of the private data completely. Refactor
the code based on it's removal.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22 20:55:07 -07:00
H Hartley Sweeten 54be935368 staging: comedi: ni_daq_700: remove unused private data variable
The 'have_irq' variable is not needed since this driver doesn't
use interrupts. Remove it.

The kfree(s->private) needs to remain to free the memory allocated
in subdev_700_init().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22 20:55:07 -07:00
H Hartley Sweeten 109d5d54e0 staging: comedi: ni_daq_700: remove thisboard macro
The 'thisboard' macro relies on a local variable having a specific
name and yields a pointer derived from that local variable.
Replace the macro with local variables and use the comedi_board()
helper to get the pointer.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22 20:55:07 -07:00
H Hartley Sweeten 79820c9cec staging: comedi: ni_daq_700: move the boardinfo variable
For aesthetic reasons, move the boardinfo declaration down so it's
next to the comedi_driver. That's the only place in the driver
where it's referenced directly.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22 20:55:07 -07:00
H Hartley Sweeten 726288e4aa staging: comedi: ni_daq_700: Remove bustype variable from the boardinfo
This driver is only used for pcmcia type devices. There is no need for
the 'bustype' check. Remove the variable from the boardinfo and refactor
the code based on it's removal.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22 20:55:06 -07:00
H Hartley Sweeten ba0333ead1 staging: comedi: ni_daq_700: Remove unneeded variables from the boardinfo
The 'device_id' and 'have_dio' variables in the boardinfo struct are
initialized but not referenced in the driver. Just remove them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22 20:55:06 -07:00
H Hartley Sweeten 5956703960 staging: comedi: ni_daq_700: Remove unused variables from the boardinfo
The 'read_byte' and 'write_byte' function pointers in the boardinfo
struct are not referenced in the driver. Just remove them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22 20:55:06 -07:00