summaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-10-07 18:45:56 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-10-07 18:45:56 +0200
commit52df7b618450327a8b5aad56bfedbb3f130ef774 (patch)
tree06ac14464a34cc2de1a50309eea61711148092e8 /drivers/base
parent9cb32d1d58ed04c5bd4bc25f664069b9759f1eb5 (diff)
parent27c64eaacd57c9f244497adb7d2d60a9e27a1298 (diff)
downloadbarebox-52df7b618450327a8b5aad56bfedbb3f130ef774.tar.gz
barebox-52df7b618450327a8b5aad56bfedbb3f130ef774.tar.xz
Merge branch 'pu/misc-fixes'
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/bus.c2
-rw-r--r--drivers/base/driver.c30
2 files changed, 16 insertions, 16 deletions
diff --git a/drivers/base/bus.c b/drivers/base/bus.c
index 1dd139f7a3..69782d2e7b 100644
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
@@ -11,7 +11,7 @@
LIST_HEAD(bus_list);
EXPORT_SYMBOL(bus_list);
-struct bus_type *get_bus_by_name(const char *name)
+static struct bus_type *get_bus_by_name(const char *name)
{
struct bus_type *bus;
diff --git a/drivers/base/driver.c b/drivers/base/driver.c
index 6c8fd0576c..64fe2894e3 100644
--- a/drivers/base/driver.c
+++ b/drivers/base/driver.c
@@ -336,6 +336,21 @@ void devices_shutdown(void)
}
}
+int dev_get_drvdata(struct device_d *dev, unsigned long *data)
+{
+ if (dev->of_id_entry) {
+ *data = dev->of_id_entry->data;
+ return 0;
+ }
+
+ if (dev->id_entry) {
+ *data = dev->id_entry->driver_data;
+ return 0;
+ }
+
+ return -ENODEV;
+}
+
#ifdef CONFIG_CMD_DEVINFO
static int do_devinfo_subtree(struct device_d *dev, int depth)
{
@@ -370,21 +385,6 @@ static int do_devinfo_subtree(struct device_d *dev, int depth)
return 0;
}
-int dev_get_drvdata(struct device_d *dev, unsigned long *data)
-{
- if (dev->of_id_entry) {
- *data = dev->of_id_entry->data;
- return 0;
- }
-
- if (dev->id_entry) {
- *data = dev->id_entry->driver_data;
- return 0;
- }
-
- return -ENODEV;
-}
-
static int do_devinfo(int argc, char *argv[])
{
struct device_d *dev;