diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2010-04-13 19:13:02 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-05-22 02:10:40 -0400 |
commit | 4018294b53d1dae026880e45f174c1cc63b5d435 (patch) | |
tree | 6db3538eaf91b653381720a6d92f4f15634a93d0 /drivers/i2c/busses | |
parent | 597b9d1e44e9ba69f2454a5318bbe7a6d5e6930a (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/i2c/busses')
-rw-r--r-- | drivers/i2c/busses/i2c-cpm.c | 10 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-ibm_iic.c | 7 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-mpc.c | 8 |
3 files changed, 14 insertions, 11 deletions
diff --git a/drivers/i2c/busses/i2c-cpm.c b/drivers/i2c/busses/i2c-cpm.c index 48d2c1a0d4ce..7637e1234142 100644 --- a/drivers/i2c/busses/i2c-cpm.c +++ b/drivers/i2c/busses/i2c-cpm.c | |||
@@ -718,13 +718,13 @@ static const struct of_device_id cpm_i2c_match[] = { | |||
718 | MODULE_DEVICE_TABLE(of, cpm_i2c_match); | 718 | MODULE_DEVICE_TABLE(of, cpm_i2c_match); |
719 | 719 | ||
720 | static struct of_platform_driver cpm_i2c_driver = { | 720 | static struct of_platform_driver cpm_i2c_driver = { |
721 | .match_table = cpm_i2c_match, | ||
722 | .probe = cpm_i2c_probe, | 721 | .probe = cpm_i2c_probe, |
723 | .remove = __devexit_p(cpm_i2c_remove), | 722 | .remove = __devexit_p(cpm_i2c_remove), |
724 | .driver = { | 723 | .driver = { |
725 | .name = "fsl-i2c-cpm", | 724 | .name = "fsl-i2c-cpm", |
726 | .owner = THIS_MODULE, | 725 | .owner = THIS_MODULE, |
727 | } | 726 | .of_match_table = cpm_i2c_match, |
727 | }, | ||
728 | }; | 728 | }; |
729 | 729 | ||
730 | static int __init cpm_i2c_init(void) | 730 | static int __init cpm_i2c_init(void) |
diff --git a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_iic.c index e66dc83953c5..3876f993fe76 100644 --- a/drivers/i2c/busses/i2c-ibm_iic.c +++ b/drivers/i2c/busses/i2c-ibm_iic.c | |||
@@ -807,8 +807,11 @@ static const struct of_device_id ibm_iic_match[] = { | |||
807 | }; | 807 | }; |
808 | 808 | ||
809 | static struct of_platform_driver ibm_iic_driver = { | 809 | static struct of_platform_driver ibm_iic_driver = { |
810 | .name = "ibm-iic", | 810 | .driver = { |
811 | .match_table = ibm_iic_match, | 811 | .name = "ibm-iic", |
812 | .owner = THIS_MODULE, | ||
813 | .of_match_table = ibm_iic_match, | ||
814 | }, | ||
812 | .probe = iic_probe, | 815 | .probe = iic_probe, |
813 | .remove = __devexit_p(iic_remove), | 816 | .remove = __devexit_p(iic_remove), |
814 | }; | 817 | }; |
diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c index 69473b6c260c..791b71f46f7b 100644 --- a/drivers/i2c/busses/i2c-mpc.c +++ b/drivers/i2c/busses/i2c-mpc.c | |||
@@ -675,12 +675,12 @@ MODULE_DEVICE_TABLE(of, mpc_i2c_of_match); | |||
675 | 675 | ||
676 | /* Structure for a device driver */ | 676 | /* Structure for a device driver */ |
677 | static struct of_platform_driver mpc_i2c_driver = { | 677 | static struct of_platform_driver mpc_i2c_driver = { |
678 | .match_table = mpc_i2c_of_match, | ||
679 | .probe = fsl_i2c_probe, | 678 | .probe = fsl_i2c_probe, |
680 | .remove = __devexit_p(fsl_i2c_remove), | 679 | .remove = __devexit_p(fsl_i2c_remove), |
681 | .driver = { | 680 | .driver = { |
682 | .owner = THIS_MODULE, | 681 | .owner = THIS_MODULE, |
683 | .name = DRV_NAME, | 682 | .name = DRV_NAME, |
683 | .of_match_table = mpc_i2c_of_match, | ||
684 | }, | 684 | }, |
685 | }; | 685 | }; |
686 | 686 | ||