mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -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
|
|
@ -375,8 +375,11 @@ static struct of_device_id of_flash_match[] = {
|
|||
MODULE_DEVICE_TABLE(of, of_flash_match);
|
||||
|
||||
static struct of_platform_driver of_flash_driver = {
|
||||
.name = "of-flash",
|
||||
.match_table = of_flash_match,
|
||||
.driver = {
|
||||
.name = "of-flash",
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = of_flash_match,
|
||||
},
|
||||
.probe = of_flash_probe,
|
||||
.remove = of_flash_remove,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -149,8 +149,11 @@ static const struct of_device_id uflash_match[] = {
|
|||
MODULE_DEVICE_TABLE(of, uflash_match);
|
||||
|
||||
static struct of_platform_driver uflash_driver = {
|
||||
.name = DRIVER_NAME,
|
||||
.match_table = uflash_match,
|
||||
.driver = {
|
||||
.name = DRIVER_NAME,
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = uflash_match,
|
||||
},
|
||||
.probe = uflash_probe,
|
||||
.remove = __devexit_p(uflash_remove),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1078,9 +1078,10 @@ static const struct of_device_id fsl_elbc_match[] = {
|
|||
|
||||
static struct of_platform_driver fsl_elbc_ctrl_driver = {
|
||||
.driver = {
|
||||
.name = "fsl-elbc",
|
||||
.name = "fsl-elbc",
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = fsl_elbc_match,
|
||||
},
|
||||
.match_table = fsl_elbc_match,
|
||||
.probe = fsl_elbc_ctrl_probe,
|
||||
.remove = fsl_elbc_ctrl_remove,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -357,8 +357,11 @@ static struct of_device_id of_fun_match[] = {
|
|||
MODULE_DEVICE_TABLE(of, of_fun_match);
|
||||
|
||||
static struct of_platform_driver of_fun_driver = {
|
||||
.name = "fsl,upm-nand",
|
||||
.match_table = of_fun_match,
|
||||
.driver = {
|
||||
.name = "fsl,upm-nand",
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = of_fun_match,
|
||||
},
|
||||
.probe = fun_probe,
|
||||
.remove = __devexit_p(fun_remove),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -294,9 +294,10 @@ MODULE_DEVICE_TABLE(of, ndfc_match);
|
|||
|
||||
static struct of_platform_driver ndfc_driver = {
|
||||
.driver = {
|
||||
.name = "ndfc",
|
||||
.name = "ndfc",
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = ndfc_match,
|
||||
},
|
||||
.match_table = ndfc_match,
|
||||
.probe = ndfc_probe,
|
||||
.remove = __devexit_p(ndfc_remove),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -221,8 +221,11 @@ MODULE_DEVICE_TABLE(of, pasemi_nand_match);
|
|||
|
||||
static struct of_platform_driver pasemi_nand_driver =
|
||||
{
|
||||
.name = (char*)driver_name,
|
||||
.match_table = pasemi_nand_match,
|
||||
.driver = {
|
||||
.name = (char*)driver_name,
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = pasemi_nand_match,
|
||||
},
|
||||
.probe = pasemi_nand_probe,
|
||||
.remove = pasemi_nand_remove,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -301,8 +301,11 @@ static struct of_device_id socrates_nand_match[] =
|
|||
MODULE_DEVICE_TABLE(of, socrates_nand_match);
|
||||
|
||||
static struct of_platform_driver socrates_nand_driver = {
|
||||
.name = "socrates_nand",
|
||||
.match_table = socrates_nand_match,
|
||||
.driver = {
|
||||
.name = "socrates_nand",
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = socrates_nand_match,
|
||||
},
|
||||
.probe = socrates_nand_probe,
|
||||
.remove = __devexit_p(socrates_nand_remove),
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue