diff options
author | Jeremy Erickson <jerickso@cs.unc.edu> | 2014-04-11 13:24:45 -0400 |
---|---|---|
committer | Jeremy Erickson <jerickso@cs.unc.edu> | 2014-04-11 13:24:45 -0400 |
commit | 438145c7ef5c9445f25bb8fc4d52e2c9d11fdc7c (patch) | |
tree | 76941991e36f4a32bf1be0db3854959053f24619 /drivers/i2c | |
parent | 9ddd1b8ad8abd321964b8add5581910de6d67c2a (diff) |
Update from 2.6.36 to 2.6.36.4wip-dissipation-jerickso
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-pca-platform.c | 2 | ||||
-rw-r--r-- | drivers/i2c/i2c-core.c | 14 |
2 files changed, 14 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-pca-platform.c b/drivers/i2c/busses/i2c-pca-platform.c index 5f6d7f89e225..ace67995d7de 100644 --- a/drivers/i2c/busses/i2c-pca-platform.c +++ b/drivers/i2c/busses/i2c-pca-platform.c | |||
@@ -224,7 +224,7 @@ static int __devinit i2c_pca_pf_probe(struct platform_device *pdev) | |||
224 | 224 | ||
225 | if (irq) { | 225 | if (irq) { |
226 | ret = request_irq(irq, i2c_pca_pf_handler, | 226 | ret = request_irq(irq, i2c_pca_pf_handler, |
227 | IRQF_TRIGGER_FALLING, i2c->adap.name, i2c); | 227 | IRQF_TRIGGER_FALLING, pdev->name, i2c); |
228 | if (ret) | 228 | if (ret) |
229 | goto e_reqirq; | 229 | goto e_reqirq; |
230 | } | 230 | } |
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index bea4c5021d26..c16a448dfd0d 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c | |||
@@ -1005,6 +1005,14 @@ static int i2c_do_del_adapter(struct i2c_driver *driver, | |||
1005 | static int __unregister_client(struct device *dev, void *dummy) | 1005 | static int __unregister_client(struct device *dev, void *dummy) |
1006 | { | 1006 | { |
1007 | struct i2c_client *client = i2c_verify_client(dev); | 1007 | struct i2c_client *client = i2c_verify_client(dev); |
1008 | if (client && strcmp(client->name, "dummy")) | ||
1009 | i2c_unregister_device(client); | ||
1010 | return 0; | ||
1011 | } | ||
1012 | |||
1013 | static int __unregister_dummy(struct device *dev, void *dummy) | ||
1014 | { | ||
1015 | struct i2c_client *client = i2c_verify_client(dev); | ||
1008 | if (client) | 1016 | if (client) |
1009 | i2c_unregister_device(client); | 1017 | i2c_unregister_device(client); |
1010 | return 0; | 1018 | return 0; |
@@ -1059,8 +1067,12 @@ int i2c_del_adapter(struct i2c_adapter *adap) | |||
1059 | mutex_unlock(&adap->userspace_clients_lock); | 1067 | mutex_unlock(&adap->userspace_clients_lock); |
1060 | 1068 | ||
1061 | /* Detach any active clients. This can't fail, thus we do not | 1069 | /* Detach any active clients. This can't fail, thus we do not |
1062 | checking the returned value. */ | 1070 | * check the returned value. This is a two-pass process, because |
1071 | * we can't remove the dummy devices during the first pass: they | ||
1072 | * could have been instantiated by real devices wishing to clean | ||
1073 | * them up properly, so we give them a chance to do that first. */ | ||
1063 | res = device_for_each_child(&adap->dev, NULL, __unregister_client); | 1074 | res = device_for_each_child(&adap->dev, NULL, __unregister_client); |
1075 | res = device_for_each_child(&adap->dev, NULL, __unregister_dummy); | ||
1064 | 1076 | ||
1065 | #ifdef CONFIG_I2C_COMPAT | 1077 | #ifdef CONFIG_I2C_COMPAT |
1066 | class_compat_remove_link(i2c_adapter_compat_class, &adap->dev, | 1078 | class_compat_remove_link(i2c_adapter_compat_class, &adap->dev, |