[patch 2/9]Four new i2c drivers and __init/__exit cleanup to i2c

Albert Cranford (ac9410@attbi.com)
Sun, 15 Sep 2002 18:36:12 -0400 (EDT)


This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime@docserver.cac.washington.edu for more info.

--0-939033609-1032129372=:7637
Content-Type: TEXT/PLAIN; charset=US-ASCII

Hello Linus,
New I2C drivers that have been adjusted after Russell King comments of August.
o i2c-algo-8xx.c
o i2c-pport.c
o i2c-adap-ibm_ocp.c
o i2c-pcf-epp.c
o Add new drivers to Config.in and Makefile.
o Add new drivers to i2c-core for initialization.
o Remove EXPORT_NO_SYMBOLS statement from i2c-dev, i2c-elektor and i2c-frodo.
o Cleanup init_module and cleanup_module adding __init and __exit to most drivers.
o Adjust i2c-elektor with cli/sti replacement.

-- 
ac9410@attbi.com

--0-939033609-1032129372=:7637 Content-Type: TEXT/PLAIN; charset=US-ASCII; name=47-i2c-3b-patch Content-Transfer-Encoding: BASE64 Content-ID: <Pine.LNX.4.44.0209151836120.7637@home1> Content-Description: Content-Disposition: attachment; filename=47-i2c-3b-patch

LS0tIC9kZXYvbnVsbAkxOTk0LTA3LTE3IDE5OjQ2OjE4LjAwMDAwMDAwMCAt MDQwMA0KKysrIGxpbnV4LTIuNS4zNC9kcml2ZXJzL2kyYy9pMmMtcHBvcnQu YwkyMDAxLTEwLTEzIDE0OjA5OjAxLjAwMDAwMDAwMCAtMDQwMA0KQEAgLTAs MCArMSwyNTIgQEANCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t ICovDQorLyogaTJjLXBwb3J0LmMgaTJjLWh3IGFjY2VzcyAgZm9yIHByaW1p dGl2ZSBpMmMgcGFyLiBwb3J0IGFkYXB0ZXIJICAgICAqLw0KKy8qIC0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0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IHsNCisJCQlpZihpMmNfYml0X2FkZF9idXMoJmJpdF9wcG9y dF9vcHMpIDwgMCkNCisJCQkJcmV0dXJuIC1FTk9ERVY7DQorCQl9IGVsc2Ug ew0KKwkJCXJldHVybiAtRU5PREVWOw0KKwkJfQ0KKwl9DQorCXByaW50aygi aTJjLXBwb3J0Lm86IGZvdW5kIGRldmljZSBhdCAlI3guXG4iLGJhc2UpOw0K KwlyZXR1cm4gMDsNCit9DQorDQorDQorI2lmZGVmIE1PRFVMRQ0KK01PRFVM RV9BVVRIT1IoIkRhbmllbCBTbW9saWsgPG1hcnZpbkBzaXRvdXIuY3o+Iik7 DQorTU9EVUxFX0RFU0NSSVBUSU9OKCJJMkMtQnVzIGFkYXB0ZXIgcm91dGlu ZXMgZm9yIFByaW1pdGl2ZSBwYXJhbGxlbCBwb3J0IGFkYXB0ZXIiKQ0KKzsN CisNCitNT0RVTEVfUEFSTShiYXNlLCAiaSIpOw0KKw0KK2ludCBpbml0X21v ZHVsZSh2b2lkKQ0KK3sNCisJcmV0dXJuIGkyY19iaXRwcG9ydF9pbml0KCk7 DQorfQ0KKw0KK3ZvaWQgY2xlYW51cF9tb2R1bGUodm9pZCkNCit7DQorCWky Y19iaXRfZGVsX2J1cygmYml0X3Bwb3J0X29wcyk7DQorCWJpdF9wcG9ydF9l eGl0KCk7DQorfQ0KKw0KKyNlbmRpZg0K --0-939033609-1032129372=:7637-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/