]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/isa/ad1848/ad1848.c
ALSA: remove direct access of dev->bus_id in sound/isa/*
[linux-2.6-omap-h63xx.git] / sound / isa / ad1848 / ad1848.c
index d09a7fa86545d80709330e9d92cd5a23672ab595..223a6c038819217a2d5bfb74e81bfd6a56ba1d86 100644 (file)
@@ -1,8 +1,8 @@
 /*
  *  Generic driver for AD1848/AD1847/CS4248 chips (0.1 Alpha)
  *  Copyright (c) by Tugrul Galatali <galatalt@stuy.edu>,
- *                   Jaroslav Kysela <perex@suse.cz>
- *  Based on card-4232.c by Jaroslav Kysela <perex@suse.cz>
+ *                   Jaroslav Kysela <perex@perex.cz>
+ *  Based on card-4232.c by Jaroslav Kysela <perex@perex.cz>
  *
  *
  *   This program is free software; you can redistribute it and/or modify
@@ -21,7 +21,6 @@
  *
  */
 
-#include <sound/driver.h>
 #include <linux/init.h>
 #include <linux/err.h>
 #include <linux/isa.h>
 #include <linux/wait.h>
 #include <linux/moduleparam.h>
 #include <sound/core.h>
-#include <sound/ad1848.h>
+#include <sound/wss.h>
 #include <sound/initval.h>
 
 #define CRD_NAME "Generic AD1848/AD1847/CS4248"
 #define DEV_NAME "ad1848"
 
 MODULE_DESCRIPTION(CRD_NAME);
-MODULE_AUTHOR("Tugrul Galatali <galatalt@stuy.edu>, Jaroslav Kysela <perex@suse.cz>");
+MODULE_AUTHOR("Tugrul Galatali <galatalt@stuy.edu>, Jaroslav Kysela <perex@perex.cz>");
 MODULE_LICENSE("GPL");
 MODULE_SUPPORTED_DEVICE("{{Analog Devices,AD1848},"
                "{Analog Devices,AD1847},"
@@ -71,15 +70,15 @@ static int __devinit snd_ad1848_match(struct device *dev, unsigned int n)
                return 0;
 
        if (port[n] == SNDRV_AUTO_PORT) {
-               snd_printk(KERN_ERR "%s: please specify port\n", dev->bus_id);
+               dev_err(dev, "please specify port\n");
                return 0;
        }
        if (irq[n] == SNDRV_AUTO_IRQ) {
-               snd_printk(KERN_ERR "%s: please specify irq\n", dev->bus_id);
+               dev_err(dev, "please specify irq\n");
                return 0;       
        }
        if (dma1[n] == SNDRV_AUTO_DMA) {
-               snd_printk(KERN_ERR "%s: please specify dma1\n", dev->bus_id);
+               dev_err(dev, "please specify dma1\n");
                return 0;
        }
        return 1;
@@ -88,7 +87,7 @@ static int __devinit snd_ad1848_match(struct device *dev, unsigned int n)
 static int __devinit snd_ad1848_probe(struct device *dev, unsigned int n)
 {
        struct snd_card *card;
-       struct snd_ad1848 *chip;
+       struct snd_wss *chip;
        struct snd_pcm *pcm;
        int error;
 
@@ -96,18 +95,19 @@ static int __devinit snd_ad1848_probe(struct device *dev, unsigned int n)
        if (!card)
                return -EINVAL;
 
-       error = snd_ad1848_create(card, port[n], irq[n], dma1[n],
-                       thinkpad[n] ? AD1848_HW_THINKPAD : AD1848_HW_DETECT, &chip);
+       error = snd_wss_create(card, port[n], -1, irq[n], dma1[n], -1,
+                       thinkpad[n] ? WSS_HW_THINKPAD : WSS_HW_DETECT,
+                       0, &chip);
        if (error < 0)
                goto out;
 
        card->private_data = chip;
 
-       error = snd_ad1848_pcm(chip, 0, &pcm);
+       error = snd_wss_pcm(chip, 0, &pcm);
        if (error < 0)
                goto out;
 
-       error = snd_ad1848_mixer(chip);
+       error = snd_wss_mixer(chip);
        if (error < 0)
                goto out;
 
@@ -143,7 +143,7 @@ static int __devexit snd_ad1848_remove(struct device *dev, unsigned int n)
 static int snd_ad1848_suspend(struct device *dev, unsigned int n, pm_message_t state)
 {
        struct snd_card *card = dev_get_drvdata(dev);
-       struct snd_ad1848 *chip = card->private_data;
+       struct snd_wss *chip = card->private_data;
 
        snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
        chip->suspend(chip);
@@ -153,7 +153,7 @@ static int snd_ad1848_suspend(struct device *dev, unsigned int n, pm_message_t s
 static int snd_ad1848_resume(struct device *dev, unsigned int n)
 {
        struct snd_card *card = dev_get_drvdata(dev);
-       struct snd_ad1848 *chip = card->private_data;
+       struct snd_wss *chip = card->private_data;
 
        chip->resume(chip);
        snd_power_change_state(card, SNDRV_CTL_POWER_D0);