From patchwork Tue Jul 10 03:13:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jisheng Zhang X-Patchwork-Id: 10516081 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 47BE26032C for ; Tue, 10 Jul 2018 03:16:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1EC3926861 for ; Tue, 10 Jul 2018 03:16:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1068927C2D; Tue, 10 Jul 2018 03:16:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, DKIM_VALID, MAILING_LIST_MULTI autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B441F28B21 for ; Tue, 10 Jul 2018 03:16:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=YAleME9h4OxvWNAy6kXGPSdfI58ElNYvQJiTpo5OkTs=; b=tvH+0dKkBET28U aK6kAVH8VYqhPw0GUZk+6iArVW9PoFp/NtwBtU8sAUhnDuH4ITHKosQJXnvnCf3Ml7LKHm6RDefF2 BN08+uimrudjT/KgD/DTz61y2+AalOQSIXpiLxjoFTl1/oINoRuNxk1Ayy9NpF1iJ0E2OSKRFAnLV X7SNGhcM30xsLsG4eVXQW5TK7URyud6p+ipMpdmbzka0iz1W1h9JMehxMaVEk/B3yc86qsjnFepCp srGLkKoWu0T6LS7FKOlE0+OVsUiOVSxl2QeDCMB6Ohcedp8zPH8yOJAx75Z75AjPQRC2ZrepFDdH3 yiXuhIpQ+qMTNvzIio4g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fcj8r-0004fN-HZ; Tue, 10 Jul 2018 03:16:41 +0000 Received: from mail-by2nam03on0041.outbound.protection.outlook.com ([104.47.42.41] helo=NAM03-BY2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fcj8o-0004dk-1O for linux-arm-kernel@lists.infradead.org; Tue, 10 Jul 2018 03:16:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Synaptics.onmicrosoft.com; s=selector1-synaptics-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GkvLDubnQoXKOsaraEE5tysys5NXbGMIcBYWCj1zUZw=; b=HO0whaNQWb4a0nE7Z4gb+wHcs6nDM6cKx5X1T7PYVdw6NPal2ItQtLI3CFiaFNF8vQa3KplJ/3hNs//sgPkIlvpUOuXWep2x0X+KZLHWniMWrF2att9Bh3cTsw0NCILEs71W5o6nhoMGdKqMJaA8xLEOQjprwnHKTn/pZkfGn/Y= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jisheng.Zhang@synaptics.com; Received: from xhacker.debian (124.74.246.114) by DM5PR03MB2634.namprd03.prod.outlook.com (2603:10b6:3:43::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.930.19; Tue, 10 Jul 2018 03:16:23 +0000 Date: Tue, 10 Jul 2018 11:13:27 +0800 From: Jisheng Zhang To: Andy Shevchenko , Greg Kroah-Hartman , Jiri Slaby Subject: [PATCH v4 2/3] serial: 8250: export serial8250_do_set_divisor() Message-ID: <20180710111327.072584c0@xhacker.debian> In-Reply-To: <20180710110942.5b0a016e@xhacker.debian> References: <20180710110942.5b0a016e@xhacker.debian> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Originating-IP: [124.74.246.114] X-ClientProxiedBy: PR0P264CA0027.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1::15) To DM5PR03MB2634.namprd03.prod.outlook.com (2603:10b6:3:43::8) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: cad5610e-0b57-4cef-f324-08d5e613855f X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:DM5PR03MB2634; X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2634; 3:W81/Fc9onxnCpzv+25uGjsOfN346LVNErBg+CSc4yvR2LsbjgC9WStt76mw1BPaF33faxafsCTjpxAO+J/yhdqEKvjtcGZue+iTRZe2r0t3d1is/h2Xer9q1Kt7wTFtoLaxUvTS3A1bFZ8qhoZIeweSYRojFlmeaC22Zl8VCYZqykPoDN1xNFE+G+8lQHFgzlaT4MK/7RYg4z1KerU0V6j7k59EZd3am6MktT76j56Ybl+/wJvfzX5CPYwLcgv+E; 25:lAWx2yGSJMd1kdXhqJasaHRDb64WB09COoMzjU67c0HS27Q5Ae7sJmOhd2GVEkRdnLO9khiX4xDqrx+VijemPl/Weo2WFrr53X7ypobrWOvsiPC6DeavfohSRpz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sl5Ec7wE5KVlfCtm/kg7goJeiqQGxSrscKsvVO2sHUIjpvzJ/hzZIfX8WRqfWAk2Yv26b2lP44U7295zqpU8KvNTNThHbvSchZHrUfMmgYqtGb8MujO3Esi3DPJYlbLqn/8Q6X/yim+RajR46YOl3UVwKLGeG1Dy+q7tuzMdfIPGE89uTLSiZJ/xY+Il5Vk4Yt7WrdSAZIkuKI0LfX4ejGVa/OJrVt5BzbeFbMoUfKWOtBIaa+GO5b2w== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(3231311)(944501410)(52105095)(93006095)(93001095)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(6072148)(201708071742011)(7699016); SRVR:DM5PR03MB2634; BCL:0; PCL:0; RULEID:; SRVR:DM5PR03MB2634; X-Forefront-PRVS: 0729050452 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(136003)(346002)(39860400002)(366004)(396003)(376002)(189003)(199004)(76176011)(26005)(486006)(186003)(15760500003)(97736004)(50466002)(3846002)(230700001)(9686003)(1076002)(6116002)(23726003)(316002)(105586002)(476003)(446003)(110136005)(54906003)(52116002)(7696005)(2906002)(956004)(72206003)(478600001)(25786009)(11346002)(33896004)(6506007)(386003)(16526019)(106356001)(86362001)(53936002)(575784001)(81166006)(4326008)(50226002)(66066001)(8936002)(8676002)(305945005)(81156014)(5660300001)(55016002)(7736002)(68736007)(47776003)(39210200001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR03MB2634; H:xhacker.debian; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: synaptics.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q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H9oQrQWPhtp4DkJDy8jZA2obBe02baDRZUG0n2h1TtkiN+3JnF4+k1rB5+QnA/6lprXG7Znnh0V/CtWAV+h5J2+y+lYvHFubgVTcwqMXvfAHHjL2ni+SVa9NSYP7sCg+Fq43DHOqmytKNmLKGz1jcs3JA5YJAmEGlg/Qb2oN0gslgfg4D1zZhWkG+uBRNgFIqKVGZZnufJqPTLvyY3cYrpgqXYbSoRgjar44H49aZSPIPQeynzZbaEpUD6jK4oShMsq+NIO3ZwCAWcwGa6lVkKkqnl0CwcPVCYB3b5E/pPJ6ckli7CiNke+z7IRr5gQP4oXYZDSgtDIEr1Hw==; 5:iPMKLvy6VbfXA4quAacfq1Na7WrsPVwsnIUjGknVZ0RF6/aDvrKZVuM8sMJeh5Yg4yoVg01oX1lWS+IiYLayCJikEs7sD5B6IEJ2EcRDpwXK91iTOgqk20OFP9fjbz22/2NLpUmzUvrbuBpVcQwjRvMcq6WrfQRfplpfr6A+XvY=; 24:vKWQBf7gk6VD83scDjd0jTPHeFwISCgph4aKQYjjpqSmnfWUJ3ggPHEg5gdNULogQMsFJekDxrguUHNC7x85b0ioiUCmmiJQm4YzPTvn5rY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2634; 7:TtHKRi22YPU2/O4JJQ/JJlwIcJxJzZA8M3uFlrzqLVi/cjyqJNUd4B9vC4BP2jM8RXxa4ZpQEGdYdAfuuS0rkHdkMh7OnXMeZ0gzXumk0a6KCXElDZGPoGbYgvsjAFDwumiUW1s0JFY/H3lN4P7P75abI46g12QPRfrGZTG0v+UAmE+3JInoG/jND5NBabYFtFx7aMftOFKplpb4XAIdEsFU4IOCVvNiUno0DDN7AN90JMWjFtfvz5v9QMQ3VQR2 X-OriginatorOrg: synaptics.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jul 2018 03:16:23.2865 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cad5610e-0b57-4cef-f324-08d5e613855f X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335d1fbc-2124-4173-9863-17e7051a2a0e X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR03MB2634 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180709_201638_086834_04452DA2 X-CRM114-Status: UNSURE ( 8.26 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-serial@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Some drivers could call serial8250_do_set_divisor() to complete its own set_divisor routine. Export this symbol for code reusing. Signed-off-by: Jisheng Zhang Reviewed-by: Andy Shevchenko --- drivers/tty/serial/8250/8250_port.c | 5 +++-- include/linux/serial_8250.h | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c index ce0dc17f18ee..945f8dc2d50f 100644 --- a/drivers/tty/serial/8250/8250_port.c +++ b/drivers/tty/serial/8250/8250_port.c @@ -2580,8 +2580,8 @@ static unsigned char serial8250_compute_lcr(struct uart_8250_port *up, return cval; } -static void serial8250_do_set_divisor(struct uart_port *port, unsigned int baud, - unsigned int quot, unsigned int quot_frac) +void serial8250_do_set_divisor(struct uart_port *port, unsigned int baud, + unsigned int quot, unsigned int quot_frac) { struct uart_8250_port *up = up_to_u8250p(port); @@ -2612,6 +2612,7 @@ static void serial8250_do_set_divisor(struct uart_port *port, unsigned int baud, serial_port_out(port, 0x2, quot_frac); } } +EXPORT_SYMBOL_GPL(serial8250_do_set_divisor); static void serial8250_set_divisor(struct uart_port *port, unsigned int baud, unsigned int quot, unsigned int quot_frac) diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h index 76b9db71e489..18e21427bce4 100644 --- a/include/linux/serial_8250.h +++ b/include/linux/serial_8250.h @@ -160,6 +160,9 @@ extern void serial8250_do_shutdown(struct uart_port *port); extern void serial8250_do_pm(struct uart_port *port, unsigned int state, unsigned int oldstate); extern void serial8250_do_set_mctrl(struct uart_port *port, unsigned int mctrl); +extern void serial8250_do_set_divisor(struct uart_port *port, unsigned int baud, + unsigned int quot, + unsigned int quot_frac); extern int fsl8250_handle_irq(struct uart_port *port); int serial8250_handle_irq(struct uart_port *port, unsigned int iir); unsigned char serial8250_rx_chars(struct uart_8250_port *up, unsigned char lsr);