aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2010-04-13 19:13:02 -0400
committerGrant Likely <grant.likely@secretlab.ca>2010-05-22 02:10:40 -0400
commit4018294b53d1dae026880e45f174c1cc63b5d435 (patch)
tree6db3538eaf91b653381720a6d92f4f15634a93d0 /drivers/macintosh
parent597b9d1e44e9ba69f2454a5318bbe7a6d5e6930a (diff)
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>
Diffstat (limited to 'drivers/macintosh')
-rw-r--r--drivers/macintosh/smu.c7
-rw-r--r--drivers/macintosh/therm_pm72.c7
-rw-r--r--drivers/macintosh/therm_windtunnel.c7
3 files changed, 15 insertions, 6 deletions
diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c
index 888448cf7f1f..ef1f3330a10e 100644
--- a/drivers/macintosh/smu.c
+++ b/drivers/macintosh/smu.c
@@ -671,8 +671,11 @@ static const struct of_device_id smu_platform_match[] =
671 671
672static struct of_platform_driver smu_of_platform_driver = 672static struct of_platform_driver smu_of_platform_driver =
673{ 673{
674 .name = "smu", 674 .driver = {
675 .match_table = smu_platform_match, 675 .name = "smu",
676 .owner = THIS_MODULE,
677 .of_match_table = smu_platform_match,
678 },
676 .probe = smu_platform_probe, 679 .probe = smu_platform_probe,
677}; 680};
678 681
diff --git a/drivers/macintosh/therm_pm72.c b/drivers/macintosh/therm_pm72.c
index 9314be9a2fc8..e60605bd0ea9 100644
--- a/drivers/macintosh/therm_pm72.c
+++ b/drivers/macintosh/therm_pm72.c
@@ -2238,8 +2238,11 @@ static const struct of_device_id fcu_match[] =
2238 2238
2239static struct of_platform_driver fcu_of_platform_driver = 2239static struct of_platform_driver fcu_of_platform_driver =
2240{ 2240{
2241 .name = "temperature", 2241 .driver = {
2242 .match_table = fcu_match, 2242 .name = "temperature",
2243 .owner = THIS_MODULE,
2244 .of_match_table = fcu_match,
2245 },
2243 .probe = fcu_of_probe, 2246 .probe = fcu_of_probe,
2244 .remove = fcu_of_remove 2247 .remove = fcu_of_remove
2245}; 2248};
diff --git a/drivers/macintosh/therm_windtunnel.c b/drivers/macintosh/therm_windtunnel.c
index 0839770e4ec5..5c9367acf0cf 100644
--- a/drivers/macintosh/therm_windtunnel.c
+++ b/drivers/macintosh/therm_windtunnel.c
@@ -463,8 +463,11 @@ static const struct of_device_id therm_of_match[] = {{
463}; 463};
464 464
465static struct of_platform_driver therm_of_driver = { 465static struct of_platform_driver therm_of_driver = {
466 .name = "temperature", 466 .driver = {
467 .match_table = therm_of_match, 467 .name = "temperature",
468 .owner = THIS_MODULE,
469 .of_match_table = therm_of_match,
470 },
468 .probe = therm_of_probe, 471 .probe = therm_of_probe,
469 .remove = therm_of_remove, 472 .remove = therm_of_remove,
470}; 473};