Lines Matching refs:device

41 static int snd_hwdep_dev_free(struct snd_device *device);
42 static int snd_hwdep_dev_register(struct snd_device *device);
43 static int snd_hwdep_dev_disconnect(struct snd_device *device);
46 static struct snd_hwdep *snd_hwdep_search(struct snd_card *card, int device) in snd_hwdep_search() argument
51 if (hwdep->card == card && hwdep->device == device) in snd_hwdep_search()
277 int device; in snd_hwdep_control_ioctl() local
279 if (get_user(device, (int __user *)arg)) in snd_hwdep_control_ioctl()
283 if (device < 0) in snd_hwdep_control_ioctl()
284 device = 0; in snd_hwdep_control_ioctl()
285 else if (device < SNDRV_MINOR_HWDEPS) in snd_hwdep_control_ioctl()
286 device++; in snd_hwdep_control_ioctl()
288 device = SNDRV_MINOR_HWDEPS; in snd_hwdep_control_ioctl()
290 while (device < SNDRV_MINOR_HWDEPS) { in snd_hwdep_control_ioctl()
291 if (snd_hwdep_search(card, device)) in snd_hwdep_control_ioctl()
293 device++; in snd_hwdep_control_ioctl()
295 if (device >= SNDRV_MINOR_HWDEPS) in snd_hwdep_control_ioctl()
296 device = -1; in snd_hwdep_control_ioctl()
298 if (put_user(device, (int __user *)arg)) in snd_hwdep_control_ioctl()
305 int device, err; in snd_hwdep_control_ioctl() local
308 if (get_user(device, &info->device)) in snd_hwdep_control_ioctl()
311 hwdep = snd_hwdep_search(card, device); in snd_hwdep_control_ioctl()
347 static void release_hwdep_device(struct device *dev) in release_hwdep_device()
365 int snd_hwdep_new(struct snd_card *card, char *id, int device, in snd_hwdep_new() argument
387 hwdep->device = device; in snd_hwdep_new()
393 dev_set_name(&hwdep->dev, "hwC%iD%i", card->number, device); in snd_hwdep_new()
410 static int snd_hwdep_dev_free(struct snd_device *device) in snd_hwdep_dev_free() argument
412 struct snd_hwdep *hwdep = device->device_data; in snd_hwdep_dev_free()
421 static int snd_hwdep_dev_register(struct snd_device *device) in snd_hwdep_dev_register() argument
423 struct snd_hwdep *hwdep = device->device_data; in snd_hwdep_dev_register()
428 if (snd_hwdep_search(card, hwdep->device)) { in snd_hwdep_dev_register()
434 hwdep->card, hwdep->device, in snd_hwdep_dev_register()
447 hwdep->device) in snd_hwdep_dev_register()
451 card, hwdep->device, in snd_hwdep_dev_register()
463 static int snd_hwdep_dev_disconnect(struct snd_device *device) in snd_hwdep_dev_disconnect() argument
465 struct snd_hwdep *hwdep = device->device_data; in snd_hwdep_dev_disconnect()
470 if (snd_hwdep_search(hwdep->card, hwdep->device) != hwdep) { in snd_hwdep_dev_disconnect()
478 snd_unregister_oss_device(hwdep->oss_type, hwdep->card, hwdep->device); in snd_hwdep_dev_disconnect()
500 hwdep->card->number, hwdep->device, hwdep->name); in snd_hwdep_proc_read()