From patchwork Fri Jan 6 16:26:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 90202 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp9520218qgi; Fri, 6 Jan 2017 08:28:50 -0800 (PST) X-Received: by 10.84.210.233 with SMTP id a96mr167703088pli.72.1483720130647; Fri, 06 Jan 2017 08:28:50 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k21si45777744pfb.293.2017.01.06.08.28.50 for ; Fri, 06 Jan 2017 08:28:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759526AbdAFQ2t (ORCPT ); Fri, 6 Jan 2017 11:28:49 -0500 Received: from mail-oi0-f66.google.com ([209.85.218.66]:33250 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751507AbdAFQ0v (ORCPT ); Fri, 6 Jan 2017 11:26:51 -0500 Received: by mail-oi0-f66.google.com with SMTP id j15so2242241oih.0; Fri, 06 Jan 2017 08:26:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=YncotPm0vTf8lrCDVqNv8GqKBLmk3SmII06pDTeoChE=; b=bYH6owOMWVO94T49KAynrDLEQg3U7R0VswrAFV/w1lgyt/5Pd//lUP52NOSNOegiCo r6d0EeN9VDzqQ7MqFyq/aGQOQ4pIIPETmlQGyHJEogZeJ0hOc/G+pSHxdR48Z8F0N65J LB8XFRwob115wePlfyOPF2wCOPzdsrGxoWVgBWRVxptqUTL7yTiHTZzoHJrI2qNECzvH 6swJEEPw0H2pZq/5KNgSh/HWSXNFGtxZ7AdwMOaPjKfIQa/RDyhz5CiAlU3n5xCrr4TD BZsYyGz1Sf0PbTB1CJLFbXmHaX4Py7uJ+Wv94FR6OQLycnzHE5UmNRKe4FHAyk0fPM7L Fd5g== X-Gm-Message-State: AIkVDXID+OB0zlhhyyBoqCi9hwhNPIXw5Mktr+HG4tnWfD5BKvSUa69QS+ACkhxsG+bo5Q== X-Received: by 10.157.11.168 with SMTP id 37mr1494296oth.183.1483720010293; Fri, 06 Jan 2017 08:26:50 -0800 (PST) Received: from rob-hp-laptop.herring.priv (50-233-148-156-static.hfc.comcastbusiness.net. [50.233.148.156]) by smtp.googlemail.com with ESMTPSA id i135sm5245809oib.18.2017.01.06.08.26.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Jan 2017 08:26:49 -0800 (PST) From: Rob Herring To: Greg Kroah-Hartman , Marcel Holtmann , Jiri Slaby , Sebastian Reichel , Arnd Bergmann , "Dr . H . Nikolaus Schaller" , Peter Hurley , Andy Shevchenko , Alan Cox Cc: Loic Poulain , Pavel Machek , NeilBrown , Linus Walleij , linux-bluetooth@vger.kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/9] tty: constify tty_ldisc_receive_buf buffer pointer Date: Fri, 6 Jan 2017 10:26:30 -0600 Message-Id: <20170106162635.19677-5-robh@kernel.org> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20170106162635.19677-1-robh@kernel.org> References: <20170106162635.19677-1-robh@kernel.org> Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org This is needed to work with the client operations which uses const ptrs. Really, the flags pointer could be const, too, but this would be a tree wide fix. Signed-off-by: Rob Herring --- drivers/tty/tty_buffer.c | 2 +- include/linux/tty.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- 2.10.1 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/tty/tty_buffer.c b/drivers/tty/tty_buffer.c index aa80dc94ddc2..f4dc3e296dd5 100644 --- a/drivers/tty/tty_buffer.c +++ b/drivers/tty/tty_buffer.c @@ -422,7 +422,7 @@ EXPORT_SYMBOL_GPL(tty_prepare_flip_string); * * Returns the number of bytes not processed */ -int tty_ldisc_receive_buf(struct tty_ldisc *ld, unsigned char *p, +int tty_ldisc_receive_buf(struct tty_ldisc *ld, const unsigned char *p, char *f, int count) { if (ld->ops->receive_buf2) diff --git a/include/linux/tty.h b/include/linux/tty.h index 86c7853282b7..21c0fabfed60 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h @@ -657,7 +657,7 @@ extern int tty_ldisc_setup(struct tty_struct *tty, struct tty_struct *o_tty); extern void tty_ldisc_release(struct tty_struct *tty); extern void tty_ldisc_init(struct tty_struct *tty); extern void tty_ldisc_deinit(struct tty_struct *tty); -extern int tty_ldisc_receive_buf(struct tty_ldisc *ld, unsigned char *p, +extern int tty_ldisc_receive_buf(struct tty_ldisc *ld, const unsigned char *p, char *f, int count); /* n_tty.c */