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:
Grant Likely
2010-04-13 16:13:02 -07:00
parent 597b9d1e44
commit 4018294b53
146 changed files with 671 additions and 387 deletions

View File

@@ -2996,9 +2996,11 @@ static struct of_device_id emac_match[] =
MODULE_DEVICE_TABLE(of, emac_match);
static struct of_platform_driver emac_driver = {
.name = "emac",
.match_table = emac_match,
.driver = {
.name = "emac",
.owner = THIS_MODULE,
.of_match_table = emac_match,
},
.probe = emac_probe,
.remove = emac_remove,
};

View File

@@ -790,9 +790,11 @@ static struct of_device_id mal_platform_match[] =
};
static struct of_platform_driver mal_of_driver = {
.name = "mcmal",
.match_table = mal_platform_match,
.driver = {
.name = "mcmal",
.owner = THIS_MODULE,
.of_match_table = mal_platform_match,
},
.probe = mal_probe,
.remove = mal_remove,
};

View File

@@ -319,9 +319,11 @@ static struct of_device_id rgmii_match[] =
};
static struct of_platform_driver rgmii_driver = {
.name = "emac-rgmii",
.match_table = rgmii_match,
.driver = {
.name = "emac-rgmii",
.owner = THIS_MODULE,
.of_match_table = rgmii_match,
},
.probe = rgmii_probe,
.remove = rgmii_remove,
};

View File

@@ -166,9 +166,11 @@ static struct of_device_id tah_match[] =
};
static struct of_platform_driver tah_driver = {
.name = "emac-tah",
.match_table = tah_match,
.driver = {
.name = "emac-tah",
.owner = THIS_MODULE,
.of_match_table = tah_match,
},
.probe = tah_probe,
.remove = tah_remove,
};

View File

@@ -313,9 +313,11 @@ static struct of_device_id zmii_match[] =
};
static struct of_platform_driver zmii_driver = {
.name = "emac-zmii",
.match_table = zmii_match,
.driver = {
.name = "emac-zmii",
.owner = THIS_MODULE,
.of_match_table = zmii_match,
},
.probe = zmii_probe,
.remove = zmii_remove,
};