X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sound%2Fpci%2Ffm801.c;h=f21a17dda09408678d11822f1f6f8620e386c640;hb=2c66a62d2d9e2315e6e748b96643f7f141c4d017;hp=b4c16b33a0eccbf18c03ad87748a9370b3ea8307;hpb=86090fcac5e27b630656fe3d963a6b80e26dac44;p=linux-2.6.git diff --git a/sound/pci/fm801.c b/sound/pci/fm801.c index b4c16b33a..f21a17dda 100644 --- a/sound/pci/fm801.c +++ b/sound/pci/fm801.c @@ -25,12 +25,12 @@ #include #include #include +#include #include #include #include #include #include -#define SNDRV_GET_ID #include #include @@ -60,17 +60,18 @@ static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable this card * * High 16-bits are video (radio) device number + 1 */ static int tea575x_tuner[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = 0 }; +static int boot_devs; -MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i"); +module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for the FM801 soundcard."); MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); -MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s"); +module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for the FM801 soundcard."); MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); -MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i"); +module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable FM801 soundcard."); MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); -MODULE_PARM(tea575x_tuner, "1-" __MODULE_STRING(SNDRV_CARDS) "i"); +module_param_array(tea575x_tuner, bool, boot_devs, 0444); MODULE_PARM_DESC(tea575x_tuner, "Enable TEA575x tuner."); MODULE_PARM_SYNTAX(tea575x_tuner, SNDRV_ENABLE_DESC); @@ -1482,15 +1483,7 @@ static struct pci_driver driver = { static int __init alsa_card_fm801_init(void) { - int err; - - if ((err = pci_module_init(&driver)) < 0) { -#ifdef MODULE - printk(KERN_ERR "ForteMedia FM801 soundcard not found or device busy\n"); -#endif - return err; - } - return 0; + return pci_module_init(&driver); } static void __exit alsa_card_fm801_exit(void) @@ -1500,25 +1493,3 @@ static void __exit alsa_card_fm801_exit(void) module_init(alsa_card_fm801_init) module_exit(alsa_card_fm801_exit) - -#ifndef MODULE - -/* format is: snd-fm801=enable,index,id,tea575x_tuner */ - -static int __init alsa_card_fm801_setup(char *str) -{ - static unsigned __initdata nr_dev = 0; - - if (nr_dev >= SNDRV_CARDS) - return 0; - (void)(get_option(&str,&enable[nr_dev]) == 2 && - get_option(&str,&index[nr_dev]) == 2 && - get_id(&str,&id[nr_dev]) == 2 && - get_option(&str,&tea575x_tuner[nr_dev])); - nr_dev++; - return 1; -} - -__setup("snd-fm801=", alsa_card_fm801_setup); - -#endif /* ifndef MODULE */