diff options
Diffstat (limited to 'drivers/tty/serial/samsung.c')
-rw-r--r-- | drivers/tty/serial/samsung.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c index 7883f11b8c53..e91378b40d58 100644 --- a/drivers/tty/serial/samsung.c +++ b/drivers/tty/serial/samsung.c | |||
@@ -1183,6 +1183,7 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport, | |||
1183 | return 0; | 1183 | return 0; |
1184 | } | 1184 | } |
1185 | 1185 | ||
1186 | #ifdef CONFIG_SAMSUNG_CLOCK | ||
1186 | static ssize_t s3c24xx_serial_show_clksrc(struct device *dev, | 1187 | static ssize_t s3c24xx_serial_show_clksrc(struct device *dev, |
1187 | struct device_attribute *attr, | 1188 | struct device_attribute *attr, |
1188 | char *buf) | 1189 | char *buf) |
@@ -1198,7 +1199,7 @@ static ssize_t s3c24xx_serial_show_clksrc(struct device *dev, | |||
1198 | } | 1199 | } |
1199 | 1200 | ||
1200 | static DEVICE_ATTR(clock_source, S_IRUGO, s3c24xx_serial_show_clksrc, NULL); | 1201 | static DEVICE_ATTR(clock_source, S_IRUGO, s3c24xx_serial_show_clksrc, NULL); |
1201 | 1202 | #endif | |
1202 | 1203 | ||
1203 | /* Device driver serial port probe */ | 1204 | /* Device driver serial port probe */ |
1204 | 1205 | ||
@@ -1256,9 +1257,11 @@ static int s3c24xx_serial_probe(struct platform_device *pdev) | |||
1256 | uart_add_one_port(&s3c24xx_uart_drv, &ourport->port); | 1257 | uart_add_one_port(&s3c24xx_uart_drv, &ourport->port); |
1257 | platform_set_drvdata(pdev, &ourport->port); | 1258 | platform_set_drvdata(pdev, &ourport->port); |
1258 | 1259 | ||
1260 | #ifdef CONFIG_SAMSUNG_CLOCK | ||
1259 | ret = device_create_file(&pdev->dev, &dev_attr_clock_source); | 1261 | ret = device_create_file(&pdev->dev, &dev_attr_clock_source); |
1260 | if (ret < 0) | 1262 | if (ret < 0) |
1261 | dev_err(&pdev->dev, "failed to add clock source attr.\n"); | 1263 | dev_err(&pdev->dev, "failed to add clock source attr.\n"); |
1264 | #endif | ||
1262 | 1265 | ||
1263 | ret = s3c24xx_serial_cpufreq_register(ourport); | 1266 | ret = s3c24xx_serial_cpufreq_register(ourport); |
1264 | if (ret < 0) | 1267 | if (ret < 0) |
@@ -1276,7 +1279,9 @@ static int s3c24xx_serial_remove(struct platform_device *dev) | |||
1276 | 1279 | ||
1277 | if (port) { | 1280 | if (port) { |
1278 | s3c24xx_serial_cpufreq_deregister(to_ourport(port)); | 1281 | s3c24xx_serial_cpufreq_deregister(to_ourport(port)); |
1282 | #ifdef CONFIG_SAMSUNG_CLOCK | ||
1279 | device_remove_file(&dev->dev, &dev_attr_clock_source); | 1283 | device_remove_file(&dev->dev, &dev_attr_clock_source); |
1284 | #endif | ||
1280 | uart_remove_one_port(&s3c24xx_uart_drv, port); | 1285 | uart_remove_one_port(&s3c24xx_uart_drv, port); |
1281 | } | 1286 | } |
1282 | 1287 | ||