diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2010-09-05 01:33:14 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-10-22 13:16:43 -0400 |
commit | 39aba963d937edb20db7d9d93e6dda5d2adfdcdd (patch) | |
tree | 7aa1898634ed6f6ece3e48f4b5464fcbcb4f49a5 /sound | |
parent | 807508c8ff9af6ce8f25c5ca5f3eb06a8e7d3286 (diff) |
driver core: remove CONFIG_SYSFS_DEPRECATED_V2 but keep it for block devices
This patch removes the old CONFIG_SYSFS_DEPRECATED_V2 config option,
but it keeps the logic around to handle block devices in the old manner
as some people like to run new kernel versions on old (pre 2007/2008)
distros.
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: "James E.J. Bottomley" <James.Bottomley@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/core/init.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/sound/core/init.c b/sound/core/init.c index ec4a50ce5656..f7c3df8b521b 100644 --- a/sound/core/init.c +++ b/sound/core/init.c | |||
@@ -395,12 +395,10 @@ int snd_card_disconnect(struct snd_card *card) | |||
395 | snd_printk(KERN_ERR "not all devices for card %i can be disconnected\n", card->number); | 395 | snd_printk(KERN_ERR "not all devices for card %i can be disconnected\n", card->number); |
396 | 396 | ||
397 | snd_info_card_disconnect(card); | 397 | snd_info_card_disconnect(card); |
398 | #ifndef CONFIG_SYSFS_DEPRECATED | ||
399 | if (card->card_dev) { | 398 | if (card->card_dev) { |
400 | device_unregister(card->card_dev); | 399 | device_unregister(card->card_dev); |
401 | card->card_dev = NULL; | 400 | card->card_dev = NULL; |
402 | } | 401 | } |
403 | #endif | ||
404 | #ifdef CONFIG_PM | 402 | #ifdef CONFIG_PM |
405 | wake_up(&card->power_sleep); | 403 | wake_up(&card->power_sleep); |
406 | #endif | 404 | #endif |
@@ -573,7 +571,6 @@ void snd_card_set_id(struct snd_card *card, const char *nid) | |||
573 | } | 571 | } |
574 | EXPORT_SYMBOL(snd_card_set_id); | 572 | EXPORT_SYMBOL(snd_card_set_id); |
575 | 573 | ||
576 | #ifndef CONFIG_SYSFS_DEPRECATED | ||
577 | static ssize_t | 574 | static ssize_t |
578 | card_id_show_attr(struct device *dev, | 575 | card_id_show_attr(struct device *dev, |
579 | struct device_attribute *attr, char *buf) | 576 | struct device_attribute *attr, char *buf) |
@@ -630,7 +627,6 @@ card_number_show_attr(struct device *dev, | |||
630 | 627 | ||
631 | static struct device_attribute card_number_attrs = | 628 | static struct device_attribute card_number_attrs = |
632 | __ATTR(number, S_IRUGO, card_number_show_attr, NULL); | 629 | __ATTR(number, S_IRUGO, card_number_show_attr, NULL); |
633 | #endif /* CONFIG_SYSFS_DEPRECATED */ | ||
634 | 630 | ||
635 | /** | 631 | /** |
636 | * snd_card_register - register the soundcard | 632 | * snd_card_register - register the soundcard |
@@ -649,7 +645,7 @@ int snd_card_register(struct snd_card *card) | |||
649 | 645 | ||
650 | if (snd_BUG_ON(!card)) | 646 | if (snd_BUG_ON(!card)) |
651 | return -EINVAL; | 647 | return -EINVAL; |
652 | #ifndef CONFIG_SYSFS_DEPRECATED | 648 | |
653 | if (!card->card_dev) { | 649 | if (!card->card_dev) { |
654 | card->card_dev = device_create(sound_class, card->dev, | 650 | card->card_dev = device_create(sound_class, card->dev, |
655 | MKDEV(0, 0), card, | 651 | MKDEV(0, 0), card, |
@@ -657,7 +653,7 @@ int snd_card_register(struct snd_card *card) | |||
657 | if (IS_ERR(card->card_dev)) | 653 | if (IS_ERR(card->card_dev)) |
658 | card->card_dev = NULL; | 654 | card->card_dev = NULL; |
659 | } | 655 | } |
660 | #endif | 656 | |
661 | if ((err = snd_device_register_all(card)) < 0) | 657 | if ((err = snd_device_register_all(card)) < 0) |
662 | return err; | 658 | return err; |
663 | mutex_lock(&snd_card_mutex); | 659 | mutex_lock(&snd_card_mutex); |
@@ -674,7 +670,6 @@ int snd_card_register(struct snd_card *card) | |||
674 | if (snd_mixer_oss_notify_callback) | 670 | if (snd_mixer_oss_notify_callback) |
675 | snd_mixer_oss_notify_callback(card, SND_MIXER_OSS_NOTIFY_REGISTER); | 671 | snd_mixer_oss_notify_callback(card, SND_MIXER_OSS_NOTIFY_REGISTER); |
676 | #endif | 672 | #endif |
677 | #ifndef CONFIG_SYSFS_DEPRECATED | ||
678 | if (card->card_dev) { | 673 | if (card->card_dev) { |
679 | err = device_create_file(card->card_dev, &card_id_attrs); | 674 | err = device_create_file(card->card_dev, &card_id_attrs); |
680 | if (err < 0) | 675 | if (err < 0) |
@@ -683,7 +678,7 @@ int snd_card_register(struct snd_card *card) | |||
683 | if (err < 0) | 678 | if (err < 0) |
684 | return err; | 679 | return err; |
685 | } | 680 | } |
686 | #endif | 681 | |
687 | return 0; | 682 | return 0; |
688 | } | 683 | } |
689 | 684 | ||