From 2af677fc884fc6dc79e65c99050ea607ac8bab9b Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Sun, 20 Nov 2005 14:03:48 +0100 Subject: [ALSA] dynamic minors (1/6): store device type in struct snd_minor Instead of a comment string, store the device type in the snd_minor structure. This makes snd_minor more flexible, and has the nice side effect that we don't need anymore to create a separate snd_minor template for registering a device but can pass the file_operations directly to snd_register_device(). Signed-off-by: Clemens Ladisch --- sound/core/timer.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'sound/core/timer.c') diff --git a/sound/core/timer.c b/sound/core/timer.c index 6aad411dd7b8..a7bcb04263cb 100644 --- a/sound/core/timer.c +++ b/sound/core/timer.c @@ -1924,12 +1924,6 @@ static struct file_operations snd_timer_f_ops = .fasync = snd_timer_user_fasync, }; -static struct snd_minor snd_timer_reg = -{ - .comment = "timer", - .f_ops = &snd_timer_f_ops, -}; - /* * ENTRY functions */ @@ -1959,7 +1953,7 @@ static int __init alsa_timer_init(void) snd_printk(KERN_ERR "unable to register system timer (%i)\n", err); if ((err = snd_register_device(SNDRV_DEVICE_TYPE_TIMER, - NULL, 0, &snd_timer_reg, "timer"))<0) + NULL, 0, &snd_timer_f_ops, "timer")) < 0) snd_printk(KERN_ERR "unable to register timer device (%i)\n", err); return 0; -- cgit v1.2.3-59-g8ed1b