From: Anton Vorontsov <cbou@mail.ru>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, kernel-discuss@handhelds.org
Subject: [PATCH 6/7] remove "#if 0" from find_bus function, export it.
Date: Wed, 25 Apr 2007 19:52:06 +0400 [thread overview]
Message-ID: <20070425155206.GF4117@zarina> (raw)
In-Reply-To: <20070425154820.GA27300@zarina>
This function were placed in "#if 0" because nobody was using it.
We using it now.
See http://lwn.net/Articles/210610/
Signed-off-by: Anton Vorontsov <cbou@mail.ru>
---
drivers/base/bus.c | 5 ++---
include/linux/device.h | 2 ++
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/base/bus.c b/drivers/base/bus.c
index 253868e..971efa2 100644
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
@@ -667,14 +667,13 @@ void put_bus(struct bus_type * bus)
*
* Note that kset_find_obj increments bus' reference count.
*/
-#if 0
+
struct bus_type * find_bus(char * name)
{
struct kobject * k = kset_find_obj(&bus_subsys.kset, name);
return k ? to_bus(k) : NULL;
}
-#endif /* 0 */
-
+EXPORT_SYMBOL_GPL(find_bus);
/**
* bus_add_attrs - Add default attributes for this bus.
diff --git a/include/linux/device.h b/include/linux/device.h
index 5cf30e9..4015b39 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -68,6 +68,8 @@ extern void bus_unregister(struct bus_type * bus);
extern int __must_check bus_rescan_devices(struct bus_type * bus);
+extern struct bus_type *find_bus(char *name);
+
/* iterator helpers for buses */
int bus_for_each_dev(struct bus_type * bus, struct device * start, void * data,
--
1.5.1.1-dirty
next prev parent reply other threads:[~2007-04-25 15:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-25 15:48 [PATCH 0/7] Battery class, external power framework, ds2760 battery Anton Vorontsov
2007-04-25 15:50 ` [PATCH 1/7] External power framework Anton Vorontsov
2007-04-25 15:50 ` [PATCH 2/7] pda power driver Anton Vorontsov
2007-04-25 15:50 ` [PATCH 3/7] Universal battery class Anton Vorontsov
2007-04-25 15:51 ` [PATCH 4/7] APM emulation driver for class batteries Anton Vorontsov
2007-04-25 15:51 ` [PATCH 5/7] 1-Wire ds2760 chip battery driver Anton Vorontsov
2007-04-25 15:52 ` Anton Vorontsov [this message]
2007-04-25 15:52 ` [PATCH 7/7] ds2760 W1 slave Anton Vorontsov
2007-04-25 20:05 ` [PATCH 0/7] Battery class, external power framework, ds2760 battery Andrew Morton
2007-04-25 21:05 ` Anton Vorontsov
2007-04-25 21:19 ` Anton Vorontsov
2007-04-25 22:47 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070425155206.GF4117@zarina \
--to=cbou@mail.ru \
--cc=akpm@linux-foundation.org \
--cc=kernel-discuss@handhelds.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox