]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/s390/char/vmlogrdr.c
[S390] bus_id -> dev_name conversions
[linux-2.6-omap-h63xx.git] / drivers / s390 / char / vmlogrdr.c
index a246bc73ae6430b5761a47ccc90305c7564da9e4..036e650e8b9c53b5a8bc2dac305ed714b44d4c6e 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/kmod.h>
 #include <linux/cdev.h>
 #include <linux/device.h>
+#include <linux/smp_lock.h>
 #include <linux/string.h>
 
 
@@ -310,9 +311,11 @@ static int vmlogrdr_open (struct inode *inode, struct file *filp)
                return -ENOSYS;
 
        /* Besure this device hasn't already been opened */
+       lock_kernel();
        spin_lock_bh(&logptr->priv_lock);
        if (logptr->dev_in_use) {
                spin_unlock_bh(&logptr->priv_lock);
+               unlock_kernel();
                return -EBUSY;
        }
        logptr->dev_in_use = 1;
@@ -356,7 +359,9 @@ static int vmlogrdr_open (struct inode *inode, struct file *filp)
                   || (logptr->iucv_path_severed));
        if (logptr->iucv_path_severed)
                goto out_record;
-       return nonseekable_open(inode, filp);
+       ret = nonseekable_open(inode, filp);
+       unlock_kernel();
+       return ret;
 
 out_record:
        if (logptr->autorecording)
@@ -366,6 +371,7 @@ out_path:
        logptr->path = NULL;
 out_dev:
        logptr->dev_in_use = 0;
+       unlock_kernel();
        return -EIO;
 }
 
@@ -745,7 +751,7 @@ static int vmlogrdr_register_device(struct vmlogrdr_priv_t *priv)
        priv->class_device = device_create_drvdata(vmlogrdr_class, dev,
                                                   MKDEV(vmlogrdr_major,
                                                         priv->minor_num),
-                                                  priv, "%s", dev->bus_id);
+                                                  priv, "%s", dev_name(dev));
        if (IS_ERR(priv->class_device)) {
                ret = PTR_ERR(priv->class_device);
                priv->class_device=NULL;