mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -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
|
|
@ -357,8 +357,11 @@ static const struct of_device_id electra_cf_match[] = {
|
|||
MODULE_DEVICE_TABLE(of, electra_cf_match);
|
||||
|
||||
static struct of_platform_driver electra_cf_driver = {
|
||||
.name = (char *)driver_name,
|
||||
.match_table = electra_cf_match,
|
||||
.driver = {
|
||||
.name = (char *)driver_name,
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = electra_cf_match,
|
||||
},
|
||||
.probe = electra_cf_probe,
|
||||
.remove = electra_cf_remove,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1298,8 +1298,11 @@ static const struct of_device_id m8xx_pcmcia_match[] = {
|
|||
MODULE_DEVICE_TABLE(of, m8xx_pcmcia_match);
|
||||
|
||||
static struct of_platform_driver m8xx_pcmcia_driver = {
|
||||
.name = driver_name,
|
||||
.match_table = m8xx_pcmcia_match,
|
||||
.driver = {
|
||||
.name = driver_name,
|
||||
.owner = THIS_MODULE,
|
||||
.match_table = m8xx_pcmcia_match,
|
||||
},
|
||||
.probe = m8xx_probe,
|
||||
.remove = m8xx_remove,
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue