diff options
| author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2005-11-09 17:32:44 -0500 |
|---|---|---|
| committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2005-11-09 17:32:44 -0500 |
| commit | 3ae5eaec1d2d9c0cf53745352e7d4b152810ba24 (patch) | |
| tree | d8825be54cefb6ad6707478d719c8e30605bee7b | |
| parent | 00d3dcdd96646be6059cc21f2efa94c4edc1eda5 (diff) | |
[DRIVER MODEL] Convert platform drivers to use struct platform_driver
This allows us to eliminate the casts in the drivers, and eventually
remove the use of the device_driver function pointer methods for
platform device drivers.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
93 files changed, 1413 insertions, 1416 deletions
diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c index ad55680726ed..557e52c1c869 100644 --- a/arch/arm/common/locomo.c +++ b/arch/arm/common/locomo.c | |||
| @@ -550,9 +550,9 @@ struct locomo_save_data { | |||
| 550 | u16 LCM_SPIMD; | 550 | u16 LCM_SPIMD; |
| 551 | }; | 551 | }; |
| 552 | 552 | ||
| 553 | static int locomo_suspend(struct device *dev, pm_message_t state) | 553 | static int locomo_suspend(struct platform_device *dev, pm_message_t state) |
| 554 | { | 554 | { |
| 555 | struct locomo *lchip = dev_get_drvdata(dev); | 555 | struct locomo *lchip = platform_get_drvdata(dev); |
| 556 | struct locomo_save_data *save; | 556 | struct locomo_save_data *save; |
| 557 | unsigned long flags; | 557 | unsigned long flags; |
| 558 | 558 | ||
| @@ -560,7 +560,7 @@ static int locomo_suspend(struct device *dev, pm_message_t state) | |||
| 560 | if (!save) | 560 | if (!save) |
| 561 | return -ENOMEM; | 561 | return -ENOMEM; |
| 562 | 562 | ||
| 563 | dev->power.saved_state = (void *) save; | 563 | dev->dev.power.saved_state = (void *) save; |
| 564 | 564 | ||
| 565 | spin_lock_irqsave(&lchip->lock, flags); | 565 | spin_lock_irqsave(&lchip->lock, flags); |
| 566 | 566 | ||
| @@ -594,14 +594,14 @@ static int locomo_suspend(struct device *dev, pm_message_t state) | |||
| 594 | return 0; | 594 | return 0; |
| 595 | } | 595 | } |
| 596 | 596 | ||
| 597 | static int locomo_resume(struct device *dev) | 597 | static int locomo_resume(struct platform_device *dev) |
| 598 | { | 598 | { |
| 599 | struct locomo *lchip = dev_get_drvdata(dev); | 599 | struct locomo *lchip = platform_get_drvdata(dev); |
| 600 | struct locomo_save_data *save; | 600 | struct locomo_save_data *save; |
| 601 | unsigned long r; | 601 | unsigned long r; |
| 602 | unsigned long flags; | 602 | unsigned long flags; |
| 603 | 603 | ||
| 604 | save = (struct locomo_save_data *) dev->power.saved_state; | 604 | save = (struct locomo_save_data *) dev->dev.power.saved_state; |
| 605 | if (!save) | 605 | if (!save) |
| 606 | return 0; | 606 | return 0; |
| 607 | 607< | ||
