- int i, cards;
-
- if (platform_driver_register(&snd_adlib_driver) < 0) {
- snd_printk(KERN_ERR DRV_NAME ": could not register driver\n");
- return -ENODEV;
- }
-
- for (cards = 0, i = 0; i < SNDRV_CARDS; i++) {
- struct platform_device *device;
-
- if (!enable[i])
- continue;
-
- device = platform_device_register_simple(DRV_NAME, i, NULL, 0);
- if (IS_ERR(device))
- continue;
-
- if (!platform_get_drvdata(device)) {
- platform_device_unregister(device);
- continue;
- }
-
- devices[i] = device;
- cards++;
- }
-
- if (!cards) {
-#ifdef MODULE
- printk(KERN_ERR CRD_NAME " soundcard not found or device busy\n");
-#endif
- platform_driver_unregister(&snd_adlib_driver);
- return -ENODEV;
- }
- return 0;