Commit Graph

25 Commits

Author SHA1 Message Date
Linus Torvalds e6b5be2be4 Driver core patches for 3.19-rc1
Here's the set of driver core patches for 3.19-rc1.
 
 They are dominated by the removal of the .owner field in platform
 drivers.  They touch a lot of files, but they are "simple" changes, just
 removing a line in a structure.
 
 Other than that, a few minor driver core and debugfs changes.  There are
 some ath9k patches coming in through this tree that have been acked by
 the wireless maintainers as they relied on the debugfs changes.
 
 Everything has been in linux-next for a while.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iEYEABECAAYFAlSOD20ACgkQMUfUDdst+ylLPACg2QrW1oHhdTMT9WI8jihlHVRM
 53kAoLeteByQ3iVwWurwwseRPiWa8+MI
 =OVRS
 -----END PGP SIGNATURE-----

Merge tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core

Pull driver core update from Greg KH:
 "Here's the set of driver core patches for 3.19-rc1.

  They are dominated by the removal of the .owner field in platform
  drivers.  They touch a lot of files, but they are "simple" changes,
  just removing a line in a structure.

  Other than that, a few minor driver core and debugfs changes.  There
  are some ath9k patches coming in through this tree that have been
  acked by the wireless maintainers as they relied on the debugfs
  changes.

  Everything has been in linux-next for a while"

* tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits)
  Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries"
  fs: debugfs: add forward declaration for struct device type
  firmware class: Deletion of an unnecessary check before the function call "vunmap"
  firmware loader: fix hung task warning dump
  devcoredump: provide a one-way disable function
  device: Add dev_<level>_once variants
  ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries
  ath: use seq_file api for ath9k debugfs files
  debugfs: add helper function to create device related seq_file
  drivers/base: cacheinfo: remove noisy error boot message
  Revert "core: platform: add warning if driver has no owner"
  drivers: base: support cpu cache information interface to userspace via sysfs
  drivers: base: add cpu_device_create to support per-cpu devices
  topology: replace custom attribute macros with standard DEVICE_ATTR*
  cpumask: factor out show_cpumap into separate helper function
  driver core: Fix unbalanced device reference in drivers_probe
  driver core: fix race with userland in device_add()
  sysfs/kernfs: make read requests on pre-alloc files use the buffer.
  sysfs/kernfs: allow attributes to request write buffer be pre-allocated.
  fs: sysfs: return EGBIG on write if offset is larger than file size
  ...
2014-12-14 16:10:09 -08:00
Alexander Stein 0481845401 ALSA: atmel_abdac: Add missing clock prepare
Clocks must be prepared before enabling them. Do this in one step.
Replace clk_enable with clk_prepare_enable and clk_disable with
clk_disable_unprepare.

Signed-off-by: Alexander Stein <alexanders83@web.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-05 20:36:13 +01:00
Wolfram Sang 16573a98e1 ALSA: atmel: drop owner assignment from platform_drivers
A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-10-20 16:21:59 +02:00
Andy Shevchenko 3d588f83e4 dmaengine: dw: split dma-dw.h to platform and private parts
The introduced include/linux/dma/dw.h is going to contain the private
extensions and structures which are shared for dw_dmac users in the kernel.
Meanwhile include/linux/platform_data/dma-dw.h keeps only platform related data
types and definitions.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-10-15 20:31:04 +05:30
Andy Shevchenko 3d598f47e8 dmaengine: dw: move dw_dmac.h to where it belongs to
There is a common storage for platform data related structures and definitions
inside kernel source tree. The patch moves file from include/linux to
include/linux/platform_data and renames it acoordingly. The users are also
updated.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
[For the arch/avr32/.* and .*sound/atmel.*]
Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-09-11 11:48:12 +05:30
Takashi Iwai a4f2473d39 ALSA: atmel: Convert to snd_card_new() with a device pointer
Also remove superfluous snd_card_set_dev() calls.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-14 08:14:04 +01:00
Takashi Iwai d09476018b Merge branch 'for-linus' into for-next 2013-12-16 15:53:52 +01:00
Paul Walmsley 337bb336b9 ALSA: atmel_abdac: clk_round_rate() can return a zero upon error
Treat both negative and zero return values from clk_round_rate()
as errors.  This is needed since subsequent patches will convert
clk_round_rate()'s return value to be an unsigned type, rather
than a signed type, since some clock sources can generate rates higher
than (2^31)-1 Hz.

Eventually, when calling clk_round_rate(), only a return value of
zero will be considered a error; all other values will be
considered valid rates.  The comparison against values less than
0 is kept to preserve the correct behavior in the meantime.

Signed-off-by: Paul Walmsley <pwalmsley@nvidia.com>
Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-12-10 21:19:49 +01:00
Takashi Iwai e4de211cd3 ALSA: atmel: Fix possible array overflow
The static checker found a possible array overflow in atmel/abdac.c:
  static checker warning: "sound/atmel/abdac.c:373 set_sample_rates()
        error: buffer overflow 'dac->rates' 6 <= 6"

This patch papers over the buggy point, by ensuring that dac->rates[]
update not overflowing the actual array size.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-12-02 15:10:41 +01:00
Sachin Kamat 9ea6cfbc2a ALSA: atmel: Remove redundant platform_set_drvdata()
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-05-03 11:40:23 +02:00
Bill Pemberton 61dc674c3b ALSA: atmel: remove __dev* attributes
CONFIG_HOTPLUG is going away as an option.  As result the __dev*
markings will be going away.

Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst,
and __devexit.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-12-07 07:22:12 +01:00
Julia Lawall aaf265c22e ALSA: sound/atmel/abdac.c: fix error return code
Initialize retval before returning from a failed call to ioremap.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
(
if@p1 (\(ret < 0\|ret != 0\))
 { ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
    when != &ret
*if(...)
{
  ... when != ret = e2
      when forall
 return ret;
}

// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-20 10:53:13 +02:00
Takashi Iwai d34e4e00ad ALSA: platform: Check CONFIG_PM_SLEEP instead of CONFIG_PM
When CONFIG_PM is set but CONFIG_PM_SLEEP is unset,
SIMPLE_DEV_PM_OPS() ignores the given functions, and this leads to
compile warnings.

For avoiding this, simply check CONFIG_PM_SLEEP instead of CONFIG_PM.

Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-09 15:47:15 +02:00
Takashi Iwai 284e7ca75f ALSA: convert PM ops of platform_driver to new pm ops
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-07-03 07:58:19 +02:00
Takashi Iwai 8bf01d8abc ALSA: Add missing .owner=THIS_MODULE to platform_driver definitions
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-07-02 17:50:05 +02:00
Viresh Kumar e2b35f3dbf dmaengine/dw_dmac: Fix dw_dmac user drivers to adapt to slave_config changes
There are few existing user drivers of dw_dmac. They will break as soon as we
remove unused fields from struct dw_dma_slave. This patch focuses to fix these
user drivers to use dma_slave_config() routine.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
2012-02-22 18:15:39 +05:30
Vinod Koul 35e16581ed sound-soc: move to dma_transfer_direction
fixup usage of dma direction by introducing dma_transfer_direction,
this patch moves asoc drivers to use new enum

Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Cc: Liam Girdwood <lrg@ti.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-31 09:40:27 +05:30
Jiri Kosina b7e9c223be Merge branch 'master' into for-next
Sync with Linus' tree to be able to apply pending patches that
are based on newer code already present upstream.
2011-07-11 14:15:55 +02:00
Hans-Christian Egtvedt 0cfae7c937 ALSA: atmel - update author email for ABDAC, AC97C and AT73C213
This patch updates the email address of the sound drivers supported by me to an
email account I will use on a more regular basis in the future.

Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-28 16:56:07 +02:00
Joe Perches 28f65c11f2 treewide: Convert uses of struct resource to resource_size(ptr)
Several fixes as well where the +1 was missing.

Done via coccinelle scripts like:

@@
struct resource *ptr;
@@

- ptr->end - ptr->start + 1
+ resource_size(ptr)

and some grep and typing.

Mostly uncompiled, no cross-compilers.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-06-10 14:55:36 +02:00
Takashi Iwai 1beded5d9c ALSA: atmel - Fix the return value in error path
In the commit c0763e687d
    ALSA: snd-atmel-abdac: test wrong variable
the return value via PTR_ERR() had to be fixed as well.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22 10:57:17 +01:00
Vasiliy Kulikov c0763e687d ALSA: snd-atmel-abdac: test wrong variable
After clk_get() pclk is checked second time instead of sample_clk check.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-22 10:56:53 +01:00
Hans-Christian Egtvedt fa075ed2dc ALSA: snd-atmel-abdac: increase periods_min to 6 instead of 4
This patch increases periods_min to 6 from 4, this will remove any
hickups where the buffer is not filled fast enough from user space.

Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-06 03:56:28 +02:00
Hans-Christian Egtvedt 60a56cce7a ALSA: snd-atmel-abdac: replace bus_id with dev_name()
This patch replaces the references to bus_id to the new dev_name() API.

Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-06 03:56:11 +02:00
Hans-Christian Egtvedt e4967d6016 ALSA: Add ALSA driver for Atmel Audio Bitstream DAC
This patch adds ALSA support for the Audio Bistream DAC found on Atmel
AVR32 devices. The ABDAC is an Atmel IP which might show up on AT91
devices in the future, hence making a generic driver which can be
utilized by AT91 arch if needed.

Datasheet describing the ABDAC peripheral is available in the AT32AP7000
datasheet, http://www.atmel.com/dyn/products/datasheets.asp?family_id=682

Tested on ATSTK1006 + ATSTK1000 with a class D amplifier stage.

Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-05 15:08:48 +01:00