rps: avoid one atomic in enqueue_to_backlog
[safe/jmp/linux-2.6] / sound / isa / adlib.c
index d687207..7465ae0 100644 (file)
@@ -2,7 +2,6 @@
  * AdLib FM card driver.
  */
 
-#include <sound/driver.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/isa.h>
@@ -37,7 +36,7 @@ static int __devinit snd_adlib_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;
        }
        return 1;
@@ -54,15 +53,15 @@ static int __devinit snd_adlib_probe(struct device *dev, unsigned int n)
        struct snd_opl3 *opl3;
        int error;
 
-       card = snd_card_new(index[n], id[n], THIS_MODULE, 0);
-       if (!card) {
-               snd_printk(KERN_ERR "%s: could not create card\n", dev->bus_id);
-               return -EINVAL;
+       error = snd_card_create(index[n], id[n], THIS_MODULE, 0, &card);
+       if (error < 0) {
+               dev_err(dev, "could not create card\n");
+               return error;
        }
 
        card->private_data = request_region(port[n], 4, CRD_NAME);
        if (!card->private_data) {
-               snd_printk(KERN_ERR "%s: could not grab ports\n", dev->bus_id);
+               dev_err(dev, "could not grab ports\n");
                error = -EBUSY;
                goto out;
        }
@@ -74,13 +73,13 @@ static int __devinit snd_adlib_probe(struct device *dev, unsigned int n)
 
        error = snd_opl3_create(card, port[n], port[n] + 2, OPL3_HW_AUTO, 1, &opl3);
        if (error < 0) {
-               snd_printk(KERN_ERR "%s: could not create OPL\n", dev->bus_id);
+               dev_err(dev, "could not create OPL\n");
                goto out;
        }
 
        error = snd_opl3_hwdep_new(opl3, 0, 0, NULL);
        if (error < 0) {
-               snd_printk(KERN_ERR "%s: could not create FM\n", dev->bus_id);
+               dev_err(dev, "could not create FM\n");
                goto out;
        }
 
@@ -88,7 +87,7 @@ static int __devinit snd_adlib_probe(struct device *dev, unsigned int n)
 
        error = snd_card_register(card);
        if (error < 0) {
-               snd_printk(KERN_ERR "%s: could not register card\n", dev->bus_id);
+               dev_err(dev, "could not register card\n");
                goto out;
        }