From patchwork Thu Apr 11 00:04:47 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 2425541 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork1.kernel.org (Postfix) with ESMTP id F17B13FD8C for ; Thu, 11 Apr 2013 00:10:20 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UQ54R-0000K2-5O; Thu, 11 Apr 2013 00:08:56 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UQ53t-0002BC-HE; Thu, 11 Apr 2013 00:08:21 +0000 Received: from moutng.kundenserver.de ([212.227.126.171]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UQ52R-0001wc-So for linux-arm-kernel@lists.infradead.org; Thu, 11 Apr 2013 00:06:58 +0000 Received: from localhost.localdomain (HSI-KBW-095-208-002-043.hsi5.kabel-badenwuerttemberg.de [95.208.2.43]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0M5tNd-1UnlxH1QUr-00yNfM; Thu, 11 Apr 2013 02:06:46 +0200 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 05/30] tty: serial/samsung: prepare for common clock API Date: Thu, 11 Apr 2013 02:04:47 +0200 Message-Id: <1365638712-1028578-6-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1365638712-1028578-1-git-send-email-arnd@arndb.de> References: <1365638712-1028578-1-git-send-email-arnd@arndb.de> X-Provags-ID: V02:K0:KyQbOUpbyZHPWhwt8ZZEiDct7TTIJtZsAyEwRUOD0mY lzzfCpe6ZBjzm/hOhor7odjuB1HN/T0DGxum67zWTGDYjT+o3L SqCYZ+sv06xy4gJNvmhFahlKcGErJnOuBka9PJD59wTUMvt1XI vDG3WFXfFcmzOhlm5ArVyBg05GUPIiu4zph7jswMwIJH6KKTw0 569OwTU4SfqP/P7/HjWDNzFUCVs1pUYJZkv7HXJA1YMQ+X65L7 bA6CcAscl6FGt6db1670tH51MnJAXr3yv+bUjla8ucvG21f/MR IXLwInpqOhCJW/6ee7n4Ym3r+RIahP4LlloGbiHAAigLIgGoUK /SAeMvLLLyPqXVf0vD3HiutMFvum8RcGDapP0A2TKVg9U3qvE9 6E8TWY9MAWDyg== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130410_200652_360165_1952C16C X-CRM114-Status: GOOD ( 10.43 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [212.227.126.171 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: linux-samsung-soc@vger.kernel.org, Arnd Bergmann , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Kukjin Kim , linux-serial@vger.kernel.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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 Cc: linux-serial@vger.kernel.org Cc: Greg Kroah-Hartman --- 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); }