diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-01-05 12:55:03 +0000 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-01-05 12:55:03 +0000 |
commit | 4c5f830c4c9d4f19c1eef356c0cd322b46d695c9 (patch) | |
tree | a14ad6c652736bb28859a7aec392a01b236ae58d /drivers/sbus/char/bbc_i2c.c | |
parent | cc511b8d84d88ab788cddbfe8d21485b1c387493 (diff) | |
parent | 2e3d256de9d3db5a7ca19b61305627a516b54b45 (diff) |
Merge branch 'for-russell' of git://hansjkoch.de/git/linux-tcc into HEAD
Conflicts:
arch/arm/plat-omap/include/plat/common.h
Diffstat (limited to 'drivers/sbus/char/bbc_i2c.c')
-rw-r--r-- | drivers/sbus/char/bbc_i2c.c | 27 |
1 files changed, 5 insertions, 22 deletions
diff --git a/drivers/sbus/char/bbc_i2c.c b/drivers/sbus/char/bbc_i2c.c index 5f94d22c491..54266829290 100644 --- a/drivers/sbus/char/bbc_i2c.c +++ b/drivers/sbus/char/bbc_i2c.c @@ -233,13 +233,9 @@ int bbc_i2c_write_buf(struct bbc_i2c_client *client, int ret = 0; while (len > 0) { - int err = bbc_i2c_writeb(client, *buf, off); - - if (err < 0) { - ret = err; + ret = bbc_i2c_writeb(client, *buf, off); + if (ret < 0) break; - } - len--; buf++; off++; @@ -253,11 +249,9 @@ int bbc_i2c_read_buf(struct bbc_i2c_client *client, int ret = 0; while (len > 0) { - int err = bbc_i2c_readb(client, buf, off); - if (err < 0) { - ret = err; + ret = bbc_i2c_readb(client, buf, off); + if (ret < 0) break; - } len--; buf++; off++; @@ -422,17 +416,6 @@ static struct platform_driver bbc_i2c_driver = { .remove = __devexit_p(bbc_i2c_remove), }; -static int __init bbc_i2c_init(void) -{ - return platform_driver_register(&bbc_i2c_driver); -} - -static void __exit bbc_i2c_exit(void) -{ - platform_driver_unregister(&bbc_i2c_driver); -} - -module_init(bbc_i2c_init); -module_exit(bbc_i2c_exit); +module_platform_driver(bbc_i2c_driver); MODULE_LICENSE("GPL"); |