From patchwork Tue Mar 5 17:42:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 2220671 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 6900F3FCF2 for ; Tue, 5 Mar 2013 17:42:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757602Ab3CERmr (ORCPT ); Tue, 5 Mar 2013 12:42:47 -0500 Received: from moutng.kundenserver.de ([212.227.17.8]:62161 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757874Ab3CERmq (ORCPT ); Tue, 5 Mar 2013 12:42:46 -0500 Received: from wuerfel.lan (HSI-KBW-46-223-90-92.hsi.kabel-badenwuerttemberg.de [46.223.90.92]) by mrelayeu.kundenserver.de (node=mrbap4) with ESMTP (Nemesis) id 0M6EXa-1V1BxV1xKU-00ySyC; Tue, 05 Mar 2013 18:42:31 +0100 From: Arnd Bergmann To: Thomas Abraham Cc: Kukjin Kim , Tushar Behera , Deepak Saxena , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Olof Johansson , Arnd Bergmann Subject: [PATCH 03/23] tty: serial/samsung: prepare for common clock API Date: Tue, 5 Mar 2013 18:42:13 +0100 Message-Id: <1362505353-8873-4-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1362505353-8873-1-git-send-email-arnd@arndb.de> References: <1362505353-8873-1-git-send-email-arnd@arndb.de> X-Provags-ID: V02:K0:Vm6Drmp6ThqyfE0X9H+QLrMhdFGydkQwAaymNxrR1JD F3hWmV4Qvn/Bz8cE2F2YePHttRgJF9gZAr1WGvm61UfVrZ5ZH+ 0X+tEzLfqhiJIs2uEzks/+xJGZBMfSPoQGrCEMlOZIYUR/4hCT tewR6/yI/0L3qO3ukhdxfpt8n209IuWQSzNj4vgE5DphqYa1Oi gas4lmXO4SqUZcGd+AkO4+dMsYa/dlxTQn2p0HlfurF95uEPRd DJaObbddEJPACKHdjKxSHiMdrtB2NeiU7Bg1PWJQj6q30zXPAM rQor7/B30sAjEFqWUUH37NNhpuMI5LBT0pLhig3SgTov6O16Nq lkh4e/BVVnHFvaADPgM/YINOAeyyCsFDkyryZ0VIN Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org With the common clock interface, there is no way to provide the "clock_source" sysfs attribute for the samsung serial ports. Given that this file was purely informational and had fixed contents, we have reason to believe that no user space programs were relying on it. The sysfs file is not documented in the ABI docs. Signed-off-by: Arnd Bergmann --- drivers/tty/serial/samsung.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c index 2769a38..603f3f3 100644 --- a/drivers/tty/serial/samsung.c +++ b/drivers/tty/serial/samsung.c @@ -1179,6 +1179,7 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport, return 0; } +#ifdef CONFIG_SAMSUNG_CLOCK static ssize_t s3c24xx_serial_show_clksrc(struct device *dev, struct device_attribute *attr, char *buf) @@ -1194,7 +1195,7 @@ static ssize_t s3c24xx_serial_show_clksrc(struct device *dev, } static DEVICE_ATTR(clock_source, S_IRUGO, s3c24xx_serial_show_clksrc, NULL); - +#endif /* Device driver serial port probe */ @@ -1252,9 +1253,11 @@ static int s3c24xx_serial_probe(struct platform_device *pdev) uart_add_one_port(&s3c24xx_uart_drv, &ourport->port); platform_set_drvdata(pdev, &ourport->port); +#ifdef CONFIG_SAMSUNG_CLOCK ret = device_create_file(&pdev->dev, &dev_attr_clock_source); if (ret < 0) dev_err(&pdev->dev, "failed to add clock source attr.\n"); +#endif ret = s3c24xx_serial_cpufreq_register(ourport); if (ret < 0) @@ -1272,7 +1275,9 @@ static int s3c24xx_serial_remove(struct platform_device *dev) if (port) { s3c24xx_serial_cpufreq_deregister(to_ourport(port)); +#ifdef CONFIG_SAMSUNG_CLOCK device_remove_file(&dev->dev, &dev_attr_clock_source); +#endif uart_remove_one_port(&s3c24xx_uart_drv, port); }