diff options
author | MyungJoo Ham <myungjoo.ham@samsung.com> | 2011-06-29 02:28:24 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-07-01 18:38:03 -0400 |
commit | aef7fe5274af3e608e0f3eaf0fea6d3c78ffb92e (patch) | |
tree | 035be995d22dc952a816025eff939d7927f733a9 /drivers/tty | |
parent | f2eb3cdf14457fccb14ae8c4d7d7cee088cd3957 (diff) |
tty: serial: samsung.c remove legacy PM code.
This patch "modernize" tty/serial/samsung.c to use non-legacy code for
suspend/resume.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: KyungMin Park <kyungmin.park@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/samsung.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c index f66f64829303..34b8afe5f470 100644 --- a/drivers/tty/serial/samsung.c +++ b/drivers/tty/serial/samsung.c | |||
@@ -1194,12 +1194,10 @@ int __devexit s3c24xx_serial_remove(struct platform_device *dev) | |||
1194 | EXPORT_SYMBOL_GPL(s3c24xx_serial_remove); | 1194 | EXPORT_SYMBOL_GPL(s3c24xx_serial_remove); |
1195 | 1195 | ||
1196 | /* UART power management code */ | 1196 | /* UART power management code */ |
1197 | 1197 | #ifdef CONFIG_PM_SLEEP | |
1198 | #ifdef CONFIG_PM | 1198 | static int s3c24xx_serial_suspend(struct device *dev) |
1199 | |||
1200 | static int s3c24xx_serial_suspend(struct platform_device *dev, pm_message_t state) | ||
1201 | { | 1199 | { |
1202 | struct uart_port *port = s3c24xx_dev_to_port(&dev->dev); | 1200 | struct uart_port *port = s3c24xx_dev_to_port(dev); |
1203 | 1201 | ||
1204 | if (port) | 1202 | if (port) |
1205 | uart_suspend_port(&s3c24xx_uart_drv, port); | 1203 | uart_suspend_port(&s3c24xx_uart_drv, port); |
@@ -1207,9 +1205,9 @@ static int s3c24xx_serial_suspend(struct platform_device *dev, pm_message_t stat | |||
1207 | return 0; | 1205 | return 0; |
1208 | } | 1206 | } |
1209 | 1207 | ||
1210 | static int s3c24xx_serial_resume(struct platform_device *dev) | 1208 | static int s3c24xx_serial_resume(struct device *dev) |
1211 | { | 1209 | { |
1212 | struct uart_port *port = s3c24xx_dev_to_port(&dev->dev); | 1210 | struct uart_port *port = s3c24xx_dev_to_port(dev); |
1213 | struct s3c24xx_uart_port *ourport = to_ourport(port); | 1211 | struct s3c24xx_uart_port *ourport = to_ourport(port); |
1214 | 1212 | ||
1215 | if (port) { | 1213 | if (port) { |
@@ -1222,17 +1220,20 @@ static int s3c24xx_serial_resume(struct platform_device *dev) | |||
1222 | 1220 | ||
1223 | return 0; | 1221 | return 0; |
1224 | } | 1222 | } |
1225 | #endif | 1223 | |
1224 | static const struct dev_pm_ops s3c24xx_serial_pm_ops = { | ||
1225 | .suspend = s3c24xx_serial_suspend, | ||
1226 | .resume = s3c24xx_serial_resume, | ||
1227 | }; | ||
1228 | #else /* !CONFIG_PM_SLEEP */ | ||
1229 | #define s3c24xx_serial_pm_ops NULL | ||
1230 | #endif /* CONFIG_PM_SLEEP */ | ||
1226 | 1231 | ||
1227 | int s3c24xx_serial_init(struct platform_driver *drv, | 1232 | int s3c24xx_serial_init(struct platform_driver *drv, |
1228 | struct s3c24xx_uart_info *info) | 1233 | struct s3c24xx_uart_info *info) |
1229 | { | 1234 | { |
1230 | dbg("s3c24xx_serial_init(%p,%p)\n", drv, info); | 1235 | dbg("s3c24xx_serial_init(%p,%p)\n", drv, info); |
1231 | 1236 | drv->driver.pm = &s3c24xx_serial_pm_ops; | |
1232 | #ifdef CONFIG_PM | ||
1233 | drv->suspend = s3c24xx_serial_suspend; | ||
1234 | drv->resume = s3c24xx_serial_resume; | ||
1235 | #endif | ||
1236 | 1237 | ||
1237 | return platform_driver_register(drv); | 1238 | return platform_driver_register(drv); |
1238 | } | 1239 | } |