git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable
[pandora-kernel.git]
/
drivers
/
of
/
device.c
diff --git
a/drivers/of/device.c
b/drivers/of/device.c
index
224ae6b
..
7d18f8e
100644
(file)
--- a/
drivers/of/device.c
+++ b/
drivers/of/device.c
@@
-10,8
+10,7
@@
#include <asm/errno.h>
/**
#include <asm/errno.h>
/**
- * of_match_device - Tell if an of_device structure has a matching
- * of_match structure
+ * of_match_device - Tell if a struct device matches an of_device_id list
* @ids: array of of device match structures to search in
* @dev: the of device structure to match against
*
* @ids: array of of device match structures to search in
* @dev: the of device structure to match against
*
@@
-19,11
+18,11
@@
* system is in its list of supported devices.
*/
const struct of_device_id *of_match_device(const struct of_device_id *matches,
* system is in its list of supported devices.
*/
const struct of_device_id *of_match_device(const struct of_device_id *matches,
-
const struct of_
device *dev)
+
const struct
device *dev)
{
{
- if (!dev->node)
+ if (!dev->
of_
node)
return NULL;
return NULL;
- return of_match_node(matches, dev->node);
+ return of_match_node(matches, dev->
of_
node);
}
EXPORT_SYMBOL(of_match_device);
}
EXPORT_SYMBOL(of_match_device);
@@
-54,7
+53,7
@@
static ssize_t devspec_show(struct device *dev,
struct of_device *ofdev;
ofdev = to_of_device(dev);
struct of_device *ofdev;
ofdev = to_of_device(dev);
- return sprintf(buf, "%s\n", ofdev->node->full_name);
+ return sprintf(buf, "%s\n", ofdev->
dev.of_
node->full_name);
}
static ssize_t name_show(struct device *dev,
}
static ssize_t name_show(struct device *dev,
@@
-63,7
+62,7
@@
static ssize_t name_show(struct device *dev,
struct of_device *ofdev;
ofdev = to_of_device(dev);
struct of_device *ofdev;
ofdev = to_of_device(dev);
- return sprintf(buf, "%s\n", ofdev->node->name);
+ return sprintf(buf, "%s\n", ofdev->
dev.of_
node->name);
}
static ssize_t modalias_show(struct device *dev,
}
static ssize_t modalias_show(struct device *dev,
@@
-97,14
+96,14
@@
void of_release_dev(struct device *dev)
struct of_device *ofdev;
ofdev = to_of_device(dev);
struct of_device *ofdev;
ofdev = to_of_device(dev);
- of_node_put(ofdev->node);
+ of_node_put(ofdev->
dev.of_
node);
kfree(ofdev);
}
EXPORT_SYMBOL(of_release_dev);
int of_device_register(struct of_device *ofdev)
{
kfree(ofdev);
}
EXPORT_SYMBOL(of_release_dev);
int of_device_register(struct of_device *ofdev)
{
- BUG_ON(ofdev->node == NULL);
+ BUG_ON(ofdev->
dev.of_
node == NULL);
device_initialize(&ofdev->dev);
device_initialize(&ofdev->dev);
@@
-112,7
+111,7
@@
int of_device_register(struct of_device *ofdev)
* the parent. If there is no parent defined, set the node
* explicitly */
if (!ofdev->dev.parent)
* the parent. If there is no parent defined, set the node
* explicitly */
if (!ofdev->dev.parent)
- set_dev_node(&ofdev->dev, of_node_to_nid(ofdev->node));
+ set_dev_node(&ofdev->dev, of_node_to_nid(ofdev->
dev.of_
node));
return device_add(&ofdev->dev);
}
return device_add(&ofdev->dev);
}
@@
-132,11
+131,11
@@
ssize_t of_device_get_modalias(struct of_device *ofdev,
ssize_t tsize, csize, repend;
/* Name & Type */
ssize_t tsize, csize, repend;
/* Name & Type */
- csize = snprintf(str, len, "of:N%sT%s",
-
ofdev->node->name, ofdev->
node->type);
+ csize = snprintf(str, len, "of:N%sT%s",
ofdev->dev.of_node->name,
+
ofdev->dev.of_
node->type);
/* Get compatible property if any */
/* Get compatible property if any */
- compat = of_get_property(ofdev->node, "compatible", &cplen);
+ compat = of_get_property(ofdev->
dev.of_
node, "compatible", &cplen);
if (!compat)
return csize;
if (!compat)
return csize;