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
|
|
@ -376,8 +376,11 @@ static const struct of_device_id bw2_match[] = {
|
|||
MODULE_DEVICE_TABLE(of, bw2_match);
|
||||
|
||||
static struct of_platform_driver bw2_driver = {
|
||||
.name = "bw2",
|
||||
.match_table = bw2_match,
|
||||
.driver = {
|
||||
.name = "bw2",
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = bw2_match,
|
||||
},
|
||||
.probe = bw2_probe,
|
||||
.remove = __devexit_p(bw2_remove),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -596,8 +596,11 @@ static const struct of_device_id cg14_match[] = {
|
|||
MODULE_DEVICE_TABLE(of, cg14_match);
|
||||
|
||||
static struct of_platform_driver cg14_driver = {
|
||||
.name = "cg14",
|
||||
.match_table = cg14_match,
|
||||
.driver = {
|
||||
.name = "cg14",
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = cg14_match,
|
||||
},
|
||||
.probe = cg14_probe,
|
||||
.remove = __devexit_p(cg14_remove),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -463,8 +463,11 @@ static const struct of_device_id cg3_match[] = {
|
|||
MODULE_DEVICE_TABLE(of, cg3_match);
|
||||
|
||||
static struct of_platform_driver cg3_driver = {
|
||||
.name = "cg3",
|
||||
.match_table = cg3_match,
|
||||
.driver = {
|
||||
.name = "cg3",
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = cg3_match,
|
||||
},
|
||||
.probe = cg3_probe,
|
||||
.remove = __devexit_p(cg3_remove),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -856,8 +856,11 @@ static const struct of_device_id cg6_match[] = {
|
|||
MODULE_DEVICE_TABLE(of, cg6_match);
|
||||
|
||||
static struct of_platform_driver cg6_driver = {
|
||||
.name = "cg6",
|
||||
.match_table = cg6_match,
|
||||
.driver = {
|
||||
.name = "cg6",
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = cg6_match,
|
||||
},
|
||||
.probe = cg6_probe,
|
||||
.remove = __devexit_p(cg6_remove),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1053,8 +1053,11 @@ static const struct of_device_id ffb_match[] = {
|
|||
MODULE_DEVICE_TABLE(of, ffb_match);
|
||||
|
||||
static struct of_platform_driver ffb_driver = {
|
||||
.name = "ffb",
|
||||
.match_table = ffb_match,
|
||||
.driver = {
|
||||
.name = "ffb",
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = ffb_match,
|
||||
},
|
||||
.probe = ffb_probe,
|
||||
.remove = __devexit_p(ffb_remove),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1647,9 +1647,11 @@ static struct of_device_id fsl_diu_match[] = {
|
|||
MODULE_DEVICE_TABLE(of, fsl_diu_match);
|
||||
|
||||
static struct of_platform_driver fsl_diu_driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "fsl_diu",
|
||||
.match_table = fsl_diu_match,
|
||||
.driver = {
|
||||
.name = "fsl_diu",
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = fsl_diu_match,
|
||||
},
|
||||
.probe = fsl_diu_probe,
|
||||
.remove = fsl_diu_remove,
|
||||
.suspend = fsl_diu_suspend,
|
||||
|
|
|
|||
|
|
@ -663,8 +663,11 @@ static const struct of_device_id leo_match[] = {
|
|||
MODULE_DEVICE_TABLE(of, leo_match);
|
||||
|
||||
static struct of_platform_driver leo_driver = {
|
||||
.name = "leo",
|
||||
.match_table = leo_match,
|
||||
.driver = {
|
||||
.name = "leo",
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = leo_match,
|
||||
},
|
||||
.probe = leo_probe,
|
||||
.remove = __devexit_p(leo_remove),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -718,9 +718,11 @@ static struct of_device_id __devinitdata of_platform_mb862xx_tbl[] = {
|
|||
};
|
||||
|
||||
static struct of_platform_driver of_platform_mb862xxfb_driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = DRV_NAME,
|
||||
.match_table = of_platform_mb862xx_tbl,
|
||||
.driver = {
|
||||
.name = DRV_NAME,
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = of_platform_mb862xx_tbl,
|
||||
},
|
||||
.probe = of_platform_mb862xx_probe,
|
||||
.remove = __devexit_p(of_platform_mb862xx_remove),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -353,8 +353,11 @@ static const struct of_device_id p9100_match[] = {
|
|||
MODULE_DEVICE_TABLE(of, p9100_match);
|
||||
|
||||
static struct of_platform_driver p9100_driver = {
|
||||
.name = "p9100",
|
||||
.match_table = p9100_match,
|
||||
.driver = {
|
||||
.name = "p9100",
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = p9100_match,
|
||||
},
|
||||
.probe = p9100_probe,
|
||||
.remove = __devexit_p(p9100_remove),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -679,8 +679,11 @@ static struct of_device_id platinumfb_match[] =
|
|||
|
||||
static struct of_platform_driver platinum_driver =
|
||||
{
|
||||
.name = "platinumfb",
|
||||
.match_table = platinumfb_match,
|
||||
.driver = {
|
||||
.name = "platinumfb",
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = platinumfb_match,
|
||||
},
|
||||
.probe = platinumfb_probe,
|
||||
.remove = platinumfb_remove,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -199,10 +199,13 @@ static const struct of_device_id gfb_match[] = {
|
|||
MODULE_DEVICE_TABLE(of, ffb_match);
|
||||
|
||||
static struct of_platform_driver gfb_driver = {
|
||||
.name = "gfb",
|
||||
.match_table = gfb_match,
|
||||
.probe = gfb_probe,
|
||||
.remove = __devexit_p(gfb_remove),
|
||||
.driver = {
|
||||
.name = "gfb",
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = gfb_match,
|
||||
},
|
||||
};
|
||||
|
||||
static int __init gfb_init(void)
|
||||
|
|
|
|||
|
|
@ -512,8 +512,11 @@ static const struct of_device_id tcx_match[] = {
|
|||
MODULE_DEVICE_TABLE(of, tcx_match);
|
||||
|
||||
static struct of_platform_driver tcx_driver = {
|
||||
.name = "tcx",
|
||||
.match_table = tcx_match,
|
||||
.driver = {
|
||||
.name = "tcx",
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = tcx_match,
|
||||
},
|
||||
.probe = tcx_probe,
|
||||
.remove = __devexit_p(tcx_remove),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -492,13 +492,12 @@ static struct of_device_id xilinxfb_of_match[] __devinitdata = {
|
|||
MODULE_DEVICE_TABLE(of, xilinxfb_of_match);
|
||||
|
||||
static struct of_platform_driver xilinxfb_of_driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = DRIVER_NAME,
|
||||
.match_table = xilinxfb_of_match,
|
||||
.probe = xilinxfb_of_probe,
|
||||
.remove = __devexit_p(xilinxfb_of_remove),
|
||||
.driver = {
|
||||
.name = DRIVER_NAME,
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = xilinxfb_of_match,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue