diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-02-25 03:48:45 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-02-25 03:48:45 -0500 |
commit | aacfddfdadb3540651d263245069631f341e953a (patch) | |
tree | fc3c898beb0f80d00b5f2b54977d10b5a96ff328 /sound | |
parent | d28215996b0c3a900411769039aa3c54cf7008ab (diff) |
ALSA: bt87x: Make load_all parameter working again
Along with a clean up commit [e9f66d9b9: ALSA: pci: clean up using
module_pci_driver()], bt87x driver lost the functionality of load_all
parameter. This patch does a partial revert of the commit only for
bt87x.c to recover it.
Reported-by: Clemens Ladisch <cladisch@googlemail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/bt87x.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/sound/pci/bt87x.c b/sound/pci/bt87x.c index cdd100dae855..9febe5509748 100644 --- a/sound/pci/bt87x.c +++ b/sound/pci/bt87x.c | |||
@@ -836,6 +836,8 @@ static struct { | |||
836 | {0x7063, 0x2000}, /* pcHDTV HD-2000 TV */ | 836 | {0x7063, 0x2000}, /* pcHDTV HD-2000 TV */ |
837 | }; | 837 | }; |
838 | 838 | ||
839 | static struct pci_driver driver; | ||
840 | |||
839 | /* return the id of the card, or a negative value if it's blacklisted */ | 841 | /* return the id of the card, or a negative value if it's blacklisted */ |
840 | static int snd_bt87x_detect_card(struct pci_dev *pci) | 842 | static int snd_bt87x_detect_card(struct pci_dev *pci) |
841 | { | 843 | { |
@@ -962,11 +964,24 @@ static DEFINE_PCI_DEVICE_TABLE(snd_bt87x_default_ids) = { | |||
962 | { } | 964 | { } |
963 | }; | 965 | }; |
964 | 966 | ||
965 | static struct pci_driver bt87x_driver = { | 967 | static struct pci_driver driver = { |
966 | .name = KBUILD_MODNAME, | 968 | .name = KBUILD_MODNAME, |
967 | .id_table = snd_bt87x_ids, | 969 | .id_table = snd_bt87x_ids, |
968 | .probe = snd_bt87x_probe, | 970 | .probe = snd_bt87x_probe, |
969 | .remove = snd_bt87x_remove, | 971 | .remove = snd_bt87x_remove, |
970 | }; | 972 | }; |
971 | 973 | ||
972 | module_pci_driver(bt87x_driver); | 974 | static int __init alsa_card_bt87x_init(void) |
975 | { | ||
976 | if (load_all) | ||
977 | driver.id_table = snd_bt87x_default_ids; | ||
978 | return pci_register_driver(&driver); | ||
979 | } | ||
980 | |||
981 | static void __exit alsa_card_bt87x_exit(void) | ||
982 | { | ||
983 | pci_unregister_driver(&driver); | ||
984 | } | ||
985 | |||
986 | module_init(alsa_card_bt87x_init) | ||
987 | module_exit(alsa_card_bt87x_exit) | ||