Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[ALSA] Remove xxx_t typedefs: Timer

Modules: RTC timer driver,Timer Midlevel

Remove xxx_t typedefs from the core timer.

Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by

Takashi Iwai and committed by
Jaroslav Kysela
53d2f744 82e9bae6

+233 -247
+39 -51
include/sound/timer.h
··· 26 26 #include <sound/asound.h> 27 27 #include <linux/interrupt.h> 28 28 29 - typedef enum sndrv_timer_class snd_timer_class_t; 30 - typedef enum sndrv_timer_slave_class snd_timer_slave_class_t; 31 - typedef enum sndrv_timer_global snd_timer_global_t; 32 - typedef struct sndrv_timer_id snd_timer_id_t; 33 - typedef struct sndrv_timer_ginfo snd_timer_ginfo_t; 34 - typedef struct sndrv_timer_gparams snd_timer_gparams_t; 35 - typedef struct sndrv_timer_gstatus snd_timer_gstatus_t; 36 - typedef struct sndrv_timer_select snd_timer_select_t; 37 - typedef struct sndrv_timer_info snd_timer_info_t; 38 - typedef struct sndrv_timer_params snd_timer_params_t; 39 - typedef struct sndrv_timer_status snd_timer_status_t; 40 - typedef struct sndrv_timer_read snd_timer_read_t; 41 - typedef struct sndrv_timer_tread snd_timer_tread_t; 42 - 43 29 #define snd_timer_chip(timer) ((timer)->private_data) 44 30 45 31 #define SNDRV_TIMER_DEVICES 16 ··· 50 64 #define SNDRV_TIMER_FLG_CHANGE 0x00000001 51 65 #define SNDRV_TIMER_FLG_RESCHED 0x00000002 /* need reschedule */ 52 66 53 - typedef void (*snd_timer_callback_t) (snd_timer_instance_t * timeri, unsigned long ticks, unsigned long resolution); 54 - typedef void (*snd_timer_ccallback_t) (snd_timer_instance_t * timeri, enum sndrv_timer_event event, 55 - struct timespec * tstamp, unsigned long resolution); 67 + struct snd_timer; 56 68 57 - struct _snd_timer_hardware { 69 + struct snd_timer_hardware { 58 70 /* -- must be filled with low-level driver */ 59 71 unsigned int flags; /* various flags */ 60 72 unsigned long resolution; /* average timer resolution for one tick in nsec */ ··· 60 76 unsigned long resolution_max; /* maximal resolution */ 61 77 unsigned long ticks; /* max timer ticks per interrupt */ 62 78 /* -- low-level functions -- */ 63 - int (*open) (snd_timer_t * timer); 64 - int (*close) (snd_timer_t * timer); 65 - unsigned long (*c_resolution) (snd_timer_t * timer); 66 - int (*start) (snd_timer_t * timer); 67 - int (*stop) (snd_timer_t * timer); 68 - int (*set_period) (snd_timer_t * timer, unsigned long period_num, unsigned long period_den); 69 - int (*precise_resolution) (snd_timer_t * timer, unsigned long *num, unsigned long *den); 79 + int (*open) (struct snd_timer * timer); 80 + int (*close) (struct snd_timer * timer); 81 + unsigned long (*c_resolution) (struct snd_timer * timer); 82 + int (*start) (struct snd_timer * timer); 83 + int (*stop) (struct snd_timer * timer); 84 + int (*set_period) (struct snd_timer * timer, unsigned long period_num, unsigned long period_den); 85 + int (*precise_resolution) (struct snd_timer * timer, unsigned long *num, unsigned long *den); 70 86 }; 71 87 72 - struct _snd_timer { 73 - snd_timer_class_t tmr_class; 74 - snd_card_t *card; 88 + struct snd_timer { 89 + int tmr_class; 90 + struct snd_card *card; 75 91 struct module *module; 76 92 int tmr_device; 77 93 int tmr_subdevice; ··· 81 97 int running; /* running instances */ 82 98 unsigned long sticks; /* schedule ticks */ 83 99 void *private_data; 84 - void (*private_free) (snd_timer_t *timer); 85 - struct _snd_timer_hardware hw; 100 + void (*private_free) (struct snd_timer *timer); 101 + struct snd_timer_hardware hw; 86 102 spinlock_t lock; 87 103 struct list_head device_list; 88 104 struct list_head open_list_head; ··· 92 108 struct tasklet_struct task_queue; 93 109 }; 94 110 95 - struct _snd_timer_instance { 96 - snd_timer_t * timer; 111 + struct snd_timer_instance { 112 + struct snd_timer *timer; 97 113 char *owner; 98 114 unsigned int flags; 99 115 void *private_data; 100 - void (*private_free) (snd_timer_instance_t *ti); 101 - snd_timer_callback_t callback; 102 - snd_timer_ccallback_t ccallback; 116 + void (*private_free) (struct snd_timer_instance *ti); 117 + void (*callback) (struct snd_timer_instance *timeri, 118 + unsigned long ticks, unsigned long resolution); 119 + void (*ccallback) (struct snd_timer_instance * timeri, 120 + int event, 121 + struct timespec * tstamp, 122 + unsigned long resolution); 103 123 void *callback_data; 104 124 unsigned long ticks; /* auto-load ticks when expired */ 105 125 unsigned long cticks; /* current ticks */ 106 126 unsigned long pticks; /* accumulated ticks for callback */ 107 127 unsigned long resolution; /* current resolution for tasklet */ 108 128 unsigned long lost; /* lost ticks */ 109 - snd_timer_slave_class_t slave_class; 129 + int slave_class; 110 130 unsigned int slave_id; 111 131 struct list_head open_list; 112 132 struct list_head active_list; 113 133 struct list_head ack_list; 114 134 struct list_head slave_list_head; 115 135 struct list_head slave_active_head; 116 - snd_timer_instance_t *master; 136 + struct snd_timer_instance *master; 117 137 }; 118 138 119 139 /* 120 140 * Registering 121 141 */ 122 142 123 - extern int snd_timer_new(snd_card_t *card, char *id, snd_timer_id_t *tid, snd_timer_t ** rtimer); 124 - extern void snd_timer_notify(snd_timer_t *timer, enum sndrv_timer_event event, struct timespec *tstamp); 125 - extern int snd_timer_global_new(char *id, int device, snd_timer_t **rtimer); 126 - extern int snd_timer_global_free(snd_timer_t *timer); 127 - extern int snd_timer_global_register(snd_timer_t *timer); 128 - extern int snd_timer_global_unregister(snd_timer_t *timer); 143 + int snd_timer_new(struct snd_card *card, char *id, struct snd_timer_id *tid, struct snd_timer **rtimer); 144 + void snd_timer_notify(struct snd_timer *timer, int event, struct timespec *tstamp); 145 + int snd_timer_global_new(char *id, int device, struct snd_timer **rtimer); 146 + int snd_timer_global_free(struct snd_timer *timer); 147 + int snd_timer_global_register(struct snd_timer *timer); 148 + int snd_timer_global_unregister(struct snd_timer *timer); 129 149 130 - extern int snd_timer_open(snd_timer_instance_t ** ti, char *owner, snd_timer_id_t *tid, unsigned int slave_id); 131 - extern int snd_timer_close(snd_timer_instance_t * timeri); 132 - extern unsigned long snd_timer_resolution(snd_timer_instance_t * timeri); 133 - extern int snd_timer_start(snd_timer_instance_t * timeri, unsigned int ticks); 134 - extern int snd_timer_stop(snd_timer_instance_t * timeri); 135 - extern int snd_timer_continue(snd_timer_instance_t * timeri); 136 - extern int snd_timer_pause(snd_timer_instance_t * timeri); 150 + int snd_timer_open(struct snd_timer_instance **ti, char *owner, struct snd_timer_id *tid, unsigned int slave_id); 151 + int snd_timer_close(struct snd_timer_instance *timeri); 152 + unsigned long snd_timer_resolution(struct snd_timer_instance *timeri); 153 + int snd_timer_start(struct snd_timer_instance *timeri, unsigned int ticks); 154 + int snd_timer_stop(struct snd_timer_instance *timeri); 155 + int snd_timer_continue(struct snd_timer_instance *timeri); 156 + int snd_timer_pause(struct snd_timer_instance *timeri); 137 157 138 - extern void snd_timer_interrupt(snd_timer_t * timer, unsigned long ticks_left); 158 + void snd_timer_interrupt(struct snd_timer *timer, unsigned long ticks_left); 139 159 140 160 #endif /* __SOUND_TIMER_H */
+11 -11
sound/core/rtctimer.c
··· 40 40 /* 41 41 * prototypes 42 42 */ 43 - static int rtctimer_open(snd_timer_t *t); 44 - static int rtctimer_close(snd_timer_t *t); 45 - static int rtctimer_start(snd_timer_t *t); 46 - static int rtctimer_stop(snd_timer_t *t); 43 + static int rtctimer_open(struct snd_timer *t); 44 + static int rtctimer_close(struct snd_timer *t); 45 + static int rtctimer_start(struct snd_timer *t); 46 + static int rtctimer_stop(struct snd_timer *t); 47 47 48 48 49 49 /* 50 50 * The hardware dependent description for this timer. 51 51 */ 52 - static struct _snd_timer_hardware rtc_hw = { 52 + static struct snd_timer_hardware rtc_hw = { 53 53 .flags = SNDRV_TIMER_HW_FIRST|SNDRV_TIMER_HW_AUTO, 54 54 .ticks = 100000000L, /* FIXME: XXX */ 55 55 .open = rtctimer_open, ··· 59 59 }; 60 60 61 61 static int rtctimer_freq = RTC_FREQ; /* frequency */ 62 - static snd_timer_t *rtctimer; 62 + static struct snd_timer *rtctimer; 63 63 static rtc_task_t rtc_task; 64 64 65 65 66 66 static int 67 - rtctimer_open(snd_timer_t *t) 67 + rtctimer_open(struct snd_timer *t) 68 68 { 69 69 int err; 70 70 ··· 76 76 } 77 77 78 78 static int 79 - rtctimer_close(snd_timer_t *t) 79 + rtctimer_close(struct snd_timer *t) 80 80 { 81 81 rtc_task_t *rtc = t->private_data; 82 82 if (rtc) { ··· 87 87 } 88 88 89 89 static int 90 - rtctimer_start(snd_timer_t *timer) 90 + rtctimer_start(struct snd_timer *timer) 91 91 { 92 92 rtc_task_t *rtc = timer->private_data; 93 93 snd_assert(rtc != NULL, return -EINVAL); ··· 97 97 } 98 98 99 99 static int 100 - rtctimer_stop(snd_timer_t *timer) 100 + rtctimer_stop(struct snd_timer *timer) 101 101 { 102 102 rtc_task_t *rtc = timer->private_data; 103 103 snd_assert(rtc != NULL, return -EINVAL); ··· 120 120 static int __init rtctimer_init(void) 121 121 { 122 122 int err; 123 - snd_timer_t *timer; 123 + struct snd_timer *timer; 124 124 125 125 if (rtctimer_freq < 2 || rtctimer_freq > 8192 || 126 126 (rtctimer_freq & (rtctimer_freq - 1)) != 0) {
+172 -174
sound/core/timer.c
··· 53 53 module_param(timer_limit, int, 0444); 54 54 MODULE_PARM_DESC(timer_limit, "Maximum global timers in system."); 55 55 56 - typedef struct { 57 - snd_timer_instance_t *timeri; 56 + struct snd_timer_user { 57 + struct snd_timer_instance *timeri; 58 58 int tread; /* enhanced read with timestamps and events */ 59 59 unsigned long ticks; 60 60 unsigned long overrun; ··· 62 62 int qtail; 63 63 int qused; 64 64 int queue_size; 65 - snd_timer_read_t *queue; 66 - snd_timer_tread_t *tqueue; 65 + struct snd_timer_read *queue; 66 + struct snd_timer_tread *tqueue; 67 67 spinlock_t qlock; 68 68 unsigned long last_resolution; 69 69 unsigned int filter; ··· 71 71 wait_queue_head_t qchange_sleep; 72 72 struct fasync_struct *fasync; 73 73 struct semaphore tread_sem; 74 - } snd_timer_user_t; 74 + }; 75 75 76 76 /* list of timers */ 77 77 static LIST_HEAD(snd_timer_list); ··· 84 84 85 85 static DECLARE_MUTEX(register_mutex); 86 86 87 - static int snd_timer_free(snd_timer_t *timer); 88 - static int snd_timer_dev_free(snd_device_t *device); 89 - static int snd_timer_dev_register(snd_device_t *device); 90 - static int snd_timer_dev_unregister(snd_device_t *device); 87 + static int snd_timer_free(struct snd_timer *timer); 88 + static int snd_timer_dev_free(struct snd_device *device); 89 + static int snd_timer_dev_register(struct snd_device *device); 90 + static int snd_timer_dev_unregister(struct snd_device *device); 91 91 92 - static void snd_timer_reschedule(snd_timer_t * timer, unsigned long ticks_left); 92 + static void snd_timer_reschedule(struct snd_timer * timer, unsigned long ticks_left); 93 93 94 94 /* 95 95 * create a timer instance with the given owner string. 96 96 * when timer is not NULL, increments the module counter 97 97 */ 98 - static snd_timer_instance_t *snd_timer_instance_new(char *owner, 99 - snd_timer_t *timer) 98 + static struct snd_timer_instance *snd_timer_instance_new(char *owner, 99 + struct snd_timer *timer) 100 100 { 101 - snd_timer_instance_t *timeri; 101 + struct snd_timer_instance *timeri; 102 102 timeri = kzalloc(sizeof(*timeri), GFP_KERNEL); 103 103 if (timeri == NULL) 104 104 return NULL; ··· 126 126 /* 127 127 * find a timer instance from the given timer id 128 128 */ 129 - static snd_timer_t *snd_timer_find(snd_timer_id_t *tid) 129 + static struct snd_timer *snd_timer_find(struct snd_timer_id *tid) 130 130 { 131 - snd_timer_t *timer = NULL; 131 + struct snd_timer *timer = NULL; 132 132 struct list_head *p; 133 133 134 134 list_for_each(p, &snd_timer_list) { 135 - timer = list_entry(p, snd_timer_t, device_list); 135 + timer = list_entry(p, struct snd_timer, device_list); 136 136 137 137 if (timer->tmr_class != tid->dev_class) 138 138 continue; ··· 152 152 153 153 #ifdef CONFIG_KMOD 154 154 155 - static void snd_timer_request(snd_timer_id_t *tid) 155 + static void snd_timer_request(struct snd_timer_id *tid) 156 156 { 157 157 if (! current->fs->root) 158 158 return; ··· 179 179 * 180 180 * call this with register_mutex down. 181 181 */ 182 - static void snd_timer_check_slave(snd_timer_instance_t *slave) 182 + static void snd_timer_check_slave(struct snd_timer_instance *slave) 183 183 { 184 - snd_timer_t *timer; 185 - snd_timer_instance_t *master; 184 + struct snd_timer *timer; 185 + struct snd_timer_instance *master; 186 186 struct list_head *p, *q; 187 187 188 188 /* FIXME: it's really dumb to look up all entries.. */ 189 189 list_for_each(p, &snd_timer_list) { 190 - timer = list_entry(p, snd_timer_t, device_list); 190 + timer = list_entry(p, struct snd_timer, device_list); 191 191 list_for_each(q, &timer->open_list_head) { 192 - master = list_entry(q, snd_timer_instance_t, open_list); 192 + master = list_entry(q, struct snd_timer_instance, open_list); 193 193 if (slave->slave_class == master->slave_class && 194 194 slave->slave_id == master->slave_id) { 195 195 list_del(&slave->open_list); ··· 211 211 * 212 212 * call this with register_mutex down. 213 213 */ 214 - static void snd_timer_check_master(snd_timer_instance_t *master) 214 + static void snd_timer_check_master(struct snd_timer_instance *master) 215 215 { 216 - snd_timer_instance_t *slave; 216 + struct snd_timer_instance *slave; 217 217 struct list_head *p, *n; 218 218 219 219 /* check all pending slaves */ 220 220 list_for_each_safe(p, n, &snd_timer_slave_list) { 221 - slave = list_entry(p, snd_timer_instance_t, open_list); 221 + slave = list_entry(p, struct snd_timer_instance, open_list); 222 222 if (slave->slave_class == master->slave_class && 223 223 slave->slave_id == master->slave_id) { 224 224 list_del(p); ··· 238 238 * open a timer instance 239 239 * when opening a master, the slave id must be here given. 240 240 */ 241 - int snd_timer_open(snd_timer_instance_t **ti, 242 - char *owner, snd_timer_id_t *tid, 241 + int snd_timer_open(struct snd_timer_instance **ti, 242 + char *owner, struct snd_timer_id *tid, 243 243 unsigned int slave_id) 244 244 { 245 - snd_timer_t *timer; 246 - snd_timer_instance_t *timeri = NULL; 245 + struct snd_timer *timer; 246 + struct snd_timer_instance *timeri = NULL; 247 247 248 248 if (tid->dev_class == SNDRV_TIMER_CLASS_SLAVE) { 249 249 /* open a slave instance */ ··· 285 285 } 286 286 if (!list_empty(&timer->open_list_head)) { 287 287 timeri = list_entry(timer->open_list_head.next, 288 - snd_timer_instance_t, open_list); 288 + struct snd_timer_instance, open_list); 289 289 if (timeri->flags & SNDRV_TIMER_IFLG_EXCLUSIVE) { 290 290 up(&register_mutex); 291 291 return -EBUSY; ··· 307 307 return 0; 308 308 } 309 309 310 - static int _snd_timer_stop(snd_timer_instance_t * timeri, 311 - int keep_flag, enum sndrv_timer_event event); 310 + static int _snd_timer_stop(struct snd_timer_instance *timeri, 311 + int keep_flag, int event); 312 312 313 313 /* 314 314 * close a timer instance 315 315 */ 316 - int snd_timer_close(snd_timer_instance_t * timeri) 316 + int snd_timer_close(struct snd_timer_instance *timeri) 317 317 { 318 - snd_timer_t *timer = NULL; 318 + struct snd_timer *timer = NULL; 319 319 struct list_head *p, *n; 320 - snd_timer_instance_t *slave; 320 + struct snd_timer_instance *slave; 321 321 322 322 snd_assert(timeri != NULL, return -ENXIO); 323 323 ··· 353 353 timer->hw.close(timer); 354 354 /* remove slave links */ 355 355 list_for_each_safe(p, n, &timeri->slave_list_head) { 356 - slave = list_entry(p, snd_timer_instance_t, open_list); 356 + slave = list_entry(p, struct snd_timer_instance, open_list); 357 357 spin_lock_irq(&slave_active_lock); 358 358 _snd_timer_stop(slave, 1, SNDRV_TIMER_EVENT_RESOLUTION); 359 359 list_del(p); ··· 373 373 return 0; 374 374 } 375 375 376 - unsigned long snd_timer_resolution(snd_timer_instance_t * timeri) 376 + unsigned long snd_timer_resolution(struct snd_timer_instance *timeri) 377 377 { 378 - snd_timer_t * timer; 378 + struct snd_timer * timer; 379 379 380 380 if (timeri == NULL) 381 381 return 0; ··· 387 387 return 0; 388 388 } 389 389 390 - static void snd_timer_notify1(snd_timer_instance_t *ti, 391 - enum sndrv_timer_event event) 390 + static void snd_timer_notify1(struct snd_timer_instance *ti, int event) 392 391 { 393 - snd_timer_t *timer; 392 + struct snd_timer *timer; 394 393 unsigned long flags; 395 394 unsigned long resolution = 0; 396 - snd_timer_instance_t *ts; 395 + struct snd_timer_instance *ts; 397 396 struct list_head *n; 398 397 struct timespec tstamp; 399 398 ··· 413 414 return; 414 415 spin_lock_irqsave(&timer->lock, flags); 415 416 list_for_each(n, &ti->slave_active_head) { 416 - ts = list_entry(n, snd_timer_instance_t, active_list); 417 + ts = list_entry(n, struct snd_timer_instance, active_list); 417 418 if (ts->ccallback) 418 419 ts->ccallback(ti, event + 100, &tstamp, resolution); 419 420 } 420 421 spin_unlock_irqrestore(&timer->lock, flags); 421 422 } 422 423 423 - static int snd_timer_start1(snd_timer_t *timer, snd_timer_instance_t *timeri, 424 + static int snd_timer_start1(struct snd_timer *timer, struct snd_timer_instance *timeri, 424 425 unsigned long sticks) 425 426 { 426 427 list_del(&timeri->active_list); ··· 441 442 } 442 443 } 443 444 444 - static int snd_timer_start_slave(snd_timer_instance_t *timeri) 445 + static int snd_timer_start_slave(struct snd_timer_instance *timeri) 445 446 { 446 447 unsigned long flags; 447 448 ··· 457 458 /* 458 459 * start the timer instance 459 460 */ 460 - int snd_timer_start(snd_timer_instance_t * timeri, unsigned int ticks) 461 + int snd_timer_start(struct snd_timer_instance *timeri, unsigned int ticks) 461 462 { 462 - snd_timer_t *timer; 463 + struct snd_timer *timer; 463 464 int result = -EINVAL; 464 465 unsigned long flags; 465 466 ··· 482 483 return result; 483 484 } 484 485 485 - static int _snd_timer_stop(snd_timer_instance_t * timeri, 486 - int keep_flag, enum sndrv_timer_event event) 486 + static int _snd_timer_stop(struct snd_timer_instance * timeri, 487 + int keep_flag, int event) 487 488 { 488 - snd_timer_t *timer; 489 + struct snd_timer *timer; 489 490 unsigned long flags; 490 491 491 492 snd_assert(timeri != NULL, return -ENXIO); ··· 531 532 * 532 533 * do not call this from the timer callback! 533 534 */ 534 - int snd_timer_stop(snd_timer_instance_t * timeri) 535 + int snd_timer_stop(struct snd_timer_instance *timeri) 535 536 { 536 - snd_timer_t *timer; 537 + struct snd_timer *timer; 537 538 unsigned long flags; 538 539 int err; 539 540 ··· 551 552 /* 552 553 * start again.. the tick is kept. 553 554 */ 554 - int snd_timer_continue(snd_timer_instance_t * timeri) 555 + int snd_timer_continue(struct snd_timer_instance *timeri) 555 556 { 556 - snd_timer_t *timer; 557 + struct snd_timer *timer; 557 558 int result = -EINVAL; 558 559 unsigned long flags; 559 560 ··· 577 578 /* 578 579 * pause.. remember the ticks left 579 580 */ 580 - int snd_timer_pause(snd_timer_instance_t * timeri) 581 + int snd_timer_pause(struct snd_timer_instance * timeri) 581 582 { 582 583 return _snd_timer_stop(timeri, 0, SNDRV_TIMER_EVENT_PAUSE); 583 584 } ··· 588 589 * start pending instances and check the scheduling ticks. 589 590 * when the scheduling ticks is changed set CHANGE flag to reprogram the timer. 590 591 */ 591 - static void snd_timer_reschedule(snd_timer_t * timer, unsigned long ticks_left) 592 + static void snd_timer_reschedule(struct snd_timer * timer, unsigned long ticks_left) 592 593 { 593 - snd_timer_instance_t *ti; 594 + struct snd_timer_instance *ti; 594 595 unsigned long ticks = ~0UL; 595 596 struct list_head *p; 596 597 597 598 list_for_each(p, &timer->active_list_head) { 598 - ti = list_entry(p, snd_timer_instance_t, active_list); 599 + ti = list_entry(p, struct snd_timer_instance, active_list); 599 600 if (ti->flags & SNDRV_TIMER_IFLG_START) { 600 601 ti->flags &= ~SNDRV_TIMER_IFLG_START; 601 602 ti->flags |= SNDRV_TIMER_IFLG_RUNNING; ··· 623 624 */ 624 625 static void snd_timer_tasklet(unsigned long arg) 625 626 { 626 - snd_timer_t *timer = (snd_timer_t *) arg; 627 - snd_timer_instance_t *ti; 627 + struct snd_timer *timer = (struct snd_timer *) arg; 628 + struct snd_timer_instance *ti; 628 629 struct list_head *p; 629 630 unsigned long resolution, ticks; 630 631 ··· 632 633 /* now process all callbacks */ 633 634 while (!list_empty(&timer->sack_list_head)) { 634 635 p = timer->sack_list_head.next; /* get first item */ 635 - ti = list_entry(p, snd_timer_instance_t, ack_list); 636 + ti = list_entry(p, struct snd_timer_instance, ack_list); 636 637 637 638 /* remove from ack_list and make empty */ 638 639 list_del_init(p); ··· 657 658 * ticks_left is usually equal to timer->sticks. 658 659 * 659 660 */ 660 - void snd_timer_interrupt(snd_timer_t * timer, unsigned long ticks_left) 661 + void snd_timer_interrupt(struct snd_timer * timer, unsigned long ticks_left) 661 662 { 662 - snd_timer_instance_t *ti, *ts; 663 + struct snd_timer_instance *ti, *ts; 663 664 unsigned long resolution, ticks; 664 665 struct list_head *p, *q, *n, *ack_list_head; 665 666 int use_tasklet = 0; ··· 681 682 * is called. 682 683 */ 683 684 list_for_each_safe(p, n, &timer->active_list_head) { 684 - ti = list_entry(p, snd_timer_instance_t, active_list); 685 + ti = list_entry(p, struct snd_timer_instance, active_list); 685 686 if (!(ti->flags & SNDRV_TIMER_IFLG_RUNNING)) 686 687 continue; 687 688 ti->pticks += ticks_left; ··· 707 708 if (list_empty(&ti->ack_list)) 708 709 list_add_tail(&ti->ack_list, ack_list_head); 709 710 list_for_each(q, &ti->slave_active_head) { 710 - ts = list_entry(q, snd_timer_instance_t, active_list); 711 + ts = list_entry(q, struct snd_timer_instance, active_list); 711 712 ts->pticks = ti->pticks; 712 713 ts->resolution = resolution; 713 714 if (list_empty(&ts->ack_list)) ··· 734 735 /* now process all fast callbacks */ 735 736 while (!list_empty(&timer->ack_list_head)) { 736 737 p = timer->ack_list_head.next; /* get first item */ 737 - ti = list_entry(p, snd_timer_instance_t, ack_list); 738 + ti = list_entry(p, struct snd_timer_instance, ack_list); 738 739 739 740 /* remove from ack_list and make empty */ 740 741 list_del_init(p); ··· 762 763 763 764 */ 764 765 765 - int snd_timer_new(snd_card_t *card, char *id, snd_timer_id_t *tid, 766 - snd_timer_t **rtimer) 766 + int snd_timer_new(struct snd_card *card, char *id, struct snd_timer_id *tid, 767 + struct snd_timer **rtimer) 767 768 { 768 - snd_timer_t *timer; 769 + struct snd_timer *timer; 769 770 int err; 770 - static snd_device_ops_t ops = { 771 + static struct snd_device_ops ops = { 771 772 .dev_free = snd_timer_dev_free, 772 773 .dev_register = snd_timer_dev_register, 773 774 .dev_unregister = snd_timer_dev_unregister ··· 805 806 return 0; 806 807 } 807 808 808 - static int snd_timer_free(snd_timer_t *timer) 809 + static int snd_timer_free(struct snd_timer *timer) 809 810 { 810 811 snd_assert(timer != NULL, return -ENXIO); 811 812 if (timer->private_free) ··· 814 815 return 0; 815 816 } 816 817 817 - static int snd_timer_dev_free(snd_device_t *device) 818 + static int snd_timer_dev_free(struct snd_device *device) 818 819 { 819 - snd_timer_t *timer = device->device_data; 820 + struct snd_timer *timer = device->device_data; 820 821 return snd_timer_free(timer); 821 822 } 822 823 823 - static int snd_timer_dev_register(snd_device_t *dev) 824 + static int snd_timer_dev_register(struct snd_device *dev) 824 825 { 825 - snd_timer_t *timer = dev->device_data; 826 - snd_timer_t *timer1; 826 + struct snd_timer *timer = dev->device_data; 827 + struct snd_timer *timer1; 827 828 struct list_head *p; 828 829 829 830 snd_assert(timer != NULL && timer->hw.start != NULL && ··· 834 835 835 836 down(&register_mutex); 836 837 list_for_each(p, &snd_timer_list) { 837 - timer1 = list_entry(p, snd_timer_t, device_list); 838 + timer1 = list_entry(p, struct snd_timer, device_list); 838 839 if (timer1->tmr_class > timer->tmr_class) 839 840 break; 840 841 if (timer1->tmr_class < timer->tmr_class) ··· 862 863 return 0; 863 864 } 864 865 865 - static int snd_timer_unregister(snd_timer_t *timer) 866 + static int snd_timer_unregister(struct snd_timer *timer) 866 867 { 867 868 struct list_head *p, *n; 868 - snd_timer_instance_t *ti; 869 + struct snd_timer_instance *ti; 869 870 870 871 snd_assert(timer != NULL, return -ENXIO); 871 872 down(&register_mutex); ··· 873 874 snd_printk(KERN_WARNING "timer 0x%lx is busy?\n", (long)timer); 874 875 list_for_each_safe(p, n, &timer->open_list_head) { 875 876 list_del_init(p); 876 - ti = list_entry(p, snd_timer_instance_t, open_list); 877 + ti = list_entry(p, struct snd_timer_instance, open_list); 877 878 ti->timer = NULL; 878 879 } 879 880 } ··· 882 883 return snd_timer_free(timer); 883 884 } 884 885 885 - static int snd_timer_dev_unregister(snd_device_t *device) 886 + static int snd_timer_dev_unregister(struct snd_device *device) 886 887 { 887 - snd_timer_t *timer = device->device_data; 888 + struct snd_timer *timer = device->device_data; 888 889 return snd_timer_unregister(timer); 889 890 } 890 891 891 - void snd_timer_notify(snd_timer_t *timer, enum sndrv_timer_event event, 892 - struct timespec *tstamp) 892 + void snd_timer_notify(struct snd_timer *timer, int event, struct timespec *tstamp) 893 893 { 894 894 unsigned long flags; 895 895 unsigned long resolution = 0; 896 - snd_timer_instance_t *ti, *ts; 896 + struct snd_timer_instance *ti, *ts; 897 897 struct list_head *p, *n; 898 898 899 899 if (! (timer->hw.flags & SNDRV_TIMER_HW_SLAVE)) ··· 909 911 resolution = timer->hw.resolution; 910 912 } 911 913 list_for_each(p, &timer->active_list_head) { 912 - ti = list_entry(p, snd_timer_instance_t, active_list); 914 + ti = list_entry(p, struct snd_timer_instance, active_list); 913 915 if (ti->ccallback) 914 916 ti->ccallback(ti, event, tstamp, resolution); 915 917 list_for_each(n, &ti->slave_active_head) { 916 - ts = list_entry(n, snd_timer_instance_t, active_list); 918 + ts = list_entry(n, struct snd_timer_instance, active_list); 917 919 if (ts->ccallback) 918 920 ts->ccallback(ts, event, tstamp, resolution); 919 921 } ··· 924 926 /* 925 927 * exported functions for global timers 926 928 */ 927 - int snd_timer_global_new(char *id, int device, snd_timer_t **rtimer) 929 + int snd_timer_global_new(char *id, int device, struct snd_timer **rtimer) 928 930 { 929 - snd_timer_id_t tid; 931 + struct snd_timer_id tid; 930 932 931 933 tid.dev_class = SNDRV_TIMER_CLASS_GLOBAL; 932 934 tid.dev_sclass = SNDRV_TIMER_SCLASS_NONE; ··· 936 938 return snd_timer_new(NULL, id, &tid, rtimer); 937 939 } 938 940 939 - int snd_timer_global_free(snd_timer_t *timer) 941 + int snd_timer_global_free(struct snd_timer *timer) 940 942 { 941 943 return snd_timer_free(timer); 942 944 } 943 945 944 - int snd_timer_global_register(snd_timer_t *timer) 946 + int snd_timer_global_register(struct snd_timer *timer) 945 947 { 946 - snd_device_t dev; 948 + struct snd_device dev; 947 949 948 950 memset(&dev, 0, sizeof(dev)); 949 951 dev.device_data = timer; 950 952 return snd_timer_dev_register(&dev); 951 953 } 952 954 953 - int snd_timer_global_unregister(snd_timer_t *timer) 955 + int snd_timer_global_unregister(struct snd_timer *timer) 954 956 { 955 957 return snd_timer_unregister(timer); 956 958 } ··· 969 971 970 972 static void snd_timer_s_function(unsigned long data) 971 973 { 972 - snd_timer_t *timer = (snd_timer_t *)data; 974 + struct snd_timer *timer = (struct snd_timer *)data; 973 975 struct snd_timer_system_private *priv = timer->private_data; 974 976 unsigned long jiff = jiffies; 975 977 if (time_after(jiff, priv->last_expires)) ··· 977 979 snd_timer_interrupt(timer, (long)jiff - (long)priv->last_jiffies); 978 980 } 979 981 980 - static int snd_timer_s_start(snd_timer_t * timer) 982 + static int snd_timer_s_start(struct snd_timer * timer) 981 983 { 982 984 struct snd_timer_system_private *priv; 983 985 unsigned long njiff; ··· 996 998 return 0; 997 999 } 998 1000 999 - static int snd_timer_s_stop(snd_timer_t * timer) 1001 + static int snd_timer_s_stop(struct snd_timer * timer) 1000 1002 { 1001 1003 struct snd_timer_system_private *priv; 1002 1004 unsigned long jiff; ··· 1011 1013 return 0; 1012 1014 } 1013 1015 1014 - static struct _snd_timer_hardware snd_timer_system = 1016 + static struct snd_timer_hardware snd_timer_system = 1015 1017 { 1016 1018 .flags = SNDRV_TIMER_HW_FIRST | SNDRV_TIMER_HW_TASKLET, 1017 1019 .resolution = 1000000000L / HZ, ··· 1020 1022 .stop = snd_timer_s_stop 1021 1023 }; 1022 1024 1023 - static void snd_timer_free_system(snd_timer_t *timer) 1025 + static void snd_timer_free_system(struct snd_timer *timer) 1024 1026 { 1025 1027 kfree(timer->private_data); 1026 1028 } 1027 1029 1028 1030 static int snd_timer_register_system(void) 1029 1031 { 1030 - snd_timer_t *timer; 1032 + struct snd_timer *timer; 1031 1033 struct snd_timer_system_private *priv; 1032 1034 int err; 1033 1035 ··· 1053 1055 * Info interface 1054 1056 */ 1055 1057 1056 - static void snd_timer_proc_read(snd_info_entry_t *entry, 1057 - snd_info_buffer_t * buffer) 1058 + static void snd_timer_proc_read(struct snd_info_entry *entry, 1059 + struct snd_info_buffer *buffer) 1058 1060 { 1059 1061 unsigned long flags; 1060 - snd_timer_t *timer; 1061 - snd_timer_instance_t *ti; 1062 + struct snd_timer *timer; 1063 + struct snd_timer_instance *ti; 1062 1064 struct list_head *p, *q; 1063 1065 1064 1066 down(&register_mutex); 1065 1067 list_for_each(p, &snd_timer_list) { 1066 - timer = list_entry(p, snd_timer_t, device_list); 1068 + timer = list_entry(p, struct snd_timer, device_list); 1067 1069 switch (timer->tmr_class) { 1068 1070 case SNDRV_TIMER_CLASS_GLOBAL: 1069 1071 snd_iprintf(buffer, "G%i: ", timer->tmr_device); ··· 1092 1094 snd_iprintf(buffer, "\n"); 1093 1095 spin_lock_irqsave(&timer->lock, flags); 1094 1096 list_for_each(q, &timer->open_list_head) { 1095 - ti = list_entry(q, snd_timer_instance_t, open_list); 1097 + ti = list_entry(q, struct snd_timer_instance, open_list); 1096 1098 snd_iprintf(buffer, " Client %s : %s\n", 1097 1099 ti->owner ? ti->owner : "unknown", 1098 1100 ti->flags & (SNDRV_TIMER_IFLG_START | ··· 1108 1110 * USER SPACE interface 1109 1111 */ 1110 1112 1111 - static void snd_timer_user_interrupt(snd_timer_instance_t *timeri, 1113 + static void snd_timer_user_interrupt(struct snd_timer_instance *timeri, 1112 1114 unsigned long resolution, 1113 1115 unsigned long ticks) 1114 1116 { 1115 - snd_timer_user_t *tu = timeri->callback_data; 1116 - snd_timer_read_t *r; 1117 + struct snd_timer_user *tu = timeri->callback_data; 1118 + struct snd_timer_read *r; 1117 1119 int prev; 1118 1120 1119 1121 spin_lock(&tu->qlock); ··· 1140 1142 wake_up(&tu->qchange_sleep); 1141 1143 } 1142 1144 1143 - static void snd_timer_user_append_to_tqueue(snd_timer_user_t *tu, 1144 - snd_timer_tread_t *tread) 1145 + static void snd_timer_user_append_to_tqueue(struct snd_timer_user *tu, 1146 + struct snd_timer_tread *tread) 1145 1147 { 1146 1148 if (tu->qused >= tu->queue_size) { 1147 1149 tu->overrun++; ··· 1152 1154 } 1153 1155 } 1154 1156 1155 - static void snd_timer_user_ccallback(snd_timer_instance_t *timeri, 1156 - enum sndrv_timer_event event, 1157 + static void snd_timer_user_ccallback(struct snd_timer_instance *timeri, 1158 + int event, 1157 1159 struct timespec *tstamp, 1158 1160 unsigned long resolution) 1159 1161 { 1160 - snd_timer_user_t *tu = timeri->callback_data; 1161 - snd_timer_tread_t r1; 1162 + struct snd_timer_user *tu = timeri->callback_data; 1163 + struct snd_timer_tread r1; 1162 1164 1163 1165 if (event >= SNDRV_TIMER_EVENT_START && 1164 1166 event <= SNDRV_TIMER_EVENT_PAUSE) ··· 1175 1177 wake_up(&tu->qchange_sleep); 1176 1178 } 1177 1179 1178 - static void snd_timer_user_tinterrupt(snd_timer_instance_t *timeri, 1180 + static void snd_timer_user_tinterrupt(struct snd_timer_instance *timeri, 1179 1181 unsigned long resolution, 1180 1182 unsigned long ticks) 1181 1183 { 1182 - snd_timer_user_t *tu = timeri->callback_data; 1183 - snd_timer_tread_t *r, r1; 1184 + struct snd_timer_user *tu = timeri->callback_data; 1185 + struct snd_timer_tread *r, r1; 1184 1186 struct timespec tstamp; 1185 1187 int prev, append = 0; 1186 1188 ··· 1231 1233 1232 1234 static int snd_timer_user_open(struct inode *inode, struct file *file) 1233 1235 { 1234 - snd_timer_user_t *tu; 1236 + struct snd_timer_user *tu; 1235 1237 1236 1238 tu = kzalloc(sizeof(*tu), GFP_KERNEL); 1237 1239 if (tu == NULL) ··· 1241 1243 init_MUTEX(&tu->tread_sem); 1242 1244 tu->ticks = 1; 1243 1245 tu->queue_size = 128; 1244 - tu->queue = kmalloc(tu->queue_size * sizeof(snd_timer_read_t), 1246 + tu->queue = kmalloc(tu->queue_size * sizeof(struct snd_timer_read), 1245 1247 GFP_KERNEL); 1246 1248 if (tu->queue == NULL) { 1247 1249 kfree(tu); ··· 1253 1255 1254 1256 static int snd_timer_user_release(struct inode *inode, struct file *file) 1255 1257 { 1256 - snd_timer_user_t *tu; 1258 + struct snd_timer_user *tu; 1257 1259 1258 1260 if (file->private_data) { 1259 1261 tu = file->private_data; ··· 1268 1270 return 0; 1269 1271 } 1270 1272 1271 - static void snd_timer_user_zero_id(snd_timer_id_t *id) 1273 + static void snd_timer_user_zero_id(struct snd_timer_id *id) 1272 1274 { 1273 1275 id->dev_class = SNDRV_TIMER_CLASS_NONE; 1274 1276 id->dev_sclass = SNDRV_TIMER_SCLASS_NONE; ··· 1277 1279 id->subdevice = -1; 1278 1280 } 1279 1281 1280 - static void snd_timer_user_copy_id(snd_timer_id_t *id, snd_timer_t *timer) 1282 + static void snd_timer_user_copy_id(struct snd_timer_id *id, struct snd_timer *timer) 1281 1283 { 1282 1284 id->dev_class = timer->tmr_class; 1283 1285 id->dev_sclass = SNDRV_TIMER_SCLASS_NONE; ··· 1286 1288 id->subdevice = timer->tmr_subdevice; 1287 1289 } 1288 1290 1289 - static int snd_timer_user_next_device(snd_timer_id_t __user *_tid) 1291 + static int snd_timer_user_next_device(struct snd_timer_id __user *_tid) 1290 1292 { 1291 - snd_timer_id_t id; 1292 - snd_timer_t *timer; 1293 + struct snd_timer_id id; 1294 + struct snd_timer *timer; 1293 1295 struct list_head *p; 1294 1296 1295 1297 if (copy_from_user(&id, _tid, sizeof(id))) ··· 1300 1302 snd_timer_user_zero_id(&id); 1301 1303 else { 1302 1304 timer = list_entry(snd_timer_list.next, 1303 - snd_timer_t, device_list); 1305 + struct snd_timer, device_list); 1304 1306 snd_timer_user_copy_id(&id, timer); 1305 1307 } 1306 1308 } else { ··· 1308 1310 case SNDRV_TIMER_CLASS_GLOBAL: 1309 1311 id.device = id.device < 0 ? 0 : id.device + 1; 1310 1312 list_for_each(p, &snd_timer_list) { 1311 - timer = list_entry(p, snd_timer_t, device_list); 1313 + timer = list_entry(p, struct snd_timer, device_list); 1312 1314 if (timer->tmr_class > SNDRV_TIMER_CLASS_GLOBAL) { 1313 1315 snd_timer_user_copy_id(&id, timer); 1314 1316 break; ··· 1341 1343 } 1342 1344 } 1343 1345 list_for_each(p, &snd_timer_list) { 1344 - timer = list_entry(p, snd_timer_t, device_list); 1346 + timer = list_entry(p, struct snd_timer, device_list); 1345 1347 if (timer->tmr_class > id.dev_class) { 1346 1348 snd_timer_user_copy_id(&id, timer); 1347 1349 break; ··· 1383 1385 } 1384 1386 1385 1387 static int snd_timer_user_ginfo(struct file *file, 1386 - snd_timer_ginfo_t __user *_ginfo) 1388 + struct snd_timer_ginfo __user *_ginfo) 1387 1389 { 1388 - snd_timer_ginfo_t *ginfo; 1389 - snd_timer_id_t tid; 1390 - snd_timer_t *t; 1390 + struct snd_timer_ginfo *ginfo; 1391 + struct snd_timer_id tid; 1392 + struct snd_timer *t; 1391 1393 struct list_head *p; 1392 1394 int err = 0; 1393 1395 ··· 1428 1430 } 1429 1431 1430 1432 static int snd_timer_user_gparams(struct file *file, 1431 - snd_timer_gparams_t __user *_gparams) 1433 + struct snd_timer_gparams __user *_gparams) 1432 1434 { 1433 - snd_timer_gparams_t gparams; 1434 - snd_timer_t *t; 1435 + struct snd_timer_gparams gparams; 1436 + struct snd_timer *t; 1435 1437 int err; 1436 1438 1437 1439 if (copy_from_user(&gparams, _gparams, sizeof(gparams))) ··· 1457 1459 } 1458 1460 1459 1461 static int snd_timer_user_gstatus(struct file *file, 1460 - snd_timer_gstatus_t __user *_gstatus) 1462 + struct snd_timer_gstatus __user *_gstatus) 1461 1463 { 1462 - snd_timer_gstatus_t gstatus; 1463 - snd_timer_id_t tid; 1464 - snd_timer_t *t; 1464 + struct snd_timer_gstatus gstatus; 1465 + struct snd_timer_id tid; 1466 + struct snd_timer *t; 1465 1467 int err = 0; 1466 1468 1467 1469 if (copy_from_user(&gstatus, _gstatus, sizeof(gstatus))) ··· 1493 1495 } 1494 1496 1495 1497 static int snd_timer_user_tselect(struct file *file, 1496 - snd_timer_select_t __user *_tselect) 1498 + struct snd_timer_select __user *_tselect) 1497 1499 { 1498 - snd_timer_user_t *tu; 1499 - snd_timer_select_t tselect; 1500 + struct snd_timer_user *tu; 1501 + struct snd_timer_select tselect; 1500 1502 char str[32]; 1501 1503 int err = 0; 1502 1504 ··· 1522 1524 kfree(tu->tqueue); 1523 1525 tu->tqueue = NULL; 1524 1526 if (tu->tread) { 1525 - tu->tqueue = kmalloc(tu->queue_size * sizeof(snd_timer_tread_t), 1527 + tu->tqueue = kmalloc(tu->queue_size * sizeof(struct snd_timer_tread), 1526 1528 GFP_KERNEL); 1527 1529 if (tu->tqueue == NULL) 1528 1530 err = -ENOMEM; 1529 1531 } else { 1530 - tu->queue = kmalloc(tu->queue_size * sizeof(snd_timer_read_t), 1532 + tu->queue = kmalloc(tu->queue_size * sizeof(struct snd_timer_read), 1531 1533 GFP_KERNEL); 1532 1534 if (tu->queue == NULL) 1533 1535 err = -ENOMEM; ··· 1550 1552 } 1551 1553 1552 1554 static int snd_timer_user_info(struct file *file, 1553 - snd_timer_info_t __user *_info) 1555 + struct snd_timer_info __user *_info) 1554 1556 { 1555 - snd_timer_user_t *tu; 1556 - snd_timer_info_t *info; 1557 - snd_timer_t *t; 1557 + struct snd_timer_user *tu; 1558 + struct snd_timer_info *info; 1559 + struct snd_timer *t; 1558 1560 int err = 0; 1559 1561 1560 1562 tu = file->private_data; ··· 1578 1580 } 1579 1581 1580 1582 static int snd_timer_user_params(struct file *file, 1581 - snd_timer_params_t __user *_params) 1583 + struct snd_timer_params __user *_params) 1582 1584 { 1583 - snd_timer_user_t *tu; 1584 - snd_timer_params_t params; 1585 - snd_timer_t *t; 1586 - snd_timer_read_t *tr; 1587 - snd_timer_tread_t *ttr; 1585 + struct snd_timer_user *tu; 1586 + struct snd_timer_params params; 1587 + struct snd_timer *t; 1588 + struct snd_timer_read *tr; 1589 + struct snd_timer_tread *ttr; 1588 1590 int err; 1589 1591 1590 1592 tu = file->private_data; ··· 1654 1656 tu->qhead = tu->qtail = tu->qused = 0; 1655 1657 if (tu->timeri->flags & SNDRV_TIMER_IFLG_EARLY_EVENT) { 1656 1658 if (tu->tread) { 1657 - snd_timer_tread_t tread; 1659 + struct snd_timer_tread tread; 1658 1660 tread.event = SNDRV_TIMER_EVENT_EARLY; 1659 1661 tread.tstamp.tv_sec = 0; 1660 1662 tread.tstamp.tv_nsec = 0; 1661 1663 tread.val = 0; 1662 1664 snd_timer_user_append_to_tqueue(tu, &tread); 1663 1665 } else { 1664 - snd_timer_read_t *r = &tu->queue[0]; 1666 + struct snd_timer_read *r = &tu->queue[0]; 1665 1667 r->resolution = 0; 1666 1668 r->ticks = 0; 1667 1669 tu->qused++; ··· 1678 1680 } 1679 1681 1680 1682 static int snd_timer_user_status(struct file *file, 1681 - snd_timer_status_t __user *_status) 1683 + struct snd_timer_status __user *_status) 1682 1684 { 1683 - snd_timer_user_t *tu; 1684 - snd_timer_status_t status; 1685 + struct snd_timer_user *tu; 1686 + struct snd_timer_status status; 1685 1687 1686 1688 tu = file->private_data; 1687 1689 snd_assert(tu->timeri != NULL, return -ENXIO); ··· 1701 1703 static int snd_timer_user_start(struct file *file) 1702 1704 { 1703 1705 int err; 1704 - snd_timer_user_t *tu; 1706 + struct snd_timer_user *tu; 1705 1707 1706 1708 tu = file->private_data; 1707 1709 snd_assert(tu->timeri != NULL, return -ENXIO); ··· 1714 1716 static int snd_timer_user_stop(struct file *file) 1715 1717 { 1716 1718 int err; 1717 - snd_timer_user_t *tu; 1719 + struct snd_timer_user *tu; 1718 1720 1719 1721 tu = file->private_data; 1720 1722 snd_assert(tu->timeri != NULL, return -ENXIO); ··· 1724 1726 static int snd_timer_user_continue(struct file *file) 1725 1727 { 1726 1728 int err; 1727 - snd_timer_user_t *tu; 1729 + struct snd_timer_user *tu; 1728 1730 1729 1731 tu = file->private_data; 1730 1732 snd_assert(tu->timeri != NULL, return -ENXIO); ··· 1735 1737 static int snd_timer_user_pause(struct file *file) 1736 1738 { 1737 1739 int err; 1738 - snd_timer_user_t *tu; 1740 + struct snd_timer_user *tu; 1739 1741 1740 1742 tu = file->private_data; 1741 1743 snd_assert(tu->timeri != NULL, return -ENXIO); ··· 1752 1754 static long snd_timer_user_ioctl(struct file *file, unsigned int cmd, 1753 1755 unsigned long arg) 1754 1756 { 1755 - snd_timer_user_t *tu; 1757 + struct snd_timer_user *tu; 1756 1758 void __user *argp = (void __user *)arg; 1757 1759 int __user *p = argp; 1758 1760 ··· 1811 1813 1812 1814 static int snd_timer_user_fasync(int fd, struct file * file, int on) 1813 1815 { 1814 - snd_timer_user_t *tu; 1816 + struct snd_timer_user *tu; 1815 1817 int err; 1816 1818 1817 1819 tu = file->private_data; ··· 1824 1826 static ssize_t snd_timer_user_read(struct file *file, char __user *buffer, 1825 1827 size_t count, loff_t *offset) 1826 1828 { 1827 - snd_timer_user_t *tu; 1829 + struct snd_timer_user *tu; 1828 1830 long result = 0, unit; 1829 1831 int err = 0; 1830 1832 1831 1833 tu = file->private_data; 1832 - unit = tu->tread ? sizeof(snd_timer_tread_t) : sizeof(snd_timer_read_t); 1834 + unit = tu->tread ? sizeof(struct snd_timer_tread) : sizeof(struct snd_timer_read); 1833 1835 spin_lock_irq(&tu->qlock); 1834 1836 while ((long)count - result >= unit) { 1835 1837 while (!tu->qused) { ··· 1862 1864 1863 1865 if (tu->tread) { 1864 1866 if (copy_to_user(buffer, &tu->tqueue[tu->qhead++], 1865 - sizeof(snd_timer_tread_t))) { 1867 + sizeof(struct snd_timer_tread))) { 1866 1868 err = -EFAULT; 1867 1869 goto _error; 1868 1870 } 1869 1871 } else { 1870 1872 if (copy_to_user(buffer, &tu->queue[tu->qhead++], 1871 - sizeof(snd_timer_read_t))) { 1873 + sizeof(struct snd_timer_read))) { 1872 1874 err = -EFAULT; 1873 1875 goto _error; 1874 1876 } ··· 1890 1892 static unsigned int snd_timer_user_poll(struct file *file, poll_table * wait) 1891 1893 { 1892 1894 unsigned int mask; 1893 - snd_timer_user_t *tu; 1895 + struct snd_timer_user *tu; 1894 1896 1895 1897 tu = file->private_data; 1896 1898 ··· 1921 1923 .fasync = snd_timer_user_fasync, 1922 1924 }; 1923 1925 1924 - static snd_minor_t snd_timer_reg = 1926 + static struct snd_minor snd_timer_reg = 1925 1927 { 1926 1928 .comment = "timer", 1927 1929 .f_ops = &snd_timer_f_ops, ··· 1931 1933 * ENTRY functions 1932 1934 */ 1933 1935 1934 - static snd_info_entry_t *snd_timer_proc_entry = NULL; 1936 + static struct snd_info_entry *snd_timer_proc_entry = NULL; 1935 1937 1936 1938 static int __init alsa_timer_init(void) 1937 1939 { 1938 1940 int err; 1939 - snd_info_entry_t *entry; 1941 + struct snd_info_entry *entry; 1940 1942 1941 1943 #ifdef SNDRV_OSS_INFO_DEV_TIMERS 1942 1944 snd_oss_info_register(SNDRV_OSS_INFO_DEV_TIMERS, SNDRV_CARDS - 1, ··· 1969 1971 snd_unregister_device(SNDRV_DEVICE_TYPE_TIMER, NULL, 0); 1970 1972 /* unregister the system timer */ 1971 1973 list_for_each_safe(p, n, &snd_timer_list) { 1972 - snd_timer_t *timer = list_entry(p, snd_timer_t, device_list); 1974 + struct snd_timer *timer = list_entry(p, struct snd_timer, device_list); 1973 1975 snd_timer_unregister(timer); 1974 1976 } 1975 1977 if (snd_timer_proc_entry) {
+11 -11
sound/core/timer_compat.c
··· 22 22 23 23 #include <linux/compat.h> 24 24 25 - struct sndrv_timer_info32 { 25 + struct snd_timer_info32 { 26 26 u32 flags; 27 27 s32 card; 28 28 unsigned char id[64]; ··· 33 33 }; 34 34 35 35 static int snd_timer_user_info_compat(struct file *file, 36 - struct sndrv_timer_info32 __user *_info) 36 + struct snd_timer_info32 __user *_info) 37 37 { 38 - snd_timer_user_t *tu; 39 - struct sndrv_timer_info32 info; 40 - snd_timer_t *t; 38 + struct snd_timer_user *tu; 39 + struct snd_timer_info32 info; 40 + struct snd_timer *t; 41 41 42 42 tu = file->private_data; 43 43 snd_assert(tu->timeri != NULL, return -ENXIO); ··· 55 55 return 0; 56 56 } 57 57 58 - struct sndrv_timer_status32 { 58 + struct snd_timer_status32 { 59 59 struct compat_timespec tstamp; 60 60 u32 resolution; 61 61 u32 lost; ··· 65 65 }; 66 66 67 67 static int snd_timer_user_status_compat(struct file *file, 68 - struct sndrv_timer_status32 __user *_status) 68 + struct snd_timer_status32 __user *_status) 69 69 { 70 - snd_timer_user_t *tu; 71 - snd_timer_status_t status; 70 + struct snd_timer_user *tu; 71 + struct snd_timer_status status; 72 72 73 73 tu = file->private_data; 74 74 snd_assert(tu->timeri != NULL, return -ENXIO); ··· 89 89 */ 90 90 91 91 enum { 92 - SNDRV_TIMER_IOCTL_INFO32 = _IOR('T', 0x11, struct sndrv_timer_info32), 93 - SNDRV_TIMER_IOCTL_STATUS32 = _IOW('T', 0x14, struct sndrv_timer_status32), 92 + SNDRV_TIMER_IOCTL_INFO32 = _IOR('T', 0x11, struct snd_timer_info32), 93 + SNDRV_TIMER_IOCTL_STATUS32 = _IOW('T', 0x14, struct snd_timer_status32), 94 94 }; 95 95 96 96 static long snd_timer_user_ioctl_compat(struct file *file, unsigned int cmd, unsigned long arg)