1
0
Fork 0
Commit Graph

40 Commits (redonkable)

Author SHA1 Message Date
Thomas Gleixner 74ba9207e1 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 61
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license as published by
  the free software foundation either version 2 of the license or at
  your option any later version this program is distributed in the
  hope that it will be useful but without any warranty without even
  the implied warranty of merchantability or fitness for a particular
  purpose see the gnu general public license for more details you
  should have received a copy of the gnu general public license along
  with this program if not write to the free software foundation inc
  675 mass ave cambridge ma 02139 usa

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 441 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
Reviewed-by: Richard Fontana <rfontana@redhat.com>
Reviewed-by: Allison Randal <allison@lohutok.net>
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190520071858.739733335@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-24 17:36:45 +02:00
Souptick Joarder 295810516e ALSA: usx2y: Change return type to vm_fault_t
Use new return type vm_fault_t for fault handler. For
now, this is just documenting that the function returns
a VM_FAULT value rather than an errno. Once all instances
are converted, vm_fault_t will become a distinct type.

Commit 1c8f422059 ("mm: change return type to vm_fault_t")

Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
Reviewed-by: Matthew Wilcox <mawilcox@microsoft.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-04-25 08:15:20 +02:00
Linus Torvalds a9a08845e9 vfs: do bulk POLL* -> EPOLL* replacement
This is the mindless scripted replacement of kernel use of POLL*
variables as described by Al, done by this script:

    for V in IN OUT PRI ERR RDNORM RDBAND WRNORM WRBAND HUP RDHUP NVAL MSG; do
        L=`git grep -l -w POLL$V | grep -v '^t' | grep -v /um/ | grep -v '^sa' | grep -v '/poll.h$'|grep -v '^D'`
        for f in $L; do sed -i "-es/^\([^\"]*\)\(\<POLL$V\>\)/\\1E\\2/" $f; done
    done

with de-mangling cleanups yet to come.

NOTE! On almost all architectures, the EPOLL* constants have the same
values as the POLL* constants do.  But they keyword here is "almost".
For various bad reasons they aren't the same, and epoll() doesn't
actually work quite correctly in some cases due to this on Sparc et al.

The next patch from Al will sort out the final differences, and we
should be all done.

Scripted-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-02-11 14:34:03 -08:00
Linus Torvalds 19e7b5f994 Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull misc vfs updates from Al Viro:
 "All kinds of misc stuff, without any unifying topic, from various
  people.

  Neil's d_anon patch, several bugfixes, introduction of kvmalloc
  analogue of kmemdup_user(), extending bitfield.h to deal with
  fixed-endians, assorted cleanups all over the place..."

* 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (28 commits)
  alpha: osf_sys.c: use timespec64 where appropriate
  alpha: osf_sys.c: fix put_tv32 regression
  jffs2: Fix use-after-free bug in jffs2_iget()'s error handling path
  dcache: delete unused d_hash_mask
  dcache: subtract d_hash_shift from 32 in advance
  fs/buffer.c: fold init_buffer() into init_page_buffers()
  fs: fold __inode_permission() into inode_permission()
  fs: add RWF_APPEND
  sctp: use vmemdup_user() rather than badly open-coding memdup_user()
  snd_ctl_elem_init_enum_names(): switch to vmemdup_user()
  replace_user_tlv(): switch to vmemdup_user()
  new primitive: vmemdup_user()
  memdup_user(): switch to GFP_USER
  eventfd: fold eventfd_ctx_get() into eventfd_ctx_fileget()
  eventfd: fold eventfd_ctx_read() into eventfd_read()
  eventfd: convert to use anon_inode_getfd()
  nfs4file: get rid of pointless include of btrfs.h
  uvc_v4l2: clean copyin/copyout up
  vme_user: don't use __copy_..._user()
  usx2y: don't bother with memdup_user() for 16-byte structure
  ...
2018-01-31 09:25:20 -08:00
Al Viro 3d46d7108d usx2y: don't bother with memdup_user() for 16-byte structure
... when it can bloody well go into a local variable.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2017-12-28 17:22:51 -05:00
Al Viro 680ef72abd sound: annotate ->poll() instances
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2017-11-27 16:20:02 -05:00
Markus Elfring 80753cdfef ALSA: us122l: Use common error handling code in us122l_create_card()
Add a jump target so that a bit of exception handling can be better reused
at the end of this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-09-07 10:27:42 +02:00
Arvind Yadav 7ab64aeb67 ALSA: us122l: constify usb_device_id.
usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-08-06 22:20:12 +02:00
Johan Hovold 5c7e7d586a ALSA: us122l: clean up US144 handling
Use the device-id table and a private flag to determine the device type
(US122 or US144) rather than spreading product-id conditionals
throughout the driver.

This USB driver currently depends on X86 (why?), but we should still add
the missing endianness conversions when accessing the USB
device-descriptor fields.

Compile-tested only.

Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-05-15 11:02:08 +02:00
Mauro Carvalho Chehab a5f8661df0 ALSA: usb-audio: replace /proc/bus/usb by /dev/bus/usb
The /proc/bus/usb devices don't exist anymore, since when we
got rid of usbfs. Those devices are now seen at
/dev/bus/usb.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-04-17 10:23:55 +02:00
Dave Jiang 11bac80004 mm, fs: reduce fault, page_mkwrite, and pfn_mkwrite to take only vmf
->fault(), ->page_mkwrite(), and ->pfn_mkwrite() calls do not need to
take a vma and vmf parameter when the vma already resides in vmf.

Remove the vma parameter to simplify things.

[arnd@arndb.de: fix ARM build]
  Link: http://lkml.kernel.org/r/20170125223558.1451224-1-arnd@arndb.de
Link: http://lkml.kernel.org/r/148521301778.19116.10840599906674778980.stgit@djiang5-desk3.ch.intel.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Cc: Theodore Ts'o <tytso@mit.edu>
Cc: Darrick J. Wong <darrick.wong@oracle.com>
Cc: Matthew Wilcox <mawilcox@microsoft.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Jan Kara <jack@suse.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-02-24 17:46:54 -08:00
Takashi Iwai 874b8d422e ALSA: usb: 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-12 11:18:00 +01:00
Takashi Iwai ac536a848a ALSA: us122l: Fix pcm_usb_stream mmapping regression
The pcm_usb_stream plugin requires the mremap explicitly for the read
buffer, as it expands itself once after reading the required size.
But the commit [314e51b9: mm: kill vma flag VM_RESERVED and
mm->reserved_vm counter] converted blindly to a combination of
VM_DONTEXPAND | VM_DONTDUMP like other normal drivers, and this
resulted in the failure of mremap().

For fixing this regression, we need to remove VM_DONTEXPAND for the
read-buffer mmap.

Reported-and-tested-by: James Miller <jamesstewartmiller@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-15 11:35:54 +02:00
Konstantin Khlebnikov 314e51b985 mm: kill vma flag VM_RESERVED and mm->reserved_vm counter
A long time ago, in v2.4, VM_RESERVED kept swapout process off VMA,
currently it lost original meaning but still has some effects:

 | effect                 | alternative flags
-+------------------------+---------------------------------------------
1| account as reserved_vm | VM_IO
2| skip in core dump      | VM_IO, VM_DONTDUMP
3| do not merge or expand | VM_IO, VM_DONTEXPAND, VM_HUGETLB, VM_PFNMAP
4| do not mlock           | VM_IO, VM_DONTEXPAND, VM_HUGETLB, VM_PFNMAP

This patch removes reserved_vm counter from mm_struct.  Seems like nobody
cares about it, it does not exported into userspace directly, it only
reduces total_vm showed in proc.

Thus VM_RESERVED can be replaced with VM_IO or pair VM_DONTEXPAND | VM_DONTDUMP.

remap_pfn_range() and io_remap_pfn_range() set VM_IO|VM_DONTEXPAND|VM_DONTDUMP.
remap_vmalloc_range() set VM_DONTEXPAND | VM_DONTDUMP.

[akpm@linux-foundation.org: drivers/vfio/pci/vfio_pci.c fixup]
Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Carsten Otte <cotte@de.ibm.com>
Cc: Chris Metcalf <cmetcalf@tilera.com>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Eric Paris <eparis@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Morris <james.l.morris@oracle.com>
Cc: Jason Baron <jbaron@redhat.com>
Cc: Kentaro Takeda <takedakn@nttdata.co.jp>
Cc: Matt Helsley <matthltc@us.ibm.com>
Cc: Nick Piggin <npiggin@kernel.dk>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Robert Richter <robert.richter@amd.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: Venkatesh Pallipadi <venki@google.com>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-10-09 16:22:19 +09:00
Linus Torvalds a429638cac Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (526 commits)
  ASoC: twl6040 - Add method to query optimum PDM_DL1 gain
  ALSA: hda - Fix the lost power-setup of seconary pins after PM resume
  ALSA: usb-audio: add Yamaha MOX6/MOX8 support
  ALSA: virtuoso: add S/PDIF input support for all Xonars
  ALSA: ice1724 - Support for ooAoo SQ210a
  ALSA: ice1724 - Allow card info based on model only
  ALSA: ice1724 - Create capture pcm only for ADC-enabled configurations
  ALSA: hdspm - Provide unique driver id based on card serial
  ASoC: Dynamically allocate the rtd device for a non-empty release()
  ASoC: Fix recursive dependency due to select ATMEL_SSC in SND_ATMEL_SOC_SSC
  ALSA: hda - Fix the detection of "Loopback Mixing" control for VIA codecs
  ALSA: hda - Return the error from get_wcaps_type() for invalid NIDs
  ALSA: hda - Use auto-parser for HP laptops with cx20459 codec
  ALSA: asihpi - Fix potential Oops in snd_asihpi_cmode_info()
  ALSA: hdsp - Fix potential Oops in snd_hdsp_info_pref_sync_ref()
  ALSA: hda/cirrus - support for iMac12,2 model
  ASoC: cx20442: add bias control over a platform provided regulator
  ALSA: usb-audio - Avoid flood of frame-active debug messages
  ALSA: snd-usb-us122l: Delete calls to preempt_disable
  mfd: Put WM8994 into cache only mode when suspending
  ...

Fix up trivial conflicts in:
 - arch/arm/mach-s3c64xx/mach-crag6410.c:
	renamed speyside_wm8962 to tobermory, added littlemill right
	next to it
 - drivers/base/regmap/{regcache.c,regmap.c}:
	duplicate diff that had already come in with other changes in
	the regmap tree
2012-01-12 08:00:30 -08:00
Rusty Russell a67ff6a540 ALSA: module_param: make bool parameters really bool
module_param(bool) used to counter-intuitively take an int.  In
fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy
trick.

It's time to remove the int/unsigned int option.  For this version
it'll simply give a warning, but it'll break next kernel version.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-19 10:34:41 +01:00
Greg Kroah-Hartman 424f0750ed USB: convert sound/* to use module_usb_driver()
This converts the drivers in sound/* to use the
module_usb_driver() macro which makes the code smaller and a bit
simpler.

Added bonus is that it removes some unneeded kernel log messages about
drivers loading and/or unloading.

Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Daniel Mack <zonque@gmail.com>
Cc: Clemens Ladisch <clemens@ladisch.de>
Cc: Torsten Schenk <torsten.schenk@zoho.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Karsten Wiese <fzu@wemgehoertderstaat.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-18 09:50:44 -08:00
Paul Gortmaker da155d5b40 sound: Add module.h to the previously silent sound users
Lots of sound drivers were getting module.h via the implicit presence
of it in <linux/device.h> but we are going to clean that up.  So
fix up those users now.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-10-31 19:31:21 -04:00
Karsten Wiese cdce2db74e ALSA: snd-usb-us122l: Fix missing NULL checks
Fix missing NULL checks in usb_stream_hwdep_poll() and usb_stream_hwdep_ioctl().
Wake up poll waiters before returning from usb_stream_hwdep_ioctl().

Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de>
Cc: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-11 19:50:28 +01:00
Jaroslav Kysela f09d045e2a Merge branch 'topic/usb' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 into devel 2010-04-16 10:37:41 +02:00
Tejun Heo 5a0e3ad6af include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files.  percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -> slab.h dependency is about to be removed.  Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability.  As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

  http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
  only the necessary includes are there.  ie. if only gfp is used,
  gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
  blocks and try to put the new include such that its order conforms
  to its surrounding.  It's put in the include block which contains
  core kernel includes, in the same order that the rest are ordered -
  alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
  doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
  because the file doesn't have fitting include block), it prints out
  an error message indicating which .h file needs to be added to the
  file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
   over 4000 files, deleting around 700 includes and adding ~480 gfp.h
   and ~3000 slab.h inclusions.  The script emitted errors for ~400
   files.

2. Each error was manually checked.  Some didn't need the inclusion,
   some needed manual addition while adding it to implementation .h or
   embedding .c file was more appropriate for others.  This step added
   inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
   from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
   e.g. lib/decompress_*.c used malloc/free() wrappers around slab
   APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
   editing them as sprinkling gfp.h and slab.h inclusions around .h
   files could easily lead to inclusion dependency hell.  Most gfp.h
   inclusion directives were ignored as stuff from gfp.h was usually
   wildly available and often used in preprocessor macros.  Each
   slab.h inclusion directive was examined and added manually as
   necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
   were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
   distributed build env didn't work with gcov compiles) and a few
   more options had to be turned off depending on archs to make things
   build (like ipr on powerpc/64 which failed due to missing writeq).

   * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
   * powerpc and powerpc64 SMP allmodconfig
   * sparc and sparc64 SMP allmodconfig
   * ia64 SMP allmodconfig
   * s390 SMP allmodconfig
   * alpha SMP allmodconfig
   * um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
   a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-30 22:02:32 +09:00
Daniel Mack e5779998bf ALSA: usb-audio: refactor code
Clean up the usb audio driver by factoring out a lot of functions to
separate files. Code for procfs, quirks, urbs, format parsers etc all
got a new home now.

Moved almost all special quirk handling to quirks.c and introduced new
generic functions to handle them, so the exceptions do not pollute the
whole driver.

Renamed usbaudio.c to card.c because this is what it actually does now.
Renamed usbmidi.c to midi.c for namespace clarity.
Removed more things from usbaudio.h.

The non-standard drivers were adopted accordingly.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-05 08:17:14 +01:00
Daniel Mack 3e1aebef6f ALSA: usb-audio: header file cleanups
Rename snd-usb-lib to snd-usbmidi-lib as MIDI functions are the only
thing it actually contains. Introduce a new header file to only declare
these functions.

Introduced usbmixer.h for all functions exported by usbmixer.c.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-05 08:16:47 +01:00
Daniel Mack de48c7bc6f ALSA: usbaudio: consolidate header files
Use the definitions from linux/usb/audio.h all over the ALSA USB audio
driver and add some missing definitions there as well.

Use the endpoint attribute macros from linux/usb/ch9 and remove the own
things from sound/usb/usbaudio.h.

Now things are also nicely prefixed which makes understanding the code
easier.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-23 08:51:56 +01:00
Tobias Hansen 2b6f6c0d11 ALSA: snd-usb-us122l: add product IDs of US-122MKII and US-144MKII
I added the product IDs of the new revisions of the devices, so owners
can test whether this suffices to make them work. Patched against ALSA
snapshot 20091207.

Signed-off-by: Tobias Hansen <Tobias.Hansen at physik.uni-hamburg.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-08 12:56:50 +01:00
Clemens Ladisch a014bbadb5 sound: usxxx: cleanup chip field
The chip field is no longer needed.  Move those of its fields that are
actually used to the device structure itself.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-24 10:20:09 +01:00
Clemens Ladisch d82af9f9aa sound: usb: make the USB MIDI module more independent
Remove the dependecy from the USB MIDI code on the snd_usb_audio
structure.  This allows using the USB MIDI module from another driver
without having to pretend to be the generic USB audio driver.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-24 10:19:59 +01:00
Takashi Iwai e87a3dd33e Merge branch 'fix/misc' into topic/misc 2009-11-01 11:11:07 +01:00
Tobias Hansen a688e4885c ALSA: snd-usb-us122l: corrent error number for not probing US-144 on ehci-hcd
snd-usb-us122l: corrent error number for not probing US-144 on ehci-hcd
This is the correct error number for telling the USB system that this
driver is not for the device.

Signed-off-by: Tobias Hansen <Tobias.Hansen@physik.uni-hamburg.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-13 08:20:20 +02:00
Alexey Dobriyan f0f37e2f77 const: mark struct vm_struct_operations
* mark struct vm_area_struct::vm_ops as const
* mark vm_ops in AGP code

But leave TTM code alone, something is fishy there with global vm_ops
being used.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-27 11:39:25 -07:00
Tobias Hansen 4f272341c7 ALSA: snd-usb-us122l: add support for US-144
Adds support for US-144 when attached on USB1.1.
Unlike the US-122L it uses both USB interfaces 0 and 1.

Signed-off-by: Tobias Hansen <Tobias.Hansen@physik.uni-hamburg.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-22 17:47:47 +02:00
Takashi Iwai 3f5d3465be ALSA: usx2y - reparent sound device
Fix the parent device to be the USB interface, not the USB device.
A similiar commit like 563c2bf59d.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-02 11:53:12 +02:00
Takashi Iwai a7b554ad7e Merge branch 'fix/usx2y' into for-linus
* fix/usx2y:
  ALSA: us122l: add snd_us122l_free()
  ALSA: us122l: Fix signedness in comparisions
2009-04-21 07:43:10 +02:00
Karsten Wiese 5d4af1be06 ALSA: us122l: add snd_us122l_free()
Use it to clean up snd_us122l_card_used[].

Without patch unplugging of an US122L soundcard didn't reset the
corresponding element of snd_us122l_card_used[] to 0.
The (SNDRV_CARDS + 1)th plugging in did not result in creating the soundcard
device anymore.
Index values supplied with the modprobe command line were not used correctly
anymore after the first unplugging of an US122L.

Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de>
Cc: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-20 13:39:38 +02:00
Li Zefan 85385c1551 ALSA: sound/usb: use memdup_user()
Remove open-coded memdup_user().

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-14 12:39:39 +02:00
Takashi Iwai 51721f70ac ALSA: Return proper error code at probe in sound/usb/*
Some drivers in soudn/usb/* don't handle the error code properly
from snd_card_create().  This patch fixes these places.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-12 15:21:55 +01:00
Takashi Iwai bd7dd77c2a ALSA: Convert to snd_card_create() in other sound/*
Convert from snd_card_new() to the new snd_card_create() function
in other sound subdirectories.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-12 15:21:19 +01:00
Julia Lawall f4e9749f45 ALSA: Use usb_set/get_intfdata
Use the USB functions usb_get_intfdata and usb_set_intfdata instead of
dev_get_drvdata and dev_set_drvdata, respectively.

The semantic patch that makes this change for the usb_get_intfdata case is
as follows: (http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@header@
@@

#include <linux/usb.h>

@same depends on header@
position p;
@@

usb_get_intfdata@p(...) { ... }

@depends on header@
position _p!=same.p;
identifier _f;
struct usb_interface*intf;
@@

_f@_p(...) { <+...
- dev_get_drvdata(&intf->dev)
+ usb_get_intfdata(intf)
...+> }
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-02 11:52:45 +01:00
Li Zefan 428ffb7151 ALSA: us122l: fix missing unlock in usb_stream_hwdep_vm_fault()
Should unlock us122l->mutex before returning VM_FAULT_SIGBUS.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-10-15 11:41:04 +02:00
Karsten Wiese 030a07e441 ALSA: Add USB US122L driver
Added a new US122L usb-audio driver.  This driver works together with a
dedicated alsa-lib plugin.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-08-01 13:37:12 +02:00