Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753873AbeAFRVp (ORCPT + 1 other); Sat, 6 Jan 2018 12:21:45 -0500 Received: from smtp5.mail.ru ([94.100.179.24]:59394 "EHLO smtp5.mail.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753586AbeAFRVo (ORCPT ); Sat, 6 Jan 2018 12:21:44 -0500 Date: Sat, 6 Jan 2018 20:14:02 +0300 From: Mikhail Zaytsev To: Johan Hovold Cc: Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/2] USB: serial: ark3116: Remove unused TIOCSSERIAL ioctl case. Message-ID: <20180106201402.03d2ac88@debian> In-Reply-To: <20180106200809.41cdd723@debian> References: <20180106200809.41cdd723@debian> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Authentication-Results: smtp5.mail.ru; auth=pass smtp.auth=flashed@mail.ru smtp.mailfrom=flashed@mail.ru X-7FA49CB5: 0D63561A33F958A5A876A0025FB7EC33555A02C7C5A5ABA00705D49CAAC16AD8725E5C173C3A84C355B687C78217711528918EA039FFA7EDBFC944FC657CDB72C4224003CC836476C0CAF46E325F83A50BF2EBBBDD9D6B0F2AF38021CC9F462D574AF45C6390F7469DAA53EE0834AAEE X-Mailru-Sender: 159DE679A9C6F657CB201B87257888728960882E8FDF78DE7C43EB03143F56F32FA3E2513F7611F035240BD9E37F4C362F445727719BCECB540ECE9B597817E15BECAF0817D12387B4A721A3011E896F X-Mras: OK Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: The patch removes unused TIOCSSERIAL ioctl case and adds the default block to the switch. This will make the ioctl return -ENOTTY to user space (e.g. setserial), because TIOCSSERIAL really isn't supported for these devices currently. Signed-off-by: Mikhail Zaytsev --- drivers/usb/serial/ark3116.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/usb/serial/ark3116.c b/drivers/usb/serial/ark3116.c index 23d46ef87..2e957c76f 100644 --- a/drivers/usb/serial/ark3116.c +++ b/drivers/usb/serial/ark3116.c @@ -418,10 +418,8 @@ static int ark3116_ioctl(struct tty_struct *tty, return -EFAULT; return 0; - case TIOCSSERIAL: - if (copy_from_user(&serstruct, user_arg, sizeof(serstruct))) - return -EFAULT; - return 0; + default: + break; } return -ENOIOCTLCMD; -- 2.11.0