/**
* snd_device_new - create an ALSA device component
* @card: the card instance
- * @type: the device type, SNDRV_DEV_TYPE_XXX
+ * @type: the device type, SNDRV_DEV_XXX
* @device_data: the data pointer of this device
* @ops: the operator table
*
{
snd_device_t *dev;
- snd_assert(card != NULL && device_data != NULL && ops != NULL, return -ENXIO);
+ snd_assert(card != NULL, return -ENXIO);
+ snd_assert(device_data != NULL, return -ENXIO);
+ snd_assert(ops != NULL, return -ENXIO);
dev = kcalloc(1, sizeof(*dev), GFP_KERNEL);
if (dev == NULL)
return -ENOMEM;
}
/**
- * snd_device_free - disconnect the device
+ * snd_device_disconnect - disconnect the device
* @card: the card instance
* @device_data: the data pointer to disconnect
*
{
struct list_head *list;
snd_device_t *dev;
-
+
snd_assert(card != NULL, return -ENXIO);
snd_assert(device_data != NULL, return -ENXIO);
list_for_each(list, &card->devices) {
struct list_head *list;
snd_device_t *dev;
int err;
-
- snd_assert(card != NULL && device_data != NULL, return -ENXIO);
+
+ snd_assert(card != NULL, return -ENXIO);
+ snd_assert(device_data != NULL, return -ENXIO);
list_for_each(list, &card->devices) {
dev = snd_device(list);
if (dev->device_data != device_data)