aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/hw_random
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/char/hw_random
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/char/hw_random')
-rw-r--r--drivers/char/hw_random/n2-drv.c7
-rw-r--r--drivers/char/hw_random/pasemi-rng.c7
2 files changed, 10 insertions, 4 deletions
diff --git a/drivers/char/hw_random/n2-drv.c b/drivers/char/hw_random/n2-drv.c
index 0861d99cd75b..0f9cbf1aaf15 100644
--- a/drivers/char/hw_random/n2-drv.c
+++ b/drivers/char/hw_random/n2-drv.c
@@ -751,8 +751,11 @@ static const struct of_device_id n2rng_match[] = {
751MODULE_DEVICE_TABLE(of, n2rng_match); 751MODULE_DEVICE_TABLE(of, n2rng_match);
752 752
753static struct of_platform_driver n2rng_driver = { 753static struct of_platform_driver n2rng_driver = {
754 .name = "n2rng", 754 .driver = {
755 .match_table = n2rng_match, 755 .name = "n2rng",
756 .owner = THIS_MODULE,
757 .of_match_table = n2rng_match,
758 },
756 .probe = n2rng_probe, 759 .probe = n2rng_probe,
757 .remove = __devexit_p(n2rng_remove), 760 .remove = __devexit_p(n2rng_remove),
758}; 761};
diff --git a/drivers/char/hw_random/pasemi-rng.c b/drivers/char/hw_random/pasemi-rng.c
index b213855bae68..261ba8f22b8b 100644
--- a/drivers/char/hw_random/pasemi-rng.c
+++ b/drivers/char/hw_random/pasemi-rng.c
@@ -140,8 +140,11 @@ static struct of_device_id rng_match[] = {
140}; 140};
141 141
142static struct of_platform_driver rng_driver = { 142static struct of_platform_driver rng_driver = {
143 .name = "pasemi-rng", 143 .driver = {
144 .match_table = rng_match, 144 .name = "pasemi-rng",
145 .owner = THIS_MODULE,
146 .of_match_table = rng_match,
147 },
145 .probe = rng_probe, 148 .probe = rng_probe,
146 .remove = rng_remove, 149 .remove = rng_remove,
147}; 150};