Lines Matching refs:dev
43 static int snd_seq_bus_match(struct device *dev, struct device_driver *drv) in snd_seq_bus_match() argument
45 struct snd_seq_device *sdev = to_seq_dev(dev); in snd_seq_bus_match()
63 static int print_dev_info(struct device *dev, void *data) in print_dev_info() argument
65 struct snd_seq_device *sdev = to_seq_dev(dev); in print_dev_info()
69 dev->driver ? "loaded" : "empty", in print_dev_info()
70 dev->driver ? 1 : 0); in print_dev_info()
89 static int request_seq_drv(struct device *dev, void *data) in request_seq_drv() argument
91 struct snd_seq_device *sdev = to_seq_dev(dev); in request_seq_drv()
93 if (!dev->driver) in request_seq_drv()
156 struct snd_seq_device *dev = device->device_data; in snd_seq_device_dev_free() local
159 if (dev->private_free) in snd_seq_device_dev_free()
160 dev->private_free(dev); in snd_seq_device_dev_free()
161 put_device(&dev->dev); in snd_seq_device_dev_free()
167 struct snd_seq_device *dev = device->device_data; in snd_seq_device_dev_register() local
170 err = device_add(&dev->dev); in snd_seq_device_dev_register()
173 if (!dev->dev.driver) in snd_seq_device_dev_register()
180 struct snd_seq_device *dev = device->device_data; in snd_seq_device_dev_disconnect() local
182 device_del(&dev->dev); in snd_seq_device_dev_disconnect()
186 static void snd_seq_dev_release(struct device *dev) in snd_seq_dev_release() argument
188 kfree(to_seq_dev(dev)); in snd_seq_dev_release()
201 struct snd_seq_device *dev; in snd_seq_device_new() local
215 dev = kzalloc(sizeof(*dev) + argsize, GFP_KERNEL); in snd_seq_device_new()
216 if (!dev) in snd_seq_device_new()
220 dev->card = card; in snd_seq_device_new()
221 dev->device = device; in snd_seq_device_new()
222 dev->id = id; in snd_seq_device_new()
223 dev->argsize = argsize; in snd_seq_device_new()
225 device_initialize(&dev->dev); in snd_seq_device_new()
226 dev->dev.parent = &card->card_dev; in snd_seq_device_new()
227 dev->dev.bus = &snd_seq_bus_type; in snd_seq_device_new()
228 dev->dev.release = snd_seq_dev_release; in snd_seq_device_new()
229 dev_set_name(&dev->dev, "%s-%d-%d", dev->id, card->number, device); in snd_seq_device_new()
232 err = snd_device_new(card, SNDRV_DEV_SEQUENCER, dev, &dops); in snd_seq_device_new()
234 put_device(&dev->dev); in snd_seq_device_new()
239 *result = dev; in snd_seq_device_new()