[PATCH] Make "dev_get_resource" publicly available

Alexander Shiyan shc_work at mail.ru
Sat Feb 16 02:36:22 EST 2013


Signed-off-by: Alexander Shiyan <shc_work at mail.ru>
---
 drivers/base/driver.c | 2 +-
 include/driver.h      | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/base/driver.c b/drivers/base/driver.c
index d4066fc..fa30c68 100644
--- a/drivers/base/driver.c
+++ b/drivers/base/driver.c
@@ -230,7 +230,7 @@ int register_driver(struct driver_d *drv)
 }
 EXPORT_SYMBOL(register_driver);
 
-static struct resource *dev_get_resource(struct device_d *dev, int num)
+struct resource *dev_get_resource(struct device_d *dev, int num)
 {
 	int i, n = 0;
 
diff --git a/include/driver.h b/include/driver.h
index 31f5d69..092a46b 100644
--- a/include/driver.h
+++ b/include/driver.h
@@ -193,6 +193,10 @@ static inline const char *dev_name(const struct device_d *dev)
 }
 
 /*
+ * get resource 'num' for a device
+ */
+struct resource *dev_get_resource(struct device_d *dev, int num);
+/*
  * get resource base 'name' for a device
  */
 struct resource *dev_get_resource_by_name(struct device_d *dev,
-- 
1.7.12.4




More information about the barebox mailing list