-static int sscape_cards __devinitdata;
-static struct params sscape_params[SNDRV_CARDS] __devinitdata;
+static int __devinit snd_sscape_probe(struct platform_device *pdev)
+{
+ int dev = pdev->id;
+ struct snd_card *card;
+ int ret;
+
+ dma[dev] &= 0x03;
+ ret = create_sscape(dev, &card);
+ if (ret < 0)
+ return ret;
+ snd_card_set_dev(card, &pdev->dev);
+ if ((ret = snd_card_register(card)) < 0) {
+ printk(KERN_ERR "sscape: Failed to register sound card\n");
+ return ret;
+ }
+ platform_set_drvdata(pdev, card);
+ return 0;
+}
+
+static int __devexit snd_sscape_remove(struct platform_device *devptr)
+{
+ snd_card_free(platform_get_drvdata(devptr));
+ platform_set_drvdata(devptr, NULL);
+ return 0;
+}
+
+#define SSCAPE_DRIVER "snd_sscape"
+
+static struct platform_driver snd_sscape_driver = {
+ .probe = snd_sscape_probe,
+ .remove = __devexit_p(snd_sscape_remove),
+ /* FIXME: suspend/resume */
+ .driver = {
+ .name = SSCAPE_DRIVER
+ },
+};