Thread (28 messages) 28 messages, 7 authors, 2008-07-11

Re: [PATCH 2/2] Add the of_find_i2c_device_by_node function, V4

From: Jean Delvare <hidden>
Date: 2008-07-01 16:35:09
Also in: linux-i2c

On Tue, 1 Jul 2008 12:29:29 -0400, Jon Smirl wrote:
On 7/1/08, Jean Delvare [off-list ref] wrote:
quoted
Hi Jon,


 On Mon, 30 Jun 2008 19:01:28 -0400, Jon Smirl wrote:
 > Add the of_find_i2c_device_by_node function. This allows you to
 > follow a reference in the device to an i2c device node and then
 > locate the linux device instantiated by the device tree. Example
 > use, an i2s codec controlled by i2c.
 > ---
 >
 >  drivers/i2c/i2c-core.c |    2 +-
 >  drivers/of/of_i2c.c    |   37 ++++++++++++++++++++++++++-----------
 >  include/linux/i2c.h    |    3 +++
 >  include/linux/of_i2c.h |    2 ++
 >  4 files changed, 32 insertions(+), 12 deletions(-)
 >
 > diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
 > index d0175f4..e3abe1b 100644
 > --- a/drivers/i2c/i2c-core.c
 > +++ b/drivers/i2c/i2c-core.c
 > @@ -208,7 +208,7 @@ static struct device_attribute i2c_dev_attrs[] = {
 >       { },
 >  };
 >
 > -static struct bus_type i2c_bus_type = {
 > +struct bus_type i2c_bus_type = {
 >       .name           = "i2c",
 >       .dev_attrs      = i2c_dev_attrs,
 >       .match          = i2c_device_match,


What if i2c-core is built as a module? Don't you need to export the
 symbol then?
Jean, can you re-export i2c_bus_type and then I'll drop that part from
the patch? That way the patch won't hit multiple maintainers.
Just send me a patch doing just that and I will be glad to push early in
the 2.6.27 merge window.

-- 
Jean Delvare
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help