aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb/usx2y/usbusx2y.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-17 09:08:26 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:19:56 -0500
commitbbe85bbd02b2220c819ad1e33c9d6327131ad281 (patch)
treef22dffee1b6211dae18ac7946facbb7add845ca3 /sound/usb/usx2y/usbusx2y.c
parent86e07d34658bb85b3424f4db64fa28f884edbe8d (diff)
[ALSA] Remove xxx_t typedefs: USB-USX2Y
Modules: USB USX2Y Remove xxx_t typedefs from the USB-USX2Y driver. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/usx2y/usbusx2y.c')
-rw-r--r--sound/usb/usx2y/usbusx2y.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/sound/usb/usx2y/usbusx2y.c b/sound/usb/usx2y/usbusx2y.c
index 412c2e52d867..9807c3d7b1a4 100644
--- a/sound/usb/usx2y/usbusx2y.c
+++ b/sound/usb/usx2y/usbusx2y.c
@@ -167,28 +167,28 @@ MODULE_PARM_DESC(enable, "Enable "NAME_ALLCAPS".");
167static int snd_usX2Y_card_used[SNDRV_CARDS]; 167static int snd_usX2Y_card_used[SNDRV_CARDS];
168 168
169static void usX2Y_usb_disconnect(struct usb_device* usb_device, void* ptr); 169static void usX2Y_usb_disconnect(struct usb_device* usb_device, void* ptr);
170static void snd_usX2Y_card_private_free(snd_card_t *card); 170static void snd_usX2Y_card_private_free(struct snd_card *card);
171 171
172/* 172/*
173 * pipe 4 is used for switching the lamps, setting samplerate, volumes .... 173 * pipe 4 is used for switching the lamps, setting samplerate, volumes ....
174 */ 174 */
175static void i_usX2Y_Out04Int(struct urb* urb, struct pt_regs *regs) 175static void i_usX2Y_Out04Int(struct urb *urb, struct pt_regs *regs)
176{ 176{
177#ifdef CONFIG_SND_DEBUG 177#ifdef CONFIG_SND_DEBUG
178 if (urb->status) { 178 if (urb->status) {
179 int i; 179 int i;
180 usX2Ydev_t* usX2Y = urb->context; 180 struct usX2Ydev *usX2Y = urb->context;
181 for (i = 0; i < 10 && usX2Y->AS04.urb[i] != urb; i++); 181 for (i = 0; i < 10 && usX2Y->AS04.urb[i] != urb; i++);
182 snd_printdd("i_usX2Y_Out04Int() urb %i status=%i\n", i, urb->status); 182 snd_printdd("i_usX2Y_Out04Int() urb %i status=%i\n", i, urb->status);
183 } 183 }
184#endif 184#endif
185} 185}
186 186
187static void i_usX2Y_In04Int(struct urb* urb, struct pt_regs *regs) 187static void i_usX2Y_In04Int(struct urb *urb, struct pt_regs *regs)
188{ 188{
189 int err = 0; 189 int err = 0;
190 usX2Ydev_t *usX2Y = urb->context; 190 struct usX2Ydev *usX2Y = urb->context;
191 us428ctls_sharedmem_t *us428ctls = usX2Y->us428ctls_sharedmem; 191 struct us428ctls_sharedmem *us428ctls = usX2Y->us428ctls_sharedmem;
192 192
193 usX2Y->In04IntCalls++; 193 usX2Y->In04IntCalls++;
194 194
@@ -239,10 +239,10 @@ static void i_usX2Y_In04Int(struct urb* urb, struct pt_regs *regs)
239 send = 0; 239 send = 0;
240 for (j = 0; j < URBS_AsyncSeq && !err; ++j) 240 for (j = 0; j < URBS_AsyncSeq && !err; ++j)
241 if (0 == usX2Y->AS04.urb[j]->status) { 241 if (0 == usX2Y->AS04.urb[j]->status) {
242 us428_p4out_t *p4out = us428ctls->p4out + send; // FIXME if more then 1 p4out is new, 1 gets lost. 242 struct us428_p4out *p4out = us428ctls->p4out + send; // FIXME if more then 1 p4out is new, 1 gets lost.
243 usb_fill_bulk_urb(usX2Y->AS04.urb[j], usX2Y->chip.dev, 243 usb_fill_bulk_urb(usX2Y->AS04.urb[j], usX2Y->chip.dev,
244 usb_sndbulkpipe(usX2Y->chip.dev, 0x04), &p4out->val.vol, 244 usb_sndbulkpipe(usX2Y->chip.dev, 0x04), &p4out->val.vol,
245 p4out->type == eLT_Light ? sizeof(us428_lights_t) : 5, 245 p4out->type == eLT_Light ? sizeof(struct us428_lights) : 5,
246 i_usX2Y_Out04Int, usX2Y); 246 i_usX2Y_Out04Int, usX2Y);
247 err = usb_submit_urb(usX2Y->AS04.urb[j], GFP_ATOMIC); 247 err = usb_submit_urb(usX2Y->AS04.urb[j], GFP_ATOMIC);
248 us428ctls->p4outSent = send; 248 us428ctls->p4outSent = send;
@@ -261,7 +261,7 @@ static void i_usX2Y_In04Int(struct urb* urb, struct pt_regs *regs)
261/* 261/*
262 * Prepare some urbs 262 * Prepare some urbs
263 */ 263 */
264int usX2Y_AsyncSeq04_init(usX2Ydev_t* usX2Y) 264int usX2Y_AsyncSeq04_init(struct usX2Ydev *usX2Y)
265{ 265{
266 int err = 0, 266 int err = 0,
267 i; 267 i;
@@ -283,7 +283,7 @@ int usX2Y_AsyncSeq04_init(usX2Ydev_t* usX2Y)
283 return err; 283 return err;
284} 284}
285 285
286int usX2Y_In04_init(usX2Ydev_t* usX2Y) 286int usX2Y_In04_init(struct usX2Ydev *usX2Y)
287{ 287{
288 if (! (usX2Y->In04urb = usb_alloc_urb(0, GFP_KERNEL))) 288 if (! (usX2Y->In04urb = usb_alloc_urb(0, GFP_KERNEL)))
289 return -ENOMEM; 289 return -ENOMEM;
@@ -301,7 +301,7 @@ int usX2Y_In04_init(usX2Ydev_t* usX2Y)
301 return usb_submit_urb(usX2Y->In04urb, GFP_KERNEL); 301 return usb_submit_urb(usX2Y->In04urb, GFP_KERNEL);
302} 302}
303 303
304static void usX2Y_unlinkSeq(snd_usX2Y_AsyncSeq_t* S) 304static void usX2Y_unlinkSeq(struct snd_usX2Y_AsyncSeq *S)
305{ 305{
306 int i; 306 int i;
307 for (i = 0; i < URBS_AsyncSeq; ++i) { 307 for (i = 0; i < URBS_AsyncSeq; ++i) {
@@ -334,16 +334,16 @@ static struct usb_device_id snd_usX2Y_usb_id_table[] = {
334 { /* terminator */ } 334 { /* terminator */ }
335}; 335};
336 336
337static snd_card_t* usX2Y_create_card(struct usb_device* device) 337static struct snd_card *usX2Y_create_card(struct usb_device *device)
338{ 338{
339 int dev; 339 int dev;
340 snd_card_t* card; 340 struct snd_card * card;
341 for (dev = 0; dev < SNDRV_CARDS; ++dev) 341 for (dev = 0; dev < SNDRV_CARDS; ++dev)
342 if (enable[dev] && !snd_usX2Y_card_used[dev]) 342 if (enable[dev] && !snd_usX2Y_card_used[dev])
343 break; 343 break;
344 if (dev >= SNDRV_CARDS) 344 if (dev >= SNDRV_CARDS)
345 return NULL; 345 return NULL;
346 card = snd_card_new(index[dev], id[dev], THIS_MODULE, sizeof(usX2Ydev_t)); 346 card = snd_card_new(index[dev], id[dev], THIS_MODULE, sizeof(struct usX2Ydev));
347 if (!card) 347 if (!card)
348 return NULL; 348 return NULL;
349 snd_usX2Y_card_used[usX2Y(card)->chip.index = dev] = 1; 349 snd_usX2Y_card_used[usX2Y(card)->chip.index = dev] = 1;
@@ -367,10 +367,10 @@ static snd_card_t* usX2Y_create_card(struct usb_device* device)
367} 367}
368 368
369 369
370static void* usX2Y_usb_probe(struct usb_device* device, struct usb_interface *intf, const struct usb_device_id* device_id) 370static void *usX2Y_usb_probe(struct usb_device *device, struct usb_interface *intf, const struct usb_device_id *device_id)
371{ 371{
372 int err; 372 int err;
373 snd_card_t* card; 373 struct snd_card * card;
374 if (le16_to_cpu(device->descriptor.idVendor) != 0x1604 || 374 if (le16_to_cpu(device->descriptor.idVendor) != 0x1604 ||
375 (le16_to_cpu(device->descriptor.idProduct) != USB_ID_US122 && 375 (le16_to_cpu(device->descriptor.idProduct) != USB_ID_US122 &&
376 le16_to_cpu(device->descriptor.idProduct) != USB_ID_US224 && 376 le16_to_cpu(device->descriptor.idProduct) != USB_ID_US224 &&
@@ -414,7 +414,7 @@ static struct usb_driver snd_usX2Y_usb_driver = {
414 .id_table = snd_usX2Y_usb_id_table, 414 .id_table = snd_usX2Y_usb_id_table,
415}; 415};
416 416
417static void snd_usX2Y_card_private_free(snd_card_t *card) 417static void snd_usX2Y_card_private_free(struct snd_card *card)
418{ 418{
419 kfree(usX2Y(card)->In04Buf); 419 kfree(usX2Y(card)->In04Buf);
420 usb_free_urb(usX2Y(card)->In04urb); 420 usb_free_urb(usX2Y(card)->In04urb);
@@ -427,11 +427,11 @@ static void snd_usX2Y_card_private_free(snd_card_t *card)
427/* 427/*
428 * Frees the device. 428 * Frees the device.
429 */ 429 */
430static void usX2Y_usb_disconnect(struct usb_device* device, void* ptr) 430static void usX2Y_usb_disconnect(struct usb_device *device, void* ptr)
431{ 431{
432 if (ptr) { 432 if (ptr) {
433 snd_card_t *card = ptr; 433 struct snd_card *card = ptr;
434 usX2Ydev_t* usX2Y = usX2Y(card); 434 struct usX2Ydev *usX2Y = usX2Y(card);
435 struct list_head *p; 435 struct list_head *p;
436 usX2Y->chip.shutdown = 1; 436 usX2Y->chip.shutdown = 1;
437 usX2Y->chip_status = USX2Y_STAT_CHIP_HUP; 437 usX2Y->chip_status = USX2Y_STAT_CHIP_HUP;