diff options
author | Jean Delvare <khali@linux-fr.org> | 2005-07-20 17:03:50 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-09-05 12:14:09 -0400 |
commit | efde723fdac02111872bff606ef362074fc1efa8 (patch) | |
tree | 31e5cff31af33f38dfdcaa65cebd935f2a3f7fdc | |
parent | 943b0830cebe4711354945ed3cb44e84152aaca0 (diff) |
[PATCH] I2C: Separate non-i2c hwmon drivers from i2c-core (1/9)
Temporarily export a few structures and functions from i2c-core, because we
will soon need them in i2c-isa.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/i2c/i2c-core.c | 14 | ||||
-rw-r--r-- | include/linux/i2c.h | 7 |
2 files changed, 17 insertions, 4 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 4a9ead277596..7a7837ae3114 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c | |||
@@ -61,7 +61,7 @@ static int i2c_bus_resume(struct device * dev) | |||
61 | return rc; | 61 | return rc; |
62 | } | 62 | } |
63 | 63 | ||
64 | static struct bus_type i2c_bus_type = { | 64 | struct bus_type i2c_bus_type = { |
65 | .name = "i2c", | 65 | .name = "i2c", |
66 | .match = i2c_device_match, | 66 | .match = i2c_device_match, |
67 | .suspend = i2c_bus_suspend, | 67 | .suspend = i2c_bus_suspend, |
@@ -78,13 +78,13 @@ static int i2c_device_remove(struct device *dev) | |||
78 | return 0; | 78 | return 0; |
79 | } | 79 | } |
80 | 80 | ||
81 | static void i2c_adapter_dev_release(struct device *dev) | 81 | void i2c_adapter_dev_release(struct device *dev) |
82 | { | 82 | { |
83 | struct i2c_adapter *adap = dev_to_i2c_adapter(dev); | 83 | struct i2c_adapter *adap = dev_to_i2c_adapter(dev); |
84 | complete(&adap->dev_released); | 84 | complete(&adap->dev_released); |
85 | } | 85 | } |
86 | 86 | ||
87 | static struct device_driver i2c_adapter_driver = { | 87 | struct device_driver i2c_adapter_driver = { |
88 | .name = "i2c_adapter", | 88 | .name = "i2c_adapter", |
89 | .bus = &i2c_bus_type, | 89 | .bus = &i2c_bus_type, |
90 | .probe = i2c_device_probe, | 90 | .probe = i2c_device_probe, |
@@ -97,7 +97,7 @@ static void i2c_adapter_class_dev_release(struct class_device *dev) | |||
97 | complete(&adap->class_dev_released); | 97 | complete(&adap->class_dev_released); |
98 | } | 98 | } |
99 | 99 | ||
100 | static struct class i2c_adapter_class = { | 100 | struct class i2c_adapter_class = { |
101 | .name = "i2c-adapter", | 101 | .name = "i2c-adapter", |
102 | .release = &i2c_adapter_class_dev_release, | 102 | .release = &i2c_adapter_class_dev_release, |
103 | }; | 103 | }; |
@@ -1171,6 +1171,12 @@ s32 i2c_smbus_xfer(struct i2c_adapter * adapter, u16 addr, unsigned short flags, | |||
1171 | } | 1171 | } |
1172 | 1172 | ||
1173 | 1173 | ||
1174 | /* Next four are needed by i2c-isa */ | ||
1175 | EXPORT_SYMBOL_GPL(i2c_adapter_dev_release); | ||
1176 | EXPORT_SYMBOL_GPL(i2c_adapter_driver); | ||
1177 | EXPORT_SYMBOL_GPL(i2c_adapter_class); | ||
1178 | EXPORT_SYMBOL_GPL(i2c_bus_type); | ||
1179 | |||
1174 | EXPORT_SYMBOL(i2c_add_adapter); | 1180 | EXPORT_SYMBOL(i2c_add_adapter); |
1175 | EXPORT_SYMBOL(i2c_del_adapter); | 1181 | EXPORT_SYMBOL(i2c_del_adapter); |
1176 | EXPORT_SYMBOL(i2c_add_driver); | 1182 | EXPORT_SYMBOL(i2c_add_driver); |
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 017445943816..3be06105034c 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
@@ -34,6 +34,13 @@ | |||
34 | #include <linux/device.h> /* for struct device */ | 34 | #include <linux/device.h> /* for struct device */ |
35 | #include <asm/semaphore.h> | 35 | #include <asm/semaphore.h> |
36 | 36 | ||
37 | /* --- For i2c-isa ---------------------------------------------------- */ | ||
38 | |||
39 | extern void i2c_adapter_dev_release(struct device *dev); | ||
40 | extern struct device_driver i2c_adapter_driver; | ||
41 | extern struct class i2c_adapter_class; | ||
42 | extern struct bus_type i2c_bus_type; | ||
43 | |||
37 | /* --- General options ------------------------------------------------ */ | 44 | /* --- General options ------------------------------------------------ */ |
38 | 45 | ||
39 | struct i2c_msg; | 46 | struct i2c_msg; |