Re: [PATCH 2.6] I2C: Separate non-i2c hwmon drivers from i2c-core (1/9)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Greg,

> > +/* Next four are needed by i2c-isa */
> > +EXPORT_SYMBOL(i2c_adapter_dev_release);
> > +EXPORT_SYMBOL(i2c_adapter_driver);
> > +EXPORT_SYMBOL(i2c_adapter_class);
> > +EXPORT_SYMBOL(i2c_bus_type);
> 
> EXPORT_SYMBOL_GPL() instead?  As these were, core, GPL only symbols
> before you exported them.

Sure, no problem. I would even use EXPORT_SYMBOL_I2C_ISA_ONLY() if it
happened to exist ;)

Updated patch follows, thanks.

Temporarily export a few structures and functions from i2c-core, because we
will soon need them in i2c-isa.

Signed-off-by: Jean Delvare <[email protected]>

 drivers/i2c/i2c-core.c |   14 ++++++++++----
 include/linux/i2c.h    |    7 +++++++
 2 files changed, 17 insertions(+), 4 deletions(-)

--- linux-2.6.13-rc3.orig/drivers/i2c/i2c-core.c	2005-07-17 20:15:52.000000000 +0200
+++ linux-2.6.13-rc3/drivers/i2c/i2c-core.c	2005-07-20 18:19:46.000000000 +0200
@@ -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);
--- linux-2.6.13-rc3.orig/include/linux/i2c.h	2005-07-17 20:15:52.000000000 +0200
+++ linux-2.6.13-rc3/include/linux/i2c.h	2005-07-20 18:19:01.000000000 +0200
@@ -34,6 +34,13 @@
 #include <linux/device.h>	/* for struct device */
 #include <asm/semaphore.h>
 
+/* --- 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;


-- 
Jean Delvare
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux