]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/macintosh/via-pmu.c
Merge tag 'soundwire-5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul...
[linux.git] / drivers / macintosh / via-pmu.c
index 60f57e2abf2157d0bf3986f3a288b7c051f6be8c..21d532a78fa4759fb1237b19ef164d898101d989 100644 (file)
@@ -318,8 +318,8 @@ int __init find_via_pmu(void)
                        PMU_INT_ADB |
                        PMU_INT_TICK;
        
-       if (vias->parent->name && ((strcmp(vias->parent->name, "ohare") == 0)
-           || of_device_is_compatible(vias->parent, "ohare")))
+       if (of_node_name_eq(vias->parent, "ohare") ||
+           of_device_is_compatible(vias->parent, "ohare"))
                pmu_kind = PMU_OHARE_BASED;
        else if (of_device_is_compatible(vias->parent, "paddington"))
                pmu_kind = PMU_PADDINGTON_BASED;
@@ -2188,7 +2188,7 @@ pmu_read(struct file *file, char __user *buf,
 
        if (count < 1 || !pp)
                return -EINVAL;
-       if (!access_ok(VERIFY_WRITE, buf, count))
+       if (!access_ok(buf, count))
                return -EFAULT;
 
        spin_lock_irqsave(&pp->lock, flags);