Lines Matching refs:device
27 static int snd_hwdep_dev_free(struct snd_device *device);
28 static int snd_hwdep_dev_register(struct snd_device *device);
29 static int snd_hwdep_dev_disconnect(struct snd_device *device);
32 static struct snd_hwdep *snd_hwdep_search(struct snd_card *card, int device)
37 if (hwdep->card == card && hwdep->device == device)
270 int device;
272 if (get_user(device, (int __user *)arg))
276 if (device < 0)
277 device = 0;
278 else if (device < SNDRV_MINOR_HWDEPS)
279 device++;
281 device = SNDRV_MINOR_HWDEPS;
283 while (device < SNDRV_MINOR_HWDEPS) {
284 if (snd_hwdep_search(card, device))
286 device++;
288 if (device >= SNDRV_MINOR_HWDEPS)
289 device = -1;
291 if (put_user(device, (int __user *)arg))
298 int device, err;
301 if (get_user(device, &info->device))
304 hwdep = snd_hwdep_search(card, device);
340 static void release_hwdep_device(struct device *dev)
349 * @device: the device index (zero-based)
358 int snd_hwdep_new(struct snd_card *card, char *id, int device,
380 hwdep->device = device;
386 dev_set_name(&hwdep->dev, "hwC%iD%i", card->number, device);
403 static int snd_hwdep_dev_free(struct snd_device *device)
405 struct snd_hwdep *hwdep = device->device_data;
414 static int snd_hwdep_dev_register(struct snd_device *device)
416 struct snd_hwdep *hwdep = device->device_data;
421 if (snd_hwdep_search(card, hwdep->device)) {
427 hwdep->card, hwdep->device,
440 hwdep->device)
442 "only hwdep device 0 can be registered as OSS direct FM device!\n");
444 card, hwdep->device,
447 "unable to register OSS compatibility device\n");
456 static int snd_hwdep_dev_disconnect(struct snd_device *device)
458 struct snd_hwdep *hwdep = device->device_data;
463 if (snd_hwdep_search(hwdep->card, hwdep->device) != hwdep) {
471 snd_unregister_oss_device(hwdep->oss_type, hwdep->card, hwdep->device);
493 hwdep->card->number, hwdep->device, hwdep->name);