libata-sff: separate out BMDMA qc_issue
[safe/jmp/linux-2.6] / drivers / parisc / pdc_stable.c
index de34aa9..1062b8f 100644 (file)
@@ -370,7 +370,7 @@ pdcspath_layer_read(struct pdcspath_entry *entry, char *buf)
        if (!i) /* entry is not ready */
                return -ENODATA;
        
-       for (i = 0; devpath->layers[i] && (likely(i < 6)); i++)
+       for (i = 0; i < 6 && devpath->layers[i]; i++)
                out += sprintf(out, "%u ", devpath->layers[i]);
 
        out += sprintf(out, "\n");
@@ -481,7 +481,7 @@ pdcspath_attr_store(struct kobject *kobj, struct attribute *attr,
        return ret;
 }
 
-static struct sysfs_ops pdcspath_attr_ops = {
+static const struct sysfs_ops pdcspath_attr_ops = {
        .show = pdcspath_attr_show,
        .store = pdcspath_attr_store,
 };
@@ -779,12 +779,9 @@ static ssize_t pdcs_auto_write(struct kobject *kobj,
        read_unlock(&pathentry->rw_lock);
        
        DPRINTK("%s: flags before: 0x%X\n", __func__, flags);
-                       
-       temp = in;
-       
-       while (*temp && isspace(*temp))
-               temp++;
-       
+
+       temp = skip_spaces(in);
+
        c = *temp++ - '0';
        if ((c != 0) && (c != 1))
                goto parse_error;
@@ -829,7 +826,7 @@ static ssize_t pdcs_autoboot_write(struct kobject *kobj,
                                   struct kobj_attribute *attr,
                                   const char *buf, size_t count)
 {
-       return pdcs_auto_write(kset, attr, buf, count, PF_AUTOBOOT);
+       return pdcs_auto_write(kobj, attr, buf, count, PF_AUTOBOOT);
 }
 
 /**
@@ -845,7 +842,7 @@ static ssize_t pdcs_autosearch_write(struct kobject *kobj,
                                     struct kobj_attribute *attr,
                                     const char *buf, size_t count)
 {
-       return pdcs_auto_write(kset, attr, buf, count, PF_AUTOSEARCH);
+       return pdcs_auto_write(kobj, attr, buf, count, PF_AUTOSEARCH);
 }
 
 /**
@@ -1066,7 +1063,7 @@ pdc_stable_init(void)
        }
 
        /* Don't forget the root entries */
-       error = sysfs_create_group(stable_kobj, pdcs_attr_group);
+       error = sysfs_create_group(stable_kobj, &pdcs_attr_group);
 
        /* register the paths kset as a child of the stable kset */
        paths_kset = kset_create_and_add("paths", NULL, stable_kobj);