Merge master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6
[linux-drm-fsl-dcu.git] / drivers / hwmon / ams / ams-core.c
index f1f0f5d0442cc53c5abfe2623f0015132ff29fb6..6db9737397259f5af26c203682b1baa75454c617 100644 (file)
@@ -141,10 +141,10 @@ static void ams_worker(struct work_struct *work)
 int ams_sensor_attach(void)
 {
        int result;
-       u32 *prop;
+       const u32 *prop;
 
        /* Get orientation */
-       prop = (u32*)get_property(ams_info.of_node, "orientation", NULL);
+       prop = of_get_property(ams_info.of_node, "orientation", NULL);
        if (!prop)
                return -ENODEV;
        ams_info.orient1 = *prop;
@@ -208,20 +208,17 @@ int __init ams_init(void)
 
 #ifdef CONFIG_SENSORS_AMS_I2C
        np = of_find_node_by_name(NULL, "accelerometer");
-       if (np && device_is_compatible(np, "AAPL,accelerometer_1"))
+       if (np && of_device_is_compatible(np, "AAPL,accelerometer_1"))
                /* Found I2C motion sensor */
                return ams_i2c_init(np);
 #endif
 
 #ifdef CONFIG_SENSORS_AMS_PMU
        np = of_find_node_by_name(NULL, "sms");
-       if (np && device_is_compatible(np, "sms"))
+       if (np && of_device_is_compatible(np, "sms"))
                /* Found PMU motion sensor */
                return ams_pmu_init(np);
 #endif
-
-       printk(KERN_ERR "ams: No motion sensor found.\n");
-
        return -ENODEV;
 }