init.c (2502991560dc8244dbe10e48473d85722c1e2ec1) | init.c (abe9ab8f62203ced11119fb96acc3b8dd107ebc4) |
---|---|
1/* 2 * Initialization routines 3 * Copyright (c) by Jaroslav Kysela <perex@perex.cz> 4 * 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or --- 535 unchanged lines hidden (view full) --- 544int snd_card_register(struct snd_card *card) 545{ 546 int err; 547 548 if (snd_BUG_ON(!card)) 549 return -EINVAL; 550#ifndef CONFIG_SYSFS_DEPRECATED 551 if (!card->card_dev) { | 1/* 2 * Initialization routines 3 * Copyright (c) by Jaroslav Kysela <perex@perex.cz> 4 * 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or --- 535 unchanged lines hidden (view full) --- 544int snd_card_register(struct snd_card *card) 545{ 546 int err; 547 548 if (snd_BUG_ON(!card)) 549 return -EINVAL; 550#ifndef CONFIG_SYSFS_DEPRECATED 551 if (!card->card_dev) { |
552 card->card_dev = device_create_drvdata(sound_class, card->dev, 553 MKDEV(0, 0), NULL, 554 "card%i", card->number); | 552 card->card_dev = device_create(sound_class, card->dev, 553 MKDEV(0, 0), NULL, 554 "card%i", card->number); |
555 if (IS_ERR(card->card_dev)) 556 card->card_dev = NULL; 557 } 558#endif 559 if ((err = snd_device_register_all(card)) < 0) 560 return err; 561 mutex_lock(&snd_card_mutex); 562 if (snd_cards[card->number]) { --- 285 unchanged lines hidden --- | 555 if (IS_ERR(card->card_dev)) 556 card->card_dev = NULL; 557 } 558#endif 559 if ((err = snd_device_register_all(card)) < 0) 560 return err; 561 mutex_lock(&snd_card_mutex); 562 if (snd_cards[card->number]) { --- 285 unchanged lines hidden --- |