aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/sbus
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2010-04-13 19:13:02 -0400
committerGrant Likely <grant.likely@secretlab.ca>2010-05-22 02:10:40 -0400
commit4018294b53d1dae026880e45f174c1cc63b5d435 (patch)
tree6db3538eaf91b653381720a6d92f4f15634a93d0 /drivers/sbus
parent597b9d1e44e9ba69f2454a5318bbe7a6d5e6930a (diff)
of: Remove duplicate fields from of_platform_driver
.name, .match_table and .owner are duplicated in both of_platform_driver and device_driver. This patch is a removes the extra copies from struct of_platform_driver and converts all users to the device_driver members. This patch is a pretty mechanical change. The usage model doesn't change and if any drivers have been missed, or if anything has been fixed up incorrectly, then it will fail with a compile time error, and the fixup will be trivial. This patch looks big and scary because it touches so many files, but it should be pretty safe. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Sean MacLennan <smaclennan@pikatech.com>
Diffstat (limited to 'drivers/sbus')
-rw-r--r--drivers/sbus/char/bbc_i2c.c7
-rw-r--r--drivers/sbus/char/display7seg.c7
-rw-r--r--drivers/sbus/char/envctrl.c7
-rw-r--r--drivers/sbus/char/flash.c7
-rw-r--r--drivers/sbus/char/uctrl.c7
5 files changed, 25 insertions, 10 deletions
diff --git a/drivers/sbus/char/bbc_i2c.c b/drivers/sbus/char/bbc_i2c.c
index 1543ac32b79b..8bfdd63a1fcb 100644
--- a/drivers/sbus/char/bbc_i2c.c
+++ b/drivers/sbus/char/bbc_i2c.c
@@ -414,8 +414,11 @@ static const struct of_device_id bbc_i2c_match[] = {
414MODULE_DEVICE_TABLE(of, bbc_i2c_match); 414MODULE_DEVICE_TABLE(of, bbc_i2c_match);
415 415
416static struct of_platform_driver bbc_i2c_driver = { 416static struct of_platform_driver bbc_i2c_driver = {
417 .name = "bbc_i2c", 417 .driver = {
418 .match_table = bbc_i2c_match, 418 .name = "bbc_i2c",
419 .owner = THIS_MODULE,
420 .of_match_table = bbc_i2c_match,
421 },
419 .probe = bbc_i2c_probe, 422 .probe = bbc_i2c_probe,
420 .remove = __devexit_p(bbc_i2c_remove), 423 .remove = __devexit_p(bbc_i2c_remove),
421}; 424};
diff --git a/drivers/sbus/char/display7seg.c b/drivers/sbus/char/display7seg.c
index 7fc7f34f3466..7baf1b644039 100644
--- a/drivers/sbus/char/display7seg.c
+++ b/drivers/sbus/char/display7seg.c
@@ -266,8 +266,11 @@ static const struct of_device_id d7s_match[] = {
266MODULE_DEVICE_TABLE(of, d7s_match); 266MODULE_DEVICE_TABLE(of, d7s_match);
267 267
268static struct of_platform_driver d7s_driver = { 268static struct of_platform_driver d7s_driver = {
269 .name = DRIVER_NAME, 269 .driver = {
270 .match_table = d7s_match, 270 .name = DRIVER_NAME,
271 .owner = THIS_MODULE,
272 .of_match_table = d7s_match,
273 },
271 .probe = d7s_probe, 274 .probe = d7s_probe,
272 .remove = __devexit_p(d7s_remove), 275 .remove = __devexit_p(d7s_remove),
273}; 276};
diff --git a/drivers/sbus/char/envctrl.c b/drivers/sbus/char/envctrl.c
index a5fe20faf4f7..c8166ecf5276 100644
--- a/drivers/sbus/char/envctrl.c
+++ b/drivers/sbus/char/envctrl.c
@@ -1131,8 +1131,11 @@ static const struct of_device_id envctrl_match[] = {
1131MODULE_DEVICE_TABLE(of, envctrl_match); 1131MODULE_DEVICE_TABLE(of, envctrl_match);
1132 1132
1133static struct of_platform_driver envctrl_driver = { 1133static struct of_platform_driver envctrl_driver = {
1134 .name = DRIVER_NAME, 1134 .driver = {
1135 .match_table = envctrl_match, 1135 .name = DRIVER_NAME,
1136 .owner = THIS_MODULE,
1137 .of_match_table = envctrl_match,
1138 },
1136 .probe = envctrl_probe, 1139 .probe = envctrl_probe,
1137 .remove = __devexit_p(envctrl_remove), 1140 .remove = __devexit_p(envctrl_remove),
1138}; 1141};
diff --git a/drivers/sbus/char/flash.c b/drivers/sbus/char/flash.c
index 202ff8f75afb..0427e586975f 100644
--- a/drivers/sbus/char/flash.c
+++ b/drivers/sbus/char/flash.c
@@ -207,8 +207,11 @@ static const struct of_device_id flash_match[] = {
207MODULE_DEVICE_TABLE(of, flash_match); 207MODULE_DEVICE_TABLE(of, flash_match);
208 208
209static struct of_platform_driver flash_driver = { 209static struct of_platform_driver flash_driver = {
210 .name = "flash", 210 .driver = {
211 .match_table = flash_match, 211 .name = "flash",
212 .owner = THIS_MODULE,
213 .of_match_table = flash_match,
214 },
212 .probe = flash_probe, 215 .probe = flash_probe,
213 .remove = __devexit_p(flash_remove), 216 .remove = __devexit_p(flash_remove),
214}; 217};
diff --git a/drivers/sbus/char/uctrl.c b/drivers/sbus/char/uctrl.c
index acc6738aa61f..5f253665a1da 100644
--- a/drivers/sbus/char/uctrl.c
+++ b/drivers/sbus/char/uctrl.c
@@ -425,8 +425,11 @@ static const struct of_device_id uctrl_match[] = {
425MODULE_DEVICE_TABLE(of, uctrl_match); 425MODULE_DEVICE_TABLE(of, uctrl_match);
426 426
427static struct of_platform_driver uctrl_driver = { 427static struct of_platform_driver uctrl_driver = {
428 .name = "uctrl", 428 .driver = {
429 .match_table = uctrl_match, 429 .name = "uctrl",
430 .owner = THIS_MODULE,
431 .of_match_table = uctrl_match,
432 },
430 .probe = uctrl_probe, 433 .probe = uctrl_probe,
431 .remove = __devexit_p(uctrl_remove), 434 .remove = __devexit_p(uctrl_remove),
432}; 435};