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>
This commit is contained in:
@ -1158,8 +1158,11 @@ static struct of_device_id fs_enet_match[] = {
|
||||
MODULE_DEVICE_TABLE(of, fs_enet_match);
|
||||
|
||||
static struct of_platform_driver fs_enet_driver = {
|
||||
.name = "fs_enet",
|
||||
.match_table = fs_enet_match,
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "fs_enet",
|
||||
.of_match_table = fs_enet_match,
|
||||
},
|
||||
.probe = fs_enet_probe,
|
||||
.remove = fs_enet_remove,
|
||||
};
|
||||
|
@ -224,8 +224,11 @@ static struct of_device_id fs_enet_mdio_bb_match[] = {
|
||||
MODULE_DEVICE_TABLE(of, fs_enet_mdio_bb_match);
|
||||
|
||||
static struct of_platform_driver fs_enet_bb_mdio_driver = {
|
||||
.name = "fsl-bb-mdio",
|
||||
.match_table = fs_enet_mdio_bb_match,
|
||||
.driver = {
|
||||
.name = "fsl-bb-mdio",
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = fs_enet_mdio_bb_match,
|
||||
},
|
||||
.probe = fs_enet_mdio_probe,
|
||||
.remove = fs_enet_mdio_remove,
|
||||
};
|
||||
|
@ -222,8 +222,11 @@ static struct of_device_id fs_enet_mdio_fec_match[] = {
|
||||
MODULE_DEVICE_TABLE(of, fs_enet_mdio_fec_match);
|
||||
|
||||
static struct of_platform_driver fs_enet_fec_mdio_driver = {
|
||||
.name = "fsl-fec-mdio",
|
||||
.match_table = fs_enet_mdio_fec_match,
|
||||
.driver = {
|
||||
.name = "fsl-fec-mdio",
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = fs_enet_mdio_fec_match,
|
||||
},
|
||||
.probe = fs_enet_mdio_probe,
|
||||
.remove = fs_enet_mdio_remove,
|
||||
};
|
||||
|
Reference in New Issue
Block a user