]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/ppc/syslib/of_device.c
Merge master.kernel.org:/home/rmk/linux-2.6-serial
[karo-tx-linux.git] / arch / ppc / syslib / of_device.c
index 49c0e34e2d6bf2abf8c37522337e122e007c71ce..da8a0f2128dccc23bc06cc8b3f8a93809384e7ec 100644 (file)
@@ -3,6 +3,7 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/module.h>
+#include <linux/mod_devicetable.h>
 #include <asm/errno.h>
 #include <asm/of_device.h>
 
  * Used by a driver to check whether an of_device present in the
  * system is in its list of supported devices.
  */
-const struct of_match * of_match_device(const struct of_match *matches,
+const struct of_device_id * of_match_device(const struct of_device_id *matches,
                                        const struct of_device *dev)
 {
        if (!dev->node)
                return NULL;
-       while (matches->name || matches->type || matches->compatible) {
+       while (matches->name[0] || matches->type[0] || matches->compatible[0]) {
                int match = 1;
-               if (matches->name && matches->name != OF_ANY_MATCH)
+               if (matches->name[0])
                        match &= dev->node->name
                                && !strcmp(matches->name, dev->node->name);
-               if (matches->type && matches->type != OF_ANY_MATCH)
+               if (matches->type[0])
                        match &= dev->node->type
                                && !strcmp(matches->type, dev->node->type);
-               if (matches->compatible && matches->compatible != OF_ANY_MATCH)
+               if (matches->compatible[0])
                        match &= device_is_compatible(dev->node,
                                matches->compatible);
                if (match)
@@ -42,7 +43,7 @@ static int of_platform_bus_match(struct device *dev, struct device_driver *drv)
 {
        struct of_device * of_dev = to_of_device(dev);
        struct of_platform_driver * of_drv = to_of_platform_driver(drv);
-       const struct of_match * matches = of_drv->match_table;
+       const struct of_device_id * matches = of_drv->match_table;
 
        if (!matches)
                return 0;
@@ -75,7 +76,7 @@ static int of_device_probe(struct device *dev)
        int error = -ENODEV;
        struct of_platform_driver *drv;
        struct of_device *of_dev;
-       const struct of_match *match;
+       const struct of_device_id *match;
 
        drv = to_of_platform_driver(dev->driver);
        of_dev = to_of_device(dev);
@@ -104,7 +105,7 @@ static int of_device_remove(struct device *dev)
        return 0;
 }
 
-static int of_device_suspend(struct device *dev, u32 state)
+static int of_device_suspend(struct device *dev, pm_message_t state)
 {
        struct of_device * of_dev = to_of_device(dev);
        struct of_platform_driver * drv = to_of_platform_driver(dev->driver);