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 /drivers/input/serio/i8042.c | |
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>
Diffstat (limited to 'drivers/input/serio/i8042.c')
-rw-r--r-- | drivers/input/serio/i8042.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c index 01e186422021..ac86c1d1d83e 100644 --- a/drivers/input/serio/i8042.c +++ b/drivers/input/serio/i8042.c | |||
@@ -912,7 +912,7 @@ static long i8042_panic_blink(long count) | |||
912 | * Here we try to restore the original BIOS settings | 912 | * Here we try to restore the original BIOS settings |
913 | */ | 913 | */ |
914 | 914 | ||
915 | static int i8042_suspend(struct device *dev, pm_message_t state) | 915 | static int i8042_suspend(struct platform_device *dev, pm_message_t state) |
916 | { | 916 | { |
917 | del_timer_sync(&i8042_timer); | 917 | del_timer_sync(&i8042_timer); |
918 | i8042_controller_reset(); | 918 | i8042_controller_reset(); |
@@ -925,7 +925,7 @@ static int i8042_suspend(struct device *dev, pm_message_t state) | |||
925 | * Here we try to reset everything back to a state in which suspended | 925 | * Here we try to reset everything back to a state in which suspended |
926 | */ | 926 | */ |
927 | 927 | ||
928 | static int i8042_resume(struct device *dev) | 928 | static int i8042_resume(struct platform_device *dev) |
929 | { | 929 | { |
930 | int i; | 930 | int i; |
931 | 931 | ||
@@ -964,17 +964,18 @@ static int i8042_resume(struct device *dev) | |||
964 | * because otherwise BIOSes will be confused. | 964 | * because otherwise BIOSes will be confused. |
965 | */ | 965 | */ |
966 | 966 | ||
967 | static void i8042_shutdown(struct device *dev) | 967 | static void i8042_shutdown(struct platform_device *dev) |
968 | { | 968 | { |
969 | i8042_controller_cleanup(); | 969 | i8042_controller_cleanup(); |
970 | } | 970 | } |
971 | 971 | ||
972 | static struct device_driver i8042_driver = { | 972 | static struct platform_driver i8042_driver = { |
973 | .name = "i8042", | ||
974 | .bus = &platform_bus_type, | ||
975 | .suspend = i8042_suspend, | 973 | .suspend = i8042_suspend, |
976 | .resume = i8042_resume, | 974 | .resume = i8042_resume, |
977 | .shutdown = i8042_shutdown, | 975 | .shutdown = i8042_shutdown, |
976 | .driver = { | ||
977 | .name = "i8042", | ||
978 | }, | ||
978 | }; | 979 | }; |
979 | 980 | ||
980 | static int __init i8042_create_kbd_port(void) | 981 | static int __init i8042_create_kbd_port(void) |
@@ -1078,7 +1079,7 @@ static int __init i8042_init(void) | |||
1078 | goto err_platform_exit; | 1079 | goto err_platform_exit; |
1079 | } | 1080 | } |
1080 | 1081 | ||
1081 | err = driver_register(&i8042_driver); | 1082 | err = platform_driver_register(&i8042_driver); |
1082 | if (err) | 1083 | if (err) |
1083 | goto err_controller_cleanup; | 1084 | goto err_controller_cleanup; |
1084 | 1085 | ||
@@ -1126,7 +1127,7 @@ static int __init i8042_init(void) | |||
1126 | err_unregister_device: | 1127 | err_unregister_device: |
1127 | platform_device_unregister(i8042_platform_device); | 1128 | platform_device_unregister(i8042_platform_device); |
1128 | err_unregister_driver: | 1129 | err_unregister_driver: |
1129 | driver_unregister(&i8042_driver); | 1130 | platform_driver_unregister(&i8042_driver); |
1130 | err_controller_cleanup: | 1131 | err_controller_cleanup: |
1131 | i8042_controller_cleanup(); | 1132 | i8042_controller_cleanup(); |
1132 | err_platform_exit: | 1133 | err_platform_exit: |
@@ -1148,7 +1149,7 @@ static void __exit i8042_exit(void) | |||
1148 | del_timer_sync(&i8042_timer); | 1149 | del_timer_sync(&i8042_timer); |
1149 | 1150 | ||
1150 | platform_device_unregister(i8042_platform_device); | 1151 | platform_device_unregister(i8042_platform_device); |
1151 | driver_unregister(&i8042_driver); | 1152 | platform_driver_unregister(&i8042_driver); |
1152 | 1153 | ||
1153 | i8042_platform_exit(); | 1154 | i8042_platform_exit(); |
1154 | 1155 | ||