Commit Graph

336351 Commits

Author SHA1 Message Date
H Hartley Sweeten 12d606f754 staging: comedi: addi_apci_1032: cleanup v_ADDI_Interrupt()
There is no need for this function to call v_APCI1032_Interrupt()
in hwdrv_apci1032.c to reset the board. Just move the code from
v_APCI1032_Interrupt() directly into this function.

Rename the CamelCase function to apci1032_interrupt().

Rename the CamelCase local variable used to read/write the control
register.

Change the return from IRQ_RETVAL(1) to IRQ_HANDLED.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-06 09:30:57 +01:00
H Hartley Sweeten b37f84d56a staging: comedi: addi_apci_1032: only allocate one subdevice
There is only one subdevice used in the driver. Remove the unused
subdevice init and only allcoate space for the one used.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-06 09:30:57 +01:00
H Hartley Sweeten a3de4cd33c staging: comedi: addi_apci_1032: cleanup i_APCI1032_ReadMoreDigitalInput()
Move this function from hwdrv_apci1032.c.

Remove the unnecessary comment and rename the CamelCase function to
apci1032_di_insn_bits().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-06 09:30:57 +01:00
H Hartley Sweeten b4c137506e staging: comedi: addi_apci_1032: remove i_APCI1032_Read1DigitalInput()
This function is the insn_read operation for the digital input subdevice.
This operation can be emulated by the comedi core now that the insn_bits
operation follows the comedi API. Remove this now unnecessary function.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-06 09:30:57 +01:00
H Hartley Sweeten d6d7084855 staging: comedi: addi_apci_1032: fix i_APCI1032_ReadMoreDigitalInput()
This function is the insn_bits operation for the digital input subdevice.
According to the comedi API it's supposed return the status of the inputs
in data[1]. The addi-drivers abuse the API and try to make it conform to
their own use.

Fix this function so it follows the comedi API.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-06 09:30:57 +01:00
H Hartley Sweeten 274113fd78 staging: comedi: addi_apci_1032: cleanup i_APCI1032_Reset()
Move this function from hwdrv_apci1032.c.

Remove the unnecessary comment and rename the CamelCase function to
apci1032_reset().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-06 09:30:56 +01:00
H Hartley Sweeten c0133ee10a staging: comedi: addi_apci_1032: cleanup the register map defines
For aesthetic reasons, rename the defines used for the register map
so they are a bit shorter.

Define, and use, the bits in the interrupt control register.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-06 09:30:56 +01:00
H Hartley Sweeten ac467b5e21 staging: comedi: addi_apci_1032: remove the boardinfo
This driver supports only one boardtype. Since this driver uses the
comedi auto attach mechanism, the information left in the boaridnfo
is not required to attach this driver to the comedi subsystem.

Remove the boardinfo data and its use in the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-06 09:30:56 +01:00
H Hartley Sweeten feae759ffe staging: comedi: addi_apci_1032: call v_APCI1032_Interrupt() directly
Remove the boardinfo about the 'interrupt' function and just call
it directly.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-06 09:30:56 +01:00
H Hartley Sweeten b1b640a8d8 staging: comedi: addi_apci_1032: remove unnecessary eeprom code
Now that this driver is separate from the "common" addi-data code,
the eeprom does not contain any information required to make this
driver work.

Remove the unneeded initalization of the 's_EeParameters' and the
code that reads the eeprom to fill in the parameters.

Also, since reading the eeprom is not really interesting, remove
the EEPROM subdevice.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-06 09:30:56 +01:00
H Hartley Sweeten cea5d88c34 staging: comedi: addi_apci_1032: remove i_IobaseReserved
PCI bar 3 is not used by this driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-06 09:30:56 +01:00
H Hartley Sweeten 427ee2be54 staging: comedi: addi_apci_1032: remove use of devpriv->iobase
Currently, devpriv->iobase is used to hold the PCI bar 2 base address
used to read/write the registers on the board. The same information
is stored in the comedi_device dev->iobase. Use that instead.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-06 09:30:56 +01:00
H Hartley Sweeten e0085d1fc9 staging: comedi: addi_apci_1032: remove i_IorangeBase[01]
This boardinfo is no longer required by the driver. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-06 09:30:55 +01:00
H Hartley Sweeten 09284a77b2 staging: comedi: addi_apci_1032: remove dw_AiBase
This board does not use the ioremap'ed PCI bar 3 memory address.
Remove the ioremap and iounmap of that region.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-06 09:30:55 +01:00
H Hartley Sweeten 05f22ad7d2 staging: comedi: addi_apci_1032: simplify the PCI bar reading
This board has a 93c76 eeprom. Knowing this information allows
simplifying the code that reads the PCI bars to get the iobase
addresses used in the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-06 09:30:55 +01:00
H Hartley Sweeten 4c2c1488d3 staging: comedi: addi_apci_1032: board has 32 digital inputs
This board always has 32 digital inputs. Remove the test when
initializing the subdevice.

Also, since this board is the only one supported by this driver,
remove the boardinfo about the digital inputs and just use the
data directly in the subdevice init.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-06 09:30:55 +01:00
H Hartley Sweeten 9559ff7e7e staging: comedi: addi_apci_1032: board does not have analog outputs
This board does not have analog outputs. Remove the subdevice init for
them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-06 09:30:55 +01:00
H Hartley Sweeten f2a3ac3b03 staging: comedi: addi_apci_1032: board does not have analog inputs
This board does not have analog inputs. Remove the subdevice init for
them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-06 09:30:55 +01:00
H Hartley Sweeten 5dbdbf67c3 staging: comedi: addi_apci_1032: board does not have digital outputs
This board does not have digital outputs. Remove the subdevice init for
them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-06 09:30:54 +01:00
H Hartley Sweeten df9133bf19 staging: comedi: addi_apci_1032: board does not have a timer
This board does not have a timer. Remove the subdevice init for it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-06 09:30:54 +01:00
H Hartley Sweeten 166d15fd1e staging: comedi: addi_apci_1032: board does not have ttl i/o
This board does not have ttl i/o. Remove the subdevice init for
it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-06 09:30:54 +01:00
H Hartley Sweeten a486baa6cf staging: comedi: addi_apci_1032: remove i_ADDI_Reset()
This driver is now separate from the "common" code used with the
addi-data drivers. There is no need to use i_ADDI_Reset() to call
the correct "reset" function.

Remove the i_ADDI_Reset() function and the 'reset' pointer to the
real function from the boardinfo and just call the function directly
where needed.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-06 09:30:54 +01:00
H Hartley Sweeten 2bb8b1dfe6 staging: comedi: addi_apci_1032: separate from addi_common.c
The addi_apci_1032 driver is a simple digital input board with 32
optically isolated inputs. Using the addi-data "common" code introduces
a lot of bloat.

Copy the code in addi_common.c to this driver and remove the #include
that caused addi_common.c to be compiled with this driver. This will
allow removing the special handling for allocating and freeing the
dma buffers in the common code.

Rename the attach_pci and detach functions so they have namespace
associated with this driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-06 09:30:54 +01:00
Ian Abbott 11aade2650 staging: comedi: cb_pcidas64: update driver comment
Update the comedi driver comment to reflect the fact that manual
attachment of devices is no longer supported.  Also replace the request
to file a bug report about unidentified PCI device IDs with a request to
let the maintainers know about such devices.

Reformat the comment using the usual block comment style.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-06 09:28:59 +01:00
Ian Abbott dd379fa23f staging: comedi: cb_pcidas64: fix forward declararions 4
Move `disable_plx_interrupts()`, `disable_ai_interrupts()`,
`enable_ai_interrupts()`, `set_ai_fifo_segment_length()`,
`set_ai_fifo_size()`, `ai_fifo_size()`, `load_ao_dma_buffer()`, and
`load_ao_dma()`, and remove forward declarations of these functions.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-06 09:28:59 +01:00
Ian Abbott 012e642c01 staging: comedi: cb_pcidas64: fix forward declarations 3
Move `abort_dma()`, `disable_ai_pacing()`, `i2c_high_udelay`,
`i2c_low_udelay`, `i2c_set_sda()`, `i2c_set_scl()`, `i2c_write_byte()`,
`i2c_read_ack()`, `i2c_start()`, `i2c_stop()`, `i2c_write()`,
`get_divisor()`, `check_adc_timing()`, `disable_ai_pacing()`,
`abort_dma()`, `get_ao_divisor()`, `ao_inttrig()`,
`caldac_8800_write()`, `caldac_i2c_write()`, `check_adc_timing()`,
`get_divisor()`, and `get_ao_divisor()`, and remove their forward
declarations.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-06 09:28:59 +01:00
Ian Abbott a299d8817d staging: comedi: cb_pcidas64: fix forward declarations 2
Move `cb_pcidas64_find_pci_board()`, `auto_attach()` and `detach()` and
remove the forward declaration of `setup_subdevices()`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-06 09:28:58 +01:00
Ian Abbott 9c7a00f572 staging: comedi: cb_pcidas64: fix forward declarations 1
Move `setup_subdevices()` and remove a load of forward declarations.
Added a forward declaration of `setup_subdevices()` temporarily.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-06 09:28:58 +01:00
Ian Abbott b07244ceea staging: comedi: cb_pcidas64: remove board(dev) inline
The `board(dev)` inline function returns `dev->board_ptr` cast from
`const void *` to `struct pcidas64_board *`.  It really ought to return
a `const struct pcidas64_board *`.  Rather than fix the function, just
remove it and replace the calls with a local variable `thisboard` in the
functions that call it.  `thisboard` is set to the result of the common
inline function `comedi_board(dev)` defined in "comedidev.h".

Fix a little resulting fall-out from the inline function
`ai_dma_ring_count(board)` whose parameter should have been a const
pointer.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-06 09:28:58 +01:00
Ian Abbott 4dba6c02cd staging: comedi: comedidev.h: make comedi_board() parameter const
The inline function `comedi_board(dev)` merely returns `dev->board_ptr`.
It does not modify any members of `*dev` so make its parameter a const
pointer.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-06 09:28:58 +01:00
Ian Abbott 46ca84c465 staging: comedi: cb_pcidas64: whitespace/brace changes
Some whitespace changes, mostly to fix lines > 80 characters and
operator placement.  Add/remove some braces according to CodingStyle.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-06 09:28:58 +01:00
Ian Abbott 65998b1ba4 staging: comedi: cb_pcidas64: fix printks
Replace `printk` calls with something else.  For the `DEBUG_PRINT()`
macro, use `pr_debug()` (if `PCIDAS64_DEBUG macro defined) or
`no_printk()`.

Fix a few `DEBUG_PRINT()` calls due to compiler warnings and add
newlines where they are missing.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-06 09:28:58 +01:00
Ian Abbott b91524ee48 staging: comedi: cb_pcidas64: use auto_attach method
This driver does not need to support manual attachment of supported PCI
devices.  Replace the `attach()` hook with an `auto_attach()` hook.
This will be called via `comedi_pci_auto_config()` at PCI probe time.

The `auto_attach()` calls new function `cb_pcidas64_find_pci_board()` to
find the correct entry in `pcidas64_boards[]` for the PCI device.

This driver no longer increments the PCI reference count during
attachment, so remove the call to `pci_dev_put()` when detaching the
device.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-06 09:28:57 +01:00
Rusty Russell f6a79af8f3 modules: don't break modules_install on external modules with no key.
The script still spits out an error ("Can't read private key") but we
don't break modules_install.

Reported-by: Bruno Wolff III <bruno@wolff.to>
Original-patch-by: Josh Boyer <jwboyer@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-11-06 11:52:24 +10:30
Taku Izumi ff8e59bc4e PCI/portdrv: Don't create hotplug slots unless port supports hotplug
Commit 2dcfaf85 mistakenly dropped the "flags & PCI_EXP_FLAGS_SLOT" test,
so now we create hotplug slots even for PCIe port devices that don't
support hotplug.  This patch fixes this problem.

[bhelgaas: changelog]
Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Yinghai Lu <yinghai@kernel.org>
Reviewed-by: Jiang Liu <jiang.liu@huawei.com>
2012-11-05 16:59:59 -07:00
Bjorn Helgaas 3cba8eedb7 Merge branch 'pci/huang-d3cold-fixes' into for-linus
* pci/huang-d3cold-fixes:
  PCI/PM: Fix proc config reg access for D3cold and bridge suspending
  PCI/PM: Resume device before shutdown
  PCI/PM: Fix deadlock when unbinding device if parent in D3cold
2012-11-05 16:59:53 -07:00
Jean Delvare 4101ece3a2 hwmon: Fix chip feature table headers
These got broken by recent patches fixing checkpatch warnings in these
drivers. The trick is that the patches themselves looked good, but the
source files after applying them do not. That's why I am not a big fan
of using tabs inside comments.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <linux@roeck-us.net>
2012-11-05 21:54:40 +01:00
Jean Delvare 3300fb4f88 hwmon: (w83627ehf) Force initial bank selection
Don't assume bank 0 is selected at device probe time. This may not be
the case. Force bank selection at first register access to guarantee
that we read the right registers upon driver loading.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Cc: stable@vger.kernel.org
2012-11-05 21:54:39 +01:00
Lars-Peter Clausen 4eb3ccf157 staging:iio: Move the ad7887 driver out of staging
The driver does not expose any custom API to userspace and none of the standard
static code checker tools report any issues, so move it out of staging.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-11-05 20:39:54 +00:00
Lars-Peter Clausen 98efb70add staging:iio:ad7887: Use passed in chan spec in ad7887_read_raw
Use the passed in chan spec in ad7887_read_raw instead of alawys using the first
chan spec entry from the chip info data. Since all channels have the same shift
and realbits from a functional point of view it does not matter which chan spec
is used, but the patch makes the a bit more clear.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-11-05 20:39:53 +00:00
Lars-Peter Clausen fce7c3eac7 staging:iio:ad7887: Allow to use internal ref in two channel mode
While it is not recommended to use the internal reference in two channel mode in
order to obtain optimal performance it is still possible to use it.

While we are at it also get rid of the duplicate tx_cmd_buf entries. There are
only two unique entries. One for channel 1 and one for channel 2.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-11-05 20:39:53 +00:00
Lars-Peter Clausen 5daa751f89 staging:iio:ad7887: Use proper kernel doc
Use proper kernel doc to document the platform data struct.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-11-05 20:39:52 +00:00
Lars-Peter Clausen 65dd3d3d7a staging:iio:ad7887: Squash everything into one file
The recent cleanups have decimated the drivers code size by quite a bit. It is
only a few hundred lines in total now and we also always build buffer support,
so there really is no need to spread the driver out over multiple files. Putting
everything into one file also allows to reduce the code size a bit more by
removing a few lines of boilerplate code.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-11-05 20:39:52 +00:00
Lars-Peter Clausen bf5d2613c9 staging:iio:ad7887: Rework regulator handling
Rework the regulator handling of the ad7887 driver to match more closely what we
do for other drivers. Only request the regulator if a external reference is
used, but treat it as an error if requesting the regulator fails. Also remove
the possibility to specify the reference voltage via platform data and always
use the regulator for this.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-11-05 20:39:52 +00:00
Lars-Peter Clausen bd6880477a staging:iio:ad7887: Preallocate sample buffer
We know that the sample buffer will at most need to hold two 16 bit samples and
the 64 bit aligned 64 bit timestamp. Preallocate a buffer large enough to hold
this instead of allocating and freeing it each time a sample is read.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-11-05 20:39:51 +00:00
Huang Ying b3c32c4f95 PCI/PM: Fix proc config reg access for D3cold and bridge suspending
In https://bugzilla.kernel.org/show_bug.cgi?id=48981
Peter reported that /proc/bus/pci/??/??.? does not work for 3.6.
This is because the device configuration space registers are
not accessible if the corresponding parent bridge is suspended or
the device is put into D3cold state.

This is the same as /sys/bus/pci/devices/0000:??:??.?/config access
issue.  So the function used to solve sysfs issue is used to solve
this issue.

This patch moves pci_config_pm_runtime_get()/_put() from pci/pci-sysfs.c
to pci/pci.c and makes them extern so they can be used by both the
sysfs and proc paths.

[bhelgaas: changelog, references, reporters]
Reference: https://bugzilla.kernel.org/show_bug.cgi?id=48981
Reference: https://bugzilla.kernel.org/show_bug.cgi?id=49031
Reported-by: Forrest Loomis <cybercyst@gmail.com>
Reported-by: Peter <lekensteyn@gmail.com>
Reported-by: Micael Dias <kam1kaz3@gmail.com>
Signed-off-by: Huang Ying <ying.huang@intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
CC: stable@vger.kernel.org		# v3.6+
2012-11-05 10:46:23 -07:00
Catalin Marinas 3fd9396af8 Linux 3.7-rc4
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQEcBAABAgAGBQJQlr0MAAoJEHm+PkMAQRiGLVQH/171fUorGn+u2k7dNhSWJXHB
 pPy6MbZhuBWepgRZGS0ffiC5tBvQaf9iK9Fh/9aqrDDw2aELk0CLPqQcfAUF/Jzf
 USPdBSIMNikgZtlWhabxuj/zKdaw8UuiJpCf3rMyIRmjQgmZyw/53TEqF54xTv0I
 Y4Y21vTSVXilQwvwYvcsCEBFrTZqXjLWQ60Hk+QRS9GV7a9m2LFcdiPOtRv17gbd
 CBDuiMHN9R04l2bB+5WHHsu+TNNf5uy3wAgEskDTftneXWjW44R4UR8O0rQh1ezQ
 Pa5WpCyJRRG8UOtPKTS6LEbljBwLLIoVI2JRoJrWoy3OkT63wyowFXyLGWCCrHY=
 =qAGi
 -----END PGP SIGNATURE-----

Merge tag 'v3.7-rc4' into upstream-master

Linux 3.7-rc4
2012-11-05 14:58:32 +00:00
Sachin Prabhu 3798f47aa2 cifs: Do not lookup hashed negative dentry in cifs_atomic_open
We do not need to lookup a hashed negative directory since we have
already revalidated it before and have found it to be fine.

This also prevents a crash in cifs_lookup() when it attempts to rehash
the already hashed negative lookup dentry.

The patch has been tested using the reproducer at
https://bugzilla.redhat.com/show_bug.cgi?id=867344#c28

Cc: <stable@kernel.org> # 3.6.x
Reported-by: Vit Zahradka <vit.zahradka@tiscali.cz>
Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
2012-11-05 06:45:54 -05:00
Takashi Iwai ae24c3191b ALSA: hda - Force to reset IEC958 status bits for AD codecs
Several bug reports suggest that the forcibly resetting IEC958 status
bits is required for AD codecs to get the SPDIF output working
properly after changing streams.

Original fix credit to Javeed Shaikh.

BugLink: https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/359361

Reported-by: Robin Kreis <r.kreis@uni-bremen.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-05 12:36:32 +01:00
Vipul Kumar Samar 0504271c8d pinctrl: SPEAr1340: Add clcd sleep mode pin configuration
CLCD pads must be configured differently for sleep mode. This patch adds support
for clcd_sleep_pingroup.

Signed-off-by: Vipul Kumar Samar <vipulkumar.samar@st.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2012-11-05 12:34:32 +01:00