Merge branch 'drm-patches' of master.kernel.org:/pub/scm/linux/kernel/git/airlied...
[linux-drm-fsl-dcu.git] / arch / powerpc / platforms / powermac / pfunc_core.c
index 047f954a89eb933206396688cd45dcf3b28d2a12..85434231ae14d5658be4d6c122d8ab78d8f27ed1 100644 (file)
@@ -5,7 +5,6 @@
  * FIXME: LOCKING !!!
  */
 
-#include <linux/config.h>
 #include <linux/init.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
@@ -546,7 +545,7 @@ struct pmf_device {
 };
 
 static LIST_HEAD(pmf_devices);
-static spinlock_t pmf_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(pmf_lock);
 static DEFINE_MUTEX(pmf_irq_mutex);
 
 static void pmf_release_device(struct kref *kref)
@@ -693,8 +692,7 @@ static int pmf_add_functions(struct pmf_device *dev, void *driverdata)
                name = pp->name + plen;
                if (strlen(name) && pp->length >= 12)
                        count += pmf_add_function_prop(dev, driverdata, name,
-                                                      (u32 *)pp->value,
-                                                      pp->length);
+                                                      pp->value, pp->length);
        }
        return count;
 }
@@ -814,14 +812,15 @@ struct pmf_function *__pmf_find_function(struct device_node *target,
        struct pmf_device *dev;
        struct pmf_function *func, *result = NULL;
        char fname[64];
-       u32 *prop, ph;
+       const u32 *prop;
+       u32 ph;
 
        /*
         * Look for a "platform-*" function reference. If we can't find
         * one, then we fallback to a direct call attempt
         */
        snprintf(fname, 63, "platform-%s", name);
-       prop = (u32 *)get_property(target, fname, NULL);
+       prop = of_get_property(target, fname, NULL);
        if (prop == NULL)
                goto find_it;
        ph = *prop;