From khali@linux-fr.org Wed Jul 20 17:13:37 2005 Date: Wed, 20 Jul 2005 23:03:50 +0200 From: Jean Delvare To: Greg KH Subject: I2C: Separate non-i2c hwmon drivers from i2c-core (1/9) Message-Id: <20050720230350.6ba51474.khali@linux-fr.org> Temporarily export a few structures and functions from i2c-core, because we will soon need them in i2c-isa. Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman --- drivers/i2c/i2c-core.c | 14 ++++++++++---- include/linux/i2c.h | 7 +++++++ 2 files changed, 17 insertions(+), 4 deletions(-) --- gregkh-2.6.orig/drivers/i2c/i2c-core.c 2005-07-13 09:45:05.000000000 -0700 +++ gregkh-2.6/drivers/i2c/i2c-core.c 2005-07-26 15:12:00.000000000 -0700 @@ -61,7 +61,7 @@ return rc; } -static struct bus_type i2c_bus_type = { +struct bus_type i2c_bus_type = { .name = "i2c", .match = i2c_device_match, .suspend = i2c_bus_suspend, @@ -78,13 +78,13 @@ return 0; } -static void i2c_adapter_dev_release(struct device *dev) +void i2c_adapter_dev_release(struct device *dev) { struct i2c_adapter *adap = dev_to_i2c_adapter(dev); complete(&adap->dev_released); } -static struct device_driver i2c_adapter_driver = { +struct device_driver i2c_adapter_driver = { .name = "i2c_adapter", .bus = &i2c_bus_type, .probe = i2c_device_probe, @@ -97,7 +97,7 @@ complete(&adap->class_dev_released); } -static struct class i2c_adapter_class = { +struct class i2c_adapter_class = { .name = "i2c-adapter", .release = &i2c_adapter_class_dev_release, }; @@ -1171,6 +1171,12 @@ } +/* Next four are needed by i2c-isa */ +EXPORT_SYMBOL_GPL(i2c_adapter_dev_release); +EXPORT_SYMBOL_GPL(i2c_adapter_driver); +EXPORT_SYMBOL_GPL(i2c_adapter_class); +EXPORT_SYMBOL_GPL(i2c_bus_type); + EXPORT_SYMBOL(i2c_add_adapter); EXPORT_SYMBOL(i2c_del_adapter); EXPORT_SYMBOL(i2c_add_driver); --- gregkh-2.6.orig/include/linux/i2c.h 2005-07-13 09:45:09.000000000 -0700 +++ gregkh-2.6/include/linux/i2c.h 2005-07-26 15:12:00.000000000 -0700 @@ -34,6 +34,13 @@ #include /* for struct device */ #include +/* --- For i2c-isa ---------------------------------------------------- */ + +extern void i2c_adapter_dev_release(struct device *dev); +extern struct device_driver i2c_adapter_driver; +extern struct class i2c_adapter_class; +extern struct bus_type i2c_bus_type; + /* --- General options ------------------------------------------------ */ struct i2c_msg;