From 50c075ba436099cb440d50ce4702a53e24527011 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Thu, 4 Oct 2012 10:56:18 +0200 Subject: [PATCH 1/4] driver: move dev_get_drvdata out of CONFIG_CMD_DEVINFO dev_get_drvdata accidently is inside #ifdef CONFIG_CMD_DEVINFO. Move it out of there. Signed-off-by: Sascha Hauer --- drivers/base/driver.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/base/driver.c b/drivers/base/driver.c index 1def2f85e..cf96081da 100644 --- a/drivers/base/driver.c +++ b/drivers/base/driver.c @@ -350,6 +350,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) { @@ -384,21 +399,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; From 06eebb1619f00c249f5ad37ba8504a4ae7c2ef8d Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Thu, 4 Oct 2012 10:57:13 +0200 Subject: [PATCH 2/4] provide static inline function for export Signed-off-by: Sascha Hauer --- include/environment.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/environment.h b/include/environment.h index 5cd7ecfee..95e75e7ec 100644 --- a/include/environment.h +++ b/include/environment.h @@ -60,6 +60,12 @@ static inline unsigned long long getenv_ull(const char *name) { return 0; } + +static inline int export(const char *var) +{ + return -EINVAL; +} + #endif int env_pop_context(void); From 7cb6f34fcd66a478137028cb97ef700afc369db7 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Thu, 4 Oct 2012 15:34:25 +0200 Subject: [PATCH 3/4] nios2: Fix stray comment start in longlong.h Signed-off-by: Sascha Hauer --- arch/nios2/lib/longlong.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/nios2/lib/longlong.h b/arch/nios2/lib/longlong.h index 4ab928efa..12716828a 100644 --- a/arch/nios2/lib/longlong.h +++ b/arch/nios2/lib/longlong.h @@ -11,7 +11,7 @@ * useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. - + */ /* You have to define the following before including this file: UWtype -- An unsigned type, default type for operations (typically a "word") From 27c64eaacd57c9f244497adb7d2d60a9e27a1298 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Thu, 4 Oct 2012 15:34:44 +0200 Subject: [PATCH 4/4] driver: make get_bus_by_name static We have no prototype for it, so it should be static. Signed-off-by: Sascha Hauer --- drivers/base/bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/bus.c b/drivers/base/bus.c index 1dd139f7a..69782d2e7 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;