diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-12-16 15:26:26 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-12-16 15:26:26 -0500 |
| commit | 64b3dcc35e8dcaa3032aa6aba416d05f41ead959 (patch) | |
| tree | a9b16f5cef9ec006061b284fcf79645a7d89cbff /drivers | |
| parent | 24545cf168d1128bd74dfe6ea9e864825e25dd02 (diff) | |
| parent | b1f44e13a525d2ffb7d5afe2273b7169d6f2222e (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
sparc32: Be less strict in matching %lo part of relocation.
sbus: convert drivers/sbus/char/* to use module_platform_driver()
bbc_i2c: Remove unneeded err variable
sparc: Use kmemdup rather than duplicating its implementation
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/sbus/char/bbc_i2c.c | 27 | ||||
| -rw-r--r-- | drivers/sbus/char/display7seg.c | 13 | ||||
| -rw-r--r-- | drivers/sbus/char/envctrl.c | 12 | ||||
| -rw-r--r-- | drivers/sbus/char/flash.c | 12 | ||||
| -rw-r--r-- | drivers/sbus/char/uctrl.c | 12 |
5 files changed, 9 insertions, 67 deletions
diff --git a/drivers/sbus/char/bbc_i2c.c b/drivers/sbus/char/bbc_i2c.c index 5f94d22c491e..542668292900 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, | |||
| 233 | int ret = 0; | 233 | int ret = 0; |
| 234 | 234 | ||
| 235 | while (len > 0) { | 235 | while (len > 0) { |
| 236 | int err = bbc_i2c_writeb(client, *buf, off); | 236 | ret = bbc_i2c_writeb(client, *buf, off); |
| 237 | 237 | if (ret < 0) | |
| 238 | if (err < 0) { | ||
| 239 | ret = err; | ||
| 240 | break; | 238 | break; |
| 241 | } | ||
| 242 | |||
| 243 | len--; | 239 | len--; |
| 244 | buf++; | 240 | buf++; |
| 245 | off++; | 241 | off++; |
| @@ -253,11 +249,9 @@ int bbc_i2c_read_buf(struct bbc_i2c_client *client, | |||
| 253 | int ret = 0; | 249 | int ret = 0; |
| 254 | 250 | ||
| 255 | while (len > 0) { | 251 | while (len > 0) { |
| 256 | int err = bbc_i2c_readb(client, buf, off); | 252 | ret = bbc_i2c_readb(client, buf, off); |
| 257 | if (err < 0) { | 253 | if (ret < 0) |
| 258 | ret = err; | ||
| 259 | break; | 254 | break; |
| 260 | } | ||
| 261 | len--; | 255 | len--; |
| 262 | buf++; | 256 | buf++; |
| 263 | off++; | 257 | off++; |
| @@ -422,17 +416,6 @@ static struct platform_driver bbc_i2c_driver = { | |||
| 422 | .remove = __devexit_p(bbc_i2c_remove), | 416 | .remove = __devexit_p(bbc_i2c_remove), |
| 423 | }; | 417 | }; |
| 424 | 418 | ||
| 425 | static int __init bbc_i2c_init(void) | 419 | module_platform_driver(bbc_i2c_driver); |
| 426 | { | ||
| 427 | return platform_driver_register(&bbc_i2c_driver); | ||
| 428 | } | ||
| 429 | |||
| 430 | static void __exit bbc_i2c_exit(void) | ||
| 431 | { | ||
| 432 | platform_driver_unregister(&bbc_i2c_driver); | ||
| 433 | } | ||
| 434 | |||
| 435 | module_init(bbc_i2c_init); | ||
| 436 | module_exit(bbc_i2c_exit); | ||
| 437 | 420 | ||
| 438 | MODULE_LICENSE("GPL"); | 421 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/sbus/char/display7seg.c b/drivers/sbus/char/display7seg.c index 965a1fccd66a..4b9939726c34 100644 --- a/drivers/sbus/char/display7seg.c +++ b/drivers/sbus/char/display7seg.c | |||
| @@ -275,15 +275,4 @@ static struct platform_driver d7s_driver = { | |||
| 275 | .remove = __devexit_p(d7s_remove), | 275 | .remove = __devexit_p(d7s_remove), |
| 276 | }; | 276 | }; |
| 277 | 277 | ||
| 278 | static int __init d7s_init(void) | 278 | module_platform_driver(d7s_driver); |
| 279 | { | ||
| 280 | return platform_driver_register(&d7s_driver); | ||
| 281 | } | ||
| 282 | |||
| 283 | static void __exit d7s_exit(void) | ||
| 284 | { | ||
| 285 | platform_driver_unregister(&d7s_driver); | ||
| 286 | } | ||
| 287 | |||
| 288 | module_init(d7s_init); | ||
| 289 | module_exit(d7s_exit); | ||
diff --git a/drivers/sbus/char/envctrl.c b/drivers/sbus/char/envctrl.c index be7b4e56154f..339fd6f65eda 100644 --- a/drivers/sbus/char/envctrl.c +++ b/drivers/sbus/char/envctrl.c | |||
| @@ -1138,16 +1138,6 @@ static struct platform_driver envctrl_driver = { | |||
| 1138 | .remove = __devexit_p(envctrl_remove), | 1138 | .remove = __devexit_p(envctrl_remove), |
| 1139 | }; | 1139 | }; |
| 1140 | 1140 | ||
| 1141 | static int __init envctrl_init(void) | 1141 | module_platform_driver(envctrl_driver); |
| 1142 | { | ||
| 1143 | return platform_driver_register(&envctrl_driver); | ||
| 1144 | } | ||
| 1145 | |||
| 1146 | static void __exit envctrl_exit(void) | ||
| 1147 | { | ||
| 1148 | platform_driver_unregister(&envctrl_driver); | ||
| 1149 | } | ||
| 1150 | 1142 | ||
| 1151 | module_init(envctrl_init); | ||
| 1152 | module_exit(envctrl_exit); | ||
| 1153 | MODULE_LICENSE("GPL"); | 1143 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/sbus/char/flash.c b/drivers/sbus/char/flash.c index 73dd4e7afaaa..826157f38694 100644 --- a/drivers/sbus/char/flash.c +++ b/drivers/sbus/char/flash.c | |||
| @@ -216,16 +216,6 @@ static struct platform_driver flash_driver = { | |||
| 216 | .remove = __devexit_p(flash_remove), | 216 | .remove = __devexit_p(flash_remove), |
| 217 | }; | 217 | }; |
| 218 | 218 | ||
| 219 | static int __init flash_init(void) | 219 | module_platform_driver(flash_driver); |
| 220 | { | ||
| 221 | return platform_driver_register(&flash_driver); | ||
| 222 | } | ||
| 223 | |||
| 224 | static void __exit flash_cleanup(void) | ||
| 225 | { | ||
| 226 | platform_driver_unregister(&flash_driver); | ||
| 227 | } | ||
| 228 | 220 | ||
| 229 | module_init(flash_init); | ||
| 230 | module_exit(flash_cleanup); | ||
| 231 | MODULE_LICENSE("GPL"); | 221 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/sbus/char/uctrl.c b/drivers/sbus/char/uctrl.c index ebce9639a26a..0b31658ccde5 100644 --- a/drivers/sbus/char/uctrl.c +++ b/drivers/sbus/char/uctrl.c | |||
| @@ -435,16 +435,6 @@ static struct platform_driver uctrl_driver = { | |||
| 435 | }; | 435 | }; |
| 436 | 436 | ||
| 437 | 437 | ||
| 438 | static int __init uctrl_init(void) | 438 | module_platform_driver(uctrl_driver); |
| 439 | { | ||
| 440 | return platform_driver_register(&uctrl_driver); | ||
| 441 | } | ||
| 442 | |||
| 443 | static void __exit uctrl_exit(void) | ||
| 444 | { | ||
| 445 | platform_driver_unregister(&uctrl_driver); | ||
| 446 | } | ||
| 447 | 439 | ||
| 448 | module_init(uctrl_init); | ||
| 449 | module_exit(uctrl_exit); | ||
| 450 | MODULE_LICENSE("GPL"); | 440 | MODULE_LICENSE("GPL"); |
