mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
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 <[email protected]> Acked-by: Sean MacLennan <[email protected]>
This commit is contained in:
parent
597b9d1e44
commit
4018294b53
146 changed files with 671 additions and 387 deletions
|
|
@ -414,8 +414,11 @@ static const struct of_device_id bbc_i2c_match[] = {
|
|||
MODULE_DEVICE_TABLE(of, bbc_i2c_match);
|
||||
|
||||
static struct of_platform_driver bbc_i2c_driver = {
|
||||
.name = "bbc_i2c",
|
||||
.match_table = bbc_i2c_match,
|
||||
.driver = {
|
||||
.name = "bbc_i2c",
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = bbc_i2c_match,
|
||||
},
|
||||
.probe = bbc_i2c_probe,
|
||||
.remove = __devexit_p(bbc_i2c_remove),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -266,8 +266,11 @@ static const struct of_device_id d7s_match[] = {
|
|||
MODULE_DEVICE_TABLE(of, d7s_match);
|
||||
|
||||
static struct of_platform_driver d7s_driver = {
|
||||
.name = DRIVER_NAME,
|
||||
.match_table = d7s_match,
|
||||
.driver = {
|
||||
.name = DRIVER_NAME,
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = d7s_match,
|
||||
},
|
||||
.probe = d7s_probe,
|
||||
.remove = __devexit_p(d7s_remove),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1131,8 +1131,11 @@ static const struct of_device_id envctrl_match[] = {
|
|||
MODULE_DEVICE_TABLE(of, envctrl_match);
|
||||
|
||||
static struct of_platform_driver envctrl_driver = {
|
||||
.name = DRIVER_NAME,
|
||||
.match_table = envctrl_match,
|
||||
.driver = {
|
||||
.name = DRIVER_NAME,
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = envctrl_match,
|
||||
},
|
||||
.probe = envctrl_probe,
|
||||
.remove = __devexit_p(envctrl_remove),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -207,8 +207,11 @@ static const struct of_device_id flash_match[] = {
|
|||
MODULE_DEVICE_TABLE(of, flash_match);
|
||||
|
||||
static struct of_platform_driver flash_driver = {
|
||||
.name = "flash",
|
||||
.match_table = flash_match,
|
||||
.driver = {
|
||||
.name = "flash",
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = flash_match,
|
||||
},
|
||||
.probe = flash_probe,
|
||||
.remove = __devexit_p(flash_remove),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -425,8 +425,11 @@ static const struct of_device_id uctrl_match[] = {
|
|||
MODULE_DEVICE_TABLE(of, uctrl_match);
|
||||
|
||||
static struct of_platform_driver uctrl_driver = {
|
||||
.name = "uctrl",
|
||||
.match_table = uctrl_match,
|
||||
.driver = {
|
||||
.name = "uctrl",
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = uctrl_match,
|
||||
},
|
||||
.probe = uctrl_probe,
|
||||
.remove = __devexit_p(uctrl_remove),
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue