]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/parisc/pdc_stable.c
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma
[linux.git] / drivers / parisc / pdc_stable.c
index 055f83fddc188d42e37869b4d403dfab635c9461..b1ff46fe45478e35904f13b4c4a4e2445706533b 100644 (file)
@@ -333,11 +333,11 @@ pdcspath_hwpath_write(struct pdcspath_entry *entry, const char *buf, size_t coun
        
        /* Update the symlink to the real device */
        sysfs_remove_link(&entry->kobj, "device");
+       write_unlock(&entry->rw_lock);
+
        ret = sysfs_create_link(&entry->kobj, &entry->dev->kobj, "device");
        WARN_ON(ret);
 
-       write_unlock(&entry->rw_lock);
-       
        printk(KERN_INFO PDCS_PREFIX ": changed \"%s\" path to \"%s\"\n",
                entry->name, buf);
        
@@ -954,7 +954,7 @@ static struct attribute *pdcs_subsys_attrs[] = {
        NULL,
 };
 
-static struct attribute_group pdcs_attr_group = {
+static const struct attribute_group pdcs_attr_group = {
        .attrs = pdcs_subsys_attrs,
 };
 
@@ -998,6 +998,7 @@ pdcs_register_pathentries(void)
                /* kobject is now registered */
                write_lock(&entry->rw_lock);
                entry->ready = 2;
+               write_unlock(&entry->rw_lock);
                
                /* Add a nice symlink to the real device */
                if (entry->dev) {
@@ -1005,7 +1006,6 @@ pdcs_register_pathentries(void)
                        WARN_ON(err);
                }
 
-               write_unlock(&entry->rw_lock);
                kobject_uevent(&entry->kobj, KOBJ_ADD);
        }