ALSA: usb-audio: replace "void *" with more specific pointers

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Pavel Roskin 2011-07-06 11:20:13 -04:00 коммит произвёл Takashi Iwai
Родитель 80b52490cd
Коммит 81b85b6bd9
1 изменённых файлов: 8 добавлений и 8 удалений

Просмотреть файл

@ -433,7 +433,8 @@ static int snd_usb_audio_create(struct usb_device *dev, int idx,
* only at the first time. the successive calls of this function will
* append the pcm interface to the corresponding card.
*/
static void *snd_usb_audio_probe(struct usb_device *dev,
static struct snd_usb_audio *
snd_usb_audio_probe(struct usb_device *dev,
struct usb_interface *intf,
const struct usb_device_id *usb_id)
{
@ -540,16 +541,15 @@ static void *snd_usb_audio_probe(struct usb_device *dev,
* we need to take care of counter, since disconnection can be called also
* many times as well as usb_audio_probe().
*/
static void snd_usb_audio_disconnect(struct usb_device *dev, void *ptr)
static void snd_usb_audio_disconnect(struct usb_device *dev,
struct snd_usb_audio *chip)
{
struct snd_usb_audio *chip;
struct snd_card *card;
struct list_head *p;
if (ptr == (void *)-1L)
if (chip == (void *)-1L)
return;
chip = ptr;
card = chip->card;
mutex_lock(&register_mutex);
mutex_lock(&chip->shutdown_mutex);
@ -585,7 +585,7 @@ static void snd_usb_audio_disconnect(struct usb_device *dev, void *ptr)
static int usb_audio_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{
void *chip;
struct snd_usb_audio *chip;
chip = snd_usb_audio_probe(interface_to_usbdev(intf), intf, id);
if (chip) {
usb_set_intfdata(intf, chip);