aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/maps
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/mtd/maps
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/mtd/maps')
-rw-r--r--drivers/mtd/maps/physmap_of.c7
-rw-r--r--drivers/mtd/maps/sun_uflash.c7
2 files changed, 10 insertions, 4 deletions
diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c
index 3dc7a2fbf025..4147fe328c55 100644
--- a/drivers/mtd/maps/physmap_of.c
+++ b/drivers/mtd/maps/physmap_of.c
@@ -375,8 +375,11 @@ static struct of_device_id of_flash_match[] = {
375MODULE_DEVICE_TABLE(of, of_flash_match); 375MODULE_DEVICE_TABLE(of, of_flash_match);
376 376
377static struct of_platform_driver of_flash_driver = { 377static struct of_platform_driver of_flash_driver = {
378 .name = "of-flash", 378 .driver = {
379 .match_table = of_flash_match, 379 .name = "of-flash",
380 .owner = THIS_MODULE,
381 .of_match_table = of_flash_match,
382 },
380 .probe = of_flash_probe, 383 .probe = of_flash_probe,
381 .remove = of_flash_remove, 384 .remove = of_flash_remove,
382}; 385};
diff --git a/drivers/mtd/maps/sun_uflash.c b/drivers/mtd/maps/sun_uflash.c
index 5945a23e681f..0391c2527bd7 100644
--- a/drivers/mtd/maps/sun_uflash.c
+++ b/drivers/mtd/maps/sun_uflash.c
@@ -149,8 +149,11 @@ static const struct of_device_id uflash_match[] = {
149MODULE_DEVICE_TABLE(of, uflash_match); 149MODULE_DEVICE_TABLE(of, uflash_match);
150 150
151static struct of_platform_driver uflash_driver = { 151static struct of_platform_driver uflash_driver = {
152 .name = DRIVER_NAME, 152 .driver = {
153 .match_table = uflash_match, 153 .name = DRIVER_NAME,
154 .owner = THIS_MODULE,
155 .of_match_table = uflash_match,
156 },
154 .probe = uflash_probe, 157 .probe = uflash_probe,
155 .remove = __devexit_p(uflash_remove), 158 .remove = __devexit_p(uflash_remove),
156}; 159};