aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/oxygen/virtuoso.c
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2009-02-19 02:37:13 -0500
committerTakashi Iwai <tiwai@suse.de>2009-02-19 04:22:22 -0500
commitbb71858853a5c9616eea98512f4075d4f081154d (patch)
tree62447849ac3a255219029d99ee29557ad9c8de76 /sound/pci/oxygen/virtuoso.c
parenta5e0e970c06065a14844b406a0c2a59776a1ccc6 (diff)
sound: oxygen: make the owner module a parameter of the probe function
Move the owner field out of the oxygen_model structure and make it a parameter of oxygen_pci_probe(), because the actual owner module does not depend on the card model. Furthermore, moving it out of the model structure allows us to create the card structure before the actual model is known. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/oxygen/virtuoso.c')
-rw-r--r--sound/pci/oxygen/virtuoso.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/sound/pci/oxygen/virtuoso.c b/sound/pci/oxygen/virtuoso.c
index 6c870c12a177..c05f7e7bdb34 100644
--- a/sound/pci/oxygen/virtuoso.c
+++ b/sound/pci/oxygen/virtuoso.c
@@ -816,7 +816,6 @@ static int xonar_model_probe(struct oxygen *chip, unsigned long driver_data)
816static const struct oxygen_model model_xonar_d2 = { 816static const struct oxygen_model model_xonar_d2 = {
817 .longname = "Asus Virtuoso 200", 817 .longname = "Asus Virtuoso 200",
818 .chip = "AV200", 818 .chip = "AV200",
819 .owner = THIS_MODULE,
820 .probe = xonar_model_probe, 819 .probe = xonar_model_probe,
821 .init = xonar_d2_init, 820 .init = xonar_d2_init,
822 .control_filter = xonar_d2_control_filter, 821 .control_filter = xonar_d2_control_filter,
@@ -849,7 +848,6 @@ static const struct oxygen_model model_xonar_d2 = {
849static const struct oxygen_model model_xonar_d1 = { 848static const struct oxygen_model model_xonar_d1 = {
850 .longname = "Asus Virtuoso 100", 849 .longname = "Asus Virtuoso 100",
851 .chip = "AV200", 850 .chip = "AV200",
852 .owner = THIS_MODULE,
853 .probe = xonar_model_probe, 851 .probe = xonar_model_probe,
854 .init = xonar_d1_init, 852 .init = xonar_d1_init,
855 .control_filter = xonar_d1_control_filter, 853 .control_filter = xonar_d1_control_filter,
@@ -878,7 +876,6 @@ static const struct oxygen_model model_xonar_d1 = {
878static const struct oxygen_model model_xonar_hdav = { 876static const struct oxygen_model model_xonar_hdav = {
879 .longname = "Asus Virtuoso 200", 877 .longname = "Asus Virtuoso 200",
880 .chip = "AV200", 878 .chip = "AV200",
881 .owner = THIS_MODULE,
882 .probe = xonar_model_probe, 879 .probe = xonar_model_probe,
883 .init = xonar_hdav_init, 880 .init = xonar_hdav_init,
884 .cleanup = xonar_hdav_cleanup, 881 .cleanup = xonar_hdav_cleanup,
@@ -925,7 +922,7 @@ static int __devinit xonar_probe(struct pci_dev *pci,
925 return -ENOENT; 922 return -ENOENT;
926 } 923 }
927 BUG_ON(pci_id->driver_data >= ARRAY_SIZE(models)); 924 BUG_ON(pci_id->driver_data >= ARRAY_SIZE(models));
928 err = oxygen_pci_probe(pci, index[dev], id[dev], 925 err = oxygen_pci_probe(pci, index[dev], id[dev], THIS_MODULE,
929 models[pci_id->driver_data], 926 models[pci_id->driver_data],
930 pci_id->driver_data); 927 pci_id->driver_data);
931 if (err >= 0) 928 if (err >= 0)