diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2010-04-13 19:13:02 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-05-22 02:10:40 -0400 |
commit | 4018294b53d1dae026880e45f174c1cc63b5d435 (patch) | |
tree | 6db3538eaf91b653381720a6d92f4f15634a93d0 /drivers/watchdog | |
parent | 597b9d1e44e9ba69f2454a5318bbe7a6d5e6930a (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/watchdog')
-rw-r--r-- | drivers/watchdog/cpwd.c | 7 | ||||
-rw-r--r-- | drivers/watchdog/gef_wdt.c | 8 | ||||
-rw-r--r-- | drivers/watchdog/mpc8xxx_wdt.c | 8 | ||||
-rw-r--r-- | drivers/watchdog/riowd.c | 7 |
4 files changed, 19 insertions, 11 deletions
diff --git a/drivers/watchdog/cpwd.c b/drivers/watchdog/cpwd.c index 2fcc3cf7ef62..d62b9ce8f773 100644 --- a/drivers/watchdog/cpwd.c +++ b/drivers/watchdog/cpwd.c | |||
@@ -677,8 +677,11 @@ static const struct of_device_id cpwd_match[] = { | |||
677 | MODULE_DEVICE_TABLE(of, cpwd_match); | 677 | MODULE_DEVICE_TABLE(of, cpwd_match); |
678 | 678 | ||
679 | static struct of_platform_driver cpwd_driver = { | 679 | static struct of_platform_driver cpwd_driver = { |
680 | .name = DRIVER_NAME, | 680 | .driver = { |
681 | .match_table = cpwd_match, | 681 | .name = DRIVER_NAME, |
682 | .owner = THIS_MODULE, | ||
683 | .of_match_table = cpwd_match, | ||
684 | }, | ||
682 | .probe = cpwd_probe, | 685 | .probe = cpwd_probe, |
683 | .remove = __devexit_p(cpwd_remove), | 686 | .remove = __devexit_p(cpwd_remove), |
684 | }; | 687 | }; |
diff --git a/drivers/watchdog/gef_wdt.c b/drivers/watchdog/gef_wdt.c index abdbad034a6c..ca0f4c6cf5ab 100644 --- a/drivers/watchdog/gef_wdt.c +++ b/drivers/watchdog/gef_wdt.c | |||
@@ -303,9 +303,11 @@ static const struct of_device_id gef_wdt_ids[] = { | |||
303 | }; | 303 | }; |
304 | 304 | ||
305 | static struct of_platform_driver gef_wdt_driver = { | 305 | static struct of_platform_driver gef_wdt_driver = { |
306 | .owner = THIS_MODULE, | 306 | .driver = { |
307 | .name = "gef_wdt", | 307 | .name = "gef_wdt", |
308 | .match_table = gef_wdt_ids, | 308 | .owner = THIS_MODULE, |
309 | .of_match_table = gef_wdt_ids, | ||
310 | }, | ||
309 | .probe = gef_wdt_probe, | 311 | .probe = gef_wdt_probe, |
310 | }; | 312 | }; |
311 | 313 | ||
diff --git a/drivers/watchdog/mpc8xxx_wdt.c b/drivers/watchdog/mpc8xxx_wdt.c index 4e3941c5e293..7b55974191dd 100644 --- a/drivers/watchdog/mpc8xxx_wdt.c +++ b/drivers/watchdog/mpc8xxx_wdt.c | |||
@@ -273,12 +273,12 @@ static const struct of_device_id mpc8xxx_wdt_match[] = { | |||
273 | MODULE_DEVICE_TABLE(of, mpc8xxx_wdt_match); | 273 | MODULE_DEVICE_TABLE(of, mpc8xxx_wdt_match); |
274 | 274 | ||
275 | static struct of_platform_driver mpc8xxx_wdt_driver = { | 275 | static struct of_platform_driver mpc8xxx_wdt_driver = { |
276 | .match_table = mpc8xxx_wdt_match, | ||
277 | .probe = mpc8xxx_wdt_probe, | 276 | .probe = mpc8xxx_wdt_probe, |
278 | .remove = __devexit_p(mpc8xxx_wdt_remove), | 277 | .remove = __devexit_p(mpc8xxx_wdt_remove), |
279 | .driver = { | 278 | .driver = { |
280 | .name = "mpc8xxx_wdt", | 279 | .name = "mpc8xxx_wdt", |
281 | .owner = THIS_MODULE, | 280 | .owner = THIS_MODULE, |
281 | .of_match_table = mpc8xxx_wdt_match, | ||
282 | }, | 282 | }, |
283 | }; | 283 | }; |
284 | 284 | ||
diff --git a/drivers/watchdog/riowd.c b/drivers/watchdog/riowd.c index ea7f803f6248..5dceeddc8859 100644 --- a/drivers/watchdog/riowd.c +++ b/drivers/watchdog/riowd.c | |||
@@ -239,8 +239,11 @@ static const struct of_device_id riowd_match[] = { | |||
239 | MODULE_DEVICE_TABLE(of, riowd_match); | 239 | MODULE_DEVICE_TABLE(of, riowd_match); |
240 | 240 | ||
241 | static struct of_platform_driver riowd_driver = { | 241 | static struct of_platform_driver riowd_driver = { |
242 | .name = DRIVER_NAME, | 242 | .driver = { |
243 | .match_table = riowd_match, | 243 | .name = DRIVER_NAME, |
244 | .owner = THIS_MODULE, | ||
245 | .of_match_table = riowd_match, | ||
246 | }, | ||
244 | .probe = riowd_probe, | 247 | .probe = riowd_probe, |
245 | .remove = __devexit_p(riowd_remove), | 248 | .remove = __devexit_p(riowd_remove), |
246 | }; | 249 | }; |