Skip to contentSkip to conversation

serial: samsung: Fix compiler error when !CONFIG_PM_SLEEP

PATCH New Kyungmin Park 1 participant 1 message Jul 27, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 serial: samsung: Fix compiler error when !CONFIG_PM_SLEEP

From: Kyungmin Park <[email protected]>

drivers/tty/serial/samsung.c: In function 's3c24xx_serial_init':
drivers/tty/serial/samsung.c:1237: error: lvalue required as unary '&' operand

---

drivers/tty/serial/samsung.c +2 -2
index afc6294..318ab90 100644
@@ -1225,15 +1225,15 @@ static const struct dev_pm_ops s3c24xx_serial_pm_ops = {
 	.suspend = s3c24xx_serial_suspend,
 	.resume = s3c24xx_serial_resume,
 };
-#else /* !CONFIG_PM_SLEEP */
-#define s3c24xx_serial_pm_ops	NULL
 #endif /* CONFIG_PM_SLEEP */
 
 int s3c24xx_serial_init(struct platform_driver *drv,
 			struct s3c24xx_uart_info *info)
 {
 	dbg("s3c24xx_serial_init(%p,%p)\n", drv, info);
+#ifdef CONFIG_PM_SLEEP
 	drv->driver.pm = &s3c24xx_serial_pm_ops;
+#endif
 
 	return platform_driver_register(drv);
 }