]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/hwmon/ams/ams-core.c
hwmon: Use linux/of_platform.h instead of asm
[linux-2.6-omap-h63xx.git] / drivers / hwmon / ams / ams-core.c
index f5ebad5614126d966cfc7e637a6522fda5bf705d..fbefa82a015cc6175f40106abc0d7017bee1ecea 100644 (file)
@@ -23,9 +23,8 @@
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/init.h>
-#include <linux/module.h>
+#include <linux/of_platform.h>
 #include <asm/pmac_pfunc.h>
-#include <asm/of_platform.h>
 
 #include "ams.h"
 
@@ -144,7 +143,7 @@ int ams_sensor_attach(void)
        const u32 *prop;
 
        /* Get orientation */
-       prop = 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 +207,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;
 }