From patchwork Thu Aug 8 08:11:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andr=C3=A9_Draszik?= X-Patchwork-Id: 13757090 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 63002C3DA4A for ; Thu, 8 Aug 2024 08:13:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=CMjvgficlM8E7OFHsCNQI4tsZ98VKn4/e3uEzM8rqJg=; b=MrlGuQ/HLvaOTb1AoqMPBlp4Xt o0Q6VGVCVzBW/6xXRqDu//+aUuf+/oNuJ3zHA8/MfuDlHXAY/Mp2QBCbvOvmVwh6A37oWVgnPyfvu pYcaMD2lUUUk3XOGlapdWNR0y+NtZQAPg1fMKy2LYRfOYRgkN07zxdQsBZ920taAgHBoPC/9DUe7D g0Enu3zIHPBO/hrrPXGYXptc2vIDxoj81pE9m3TylOJk2B5DDukmn/T6Y+3RLlAlCoP4nSO5m+Etj CHoeM0IzIqFng4MmE3dEo7zG80cvHM9fR2XZ+PJXOAo1Omtdc9tuqVl/wnM4Xyr23S7kE4mbeF0wj rj4Det8w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbyHD-00000007Y5Z-2igZ; Thu, 08 Aug 2024 08:13:39 +0000 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbyFW-00000007Xh4-0V2A for linux-arm-kernel@lists.infradead.org; Thu, 08 Aug 2024 08:12:09 +0000 Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-a7aada2358fso284314666b.0 for ; Thu, 08 Aug 2024 01:11:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723104712; x=1723709512; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=CMjvgficlM8E7OFHsCNQI4tsZ98VKn4/e3uEzM8rqJg=; b=LJNvUxfSHpyLTm77WeaLVdmQxNDlUQGiM2Sa0IM55EOowIM7z8ijRbGk60i2mfaqB/ AHp/Bj8htc9vUk32nzmiqJBfLuLqqxUBq0AycLvkEtSWY0FPaW4OaS4imVlHDTEajdIv DhBcUX8jQvSJeYxrcrdwQX3GNjHpukjfd8a/dwuK9XZIYCEOwFFkqQK7CrQUMCK5cnBF r5tC83c7XqT2uVxCmlG75SBEJNyksOclcNeyOo8Gt5a4X4fNHZbWfobiGl2/fPjfZsGv EeHum6RK7wlRcj2qxHx1RwAu5DsbEAwVgZrDx+YAz+nZqkTB62SUprFMghTMA5sXEFhc urKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723104712; x=1723709512; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CMjvgficlM8E7OFHsCNQI4tsZ98VKn4/e3uEzM8rqJg=; b=K3ObMC80N2ouRulrOrL9RvMVzFTBRJBdrDJH7bFZdL+8u4vAeCYXhFr78cn11PUZoC atsx0SSsFdR+odPfImgsOVFcCzpTznAU/Lmm9oCxzdMyY2pjzXQZzN+CYZWV7y2mjPJr dlB5si7Qx6ioZfou1LyunK8HHDAXlcndgV/U418cyg9YAcGIFXKMXtuNQ4nTZeQKBgHZ o6J86UAXTp+2oBki1x3qXAtTA6DzRzXe2EhHeJZ5NbgEoldvJqPjAsYY2SjmljdtwP3/ t7xRZpYVPgpbM37/tVXnEcRsQyoSY+Z+JMkUAcUclA4OJxvwbrtk2AO11GmELiKK7bPQ nlrA== X-Forwarded-Encrypted: i=1; AJvYcCW/y9ahp+qxj3FvdQEw7k3tJR051V4mNvXMHxJVFCNkoJYCmqI4S+4it2eEfZtXx7TdkUAFoCuYNgVTaQ2ENuqhac6J7sAX75a73JqQal4LUzF8r84= X-Gm-Message-State: AOJu0Yx+lyKeXCayMaS/g26VldUxiOXjXqtl7e6XISYSAy4BfAQRbx0j +ZqXsoEkNY9nVAH8vgZzSdOAZ1OCmz1hyrLOGZfc2jPVjCzMcnThYTOJ0zTwrrM= X-Google-Smtp-Source: AGHT+IEKF5uMso0H1TX1U0r7MN8eita6rME/UxaedoMjy3NSMf4N+HXWEdwe1FGXYuPeFzG2L0FbWA== X-Received: by 2002:a17:907:368c:b0:a7a:8dcd:ffb4 with SMTP id a640c23a62f3a-a8091f1998dmr72261166b.17.1723104712315; Thu, 08 Aug 2024 01:11:52 -0700 (PDT) Received: from puffmais.c.googlers.com (64.227.90.34.bc.googleusercontent.com. [34.90.227.64]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7dc9c0c578sm716931166b.73.2024.08.08.01.11.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Aug 2024 01:11:51 -0700 (PDT) From: =?utf-8?q?Andr=C3=A9_Draszik?= Date: Thu, 08 Aug 2024 09:11:51 +0100 Subject: [PATCH v3 1/2] tty: serial: samsung_tty: drop unused argument to irq handlers MIME-Version: 1.0 Message-Id: <20240808-samsung-tty-cleanup-v3-1-494412f49f4b@linaro.org> References: <20240808-samsung-tty-cleanup-v3-0-494412f49f4b@linaro.org> In-Reply-To: <20240808-samsung-tty-cleanup-v3-0-494412f49f4b@linaro.org> To: Krzysztof Kozlowski , Alim Akhtar , Greg Kroah-Hartman , Jiri Slaby Cc: Peter Griffin , Tudor Ambarus , Will McVicker , kernel-team@android.com, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, =?utf-8?q?Andr?= =?utf-8?q?=C3=A9_Draszik?= X-Mailer: b4 0.13.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240808_011154_167135_3016026B X-CRM114-Status: GOOD ( 13.30 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The 'irq' argument is not used in any of the callees, we can just drop it and simplify the code. No functional changes. Reviewed-by: Tudor Ambarus Signed-off-by: André Draszik Reviewed-by: Jiri Slaby --- drivers/tty/serial/samsung_tty.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c index dc35eb77d2ef..1c6d0ffe5649 100644 --- a/drivers/tty/serial/samsung_tty.c +++ b/drivers/tty/serial/samsung_tty.c @@ -855,7 +855,7 @@ static irqreturn_t s3c24xx_serial_rx_chars_pio(void *dev_id) return IRQ_HANDLED; } -static irqreturn_t s3c24xx_serial_rx_irq(int irq, void *dev_id) +static irqreturn_t s3c24xx_serial_rx_irq(void *dev_id) { struct s3c24xx_uart_port *ourport = dev_id; @@ -928,7 +928,7 @@ static void s3c24xx_serial_tx_chars(struct s3c24xx_uart_port *ourport) s3c24xx_serial_stop_tx(port); } -static irqreturn_t s3c24xx_serial_tx_irq(int irq, void *id) +static irqreturn_t s3c24xx_serial_tx_irq(void *id) { struct s3c24xx_uart_port *ourport = id; struct uart_port *port = &ourport->port; @@ -950,11 +950,11 @@ static irqreturn_t s3c64xx_serial_handle_irq(int irq, void *id) irqreturn_t ret = IRQ_HANDLED; if (pend & S3C64XX_UINTM_RXD_MSK) { - ret = s3c24xx_serial_rx_irq(irq, id); + ret = s3c24xx_serial_rx_irq(id); wr_regl(port, S3C64XX_UINTP, S3C64XX_UINTM_RXD_MSK); } if (pend & S3C64XX_UINTM_TXD_MSK) { - ret = s3c24xx_serial_tx_irq(irq, id); + ret = s3c24xx_serial_tx_irq(id); wr_regl(port, S3C64XX_UINTP, S3C64XX_UINTM_TXD_MSK); } return ret; @@ -971,11 +971,11 @@ static irqreturn_t apple_serial_handle_irq(int irq, void *id) if (pend & (APPLE_S5L_UTRSTAT_RXTHRESH | APPLE_S5L_UTRSTAT_RXTO)) { wr_regl(port, S3C2410_UTRSTAT, APPLE_S5L_UTRSTAT_RXTHRESH | APPLE_S5L_UTRSTAT_RXTO); - ret = s3c24xx_serial_rx_irq(irq, id); + ret = s3c24xx_serial_rx_irq(id); } if (pend & APPLE_S5L_UTRSTAT_TXTHRESH) { wr_regl(port, S3C2410_UTRSTAT, APPLE_S5L_UTRSTAT_TXTHRESH); - ret = s3c24xx_serial_tx_irq(irq, id); + ret = s3c24xx_serial_tx_irq(id); } return ret; From patchwork Thu Aug 8 08:11:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andr=C3=A9_Draszik?= X-Patchwork-Id: 13757106 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1F5FAC52D73 for ; Thu, 8 Aug 2024 08:14:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=CqxEVbtlJAYIU2G7koLN0SZSQulPINd9bO5ddzhKZmM=; b=GekOlIk+797SemZPVtCgJ5mXZQ push+w6dW63kvqfSrqq2c+a/mOP1zqVVqD/ZkyuowG/ADE7sLQTlQ5KmZpsnGKiaOpR3YsLhiWn3n LW+7Z5zkGzwgK/2HJBhkN0A7F6NBCNU7173dlE2H/DNU6TFC9+qLl1MuQ2eoqRGW8b1AGoNve+Zdt wMNmAOlO/w0Hgw0ww+sWgwyPKdLxBtEfpPEvHY23nJbaaRYRzDre+P9lpaRtwLWh6MwRdTNbaVIp9 a6kqR4q9OIi7nhH2n8saUH8KYdxEaZ1CRwND0Vk+KP8U3Ctm21oKDBQYAZ2762vSk8IMpBfwxW5zY F/tJLAhg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbyHk-00000007YDO-0KBb; Thu, 08 Aug 2024 08:14:12 +0000 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbyFW-00000007XhE-3kQb for linux-arm-kernel@lists.infradead.org; Thu, 08 Aug 2024 08:12:10 +0000 Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-a7aada2358fso284314866b.0 for ; Thu, 08 Aug 2024 01:11:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723104713; x=1723709513; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=CqxEVbtlJAYIU2G7koLN0SZSQulPINd9bO5ddzhKZmM=; b=XI8cqCxVbHOcPqXRqjmjtOJBppJWa9DkDVVRsP0lxuAw/ypCo6+2fDEvgAc+RH81DP IOq6AVZlUsk4KRjttdL+4iPPbr9RNBV6bwFcNHkLpfGHAvtYbtCFfMsBV4Xiy+saWfK0 JbKFwjFpGwAssbUTUWWapB2XzZVICFjSPx5dAeGlnxFcUF3MlIzek89YU8Xk28VagVUN FVcdALhP0gHoxIbGKn4BZSuVS3G2S4M7ry765TB1KXXdOGeuD5gZ2l7N4vJt+AI2lxJS 2iJYNb1BwPQk7aq33gnbkKXx3ttb2/TUaXJzfaiG8/shKbcYWwFDqFZUxlR6ERxnY8tL M6lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723104713; x=1723709513; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CqxEVbtlJAYIU2G7koLN0SZSQulPINd9bO5ddzhKZmM=; b=IpHetRzL4CPkFy8+0tgoPOlU4ISxHWw1J0YOJx90XSIHfWW3WwJacPIjhu1yP+e3lM BUsD/Pizj8ggpyofSx7sg3Yed7VBSWMI3WiQTUPFeooFFi6k1x2yPdOoxTqekCDzQgls 0VL2PrlvayDAO1i5DB6UztVrp+ZdZA5/J1+9LSTNUiBhl8v9Sew+2rHUbDbxBdZ1bxJH vH3D7zgHCp36fpo61fOAl3q/fg0QNZqjo7BdsZgpnEs47l3+DVEDWE6xFrcBkJ2q0jfG ZC524vUK1UjBzcmaD7Mz0PwtBXBQ5gTB075+BOkiLHb7Ieweo4XVsTiXjmV72oTl4zBX 6rVg== X-Forwarded-Encrypted: i=1; AJvYcCU8wrOLyd3rOTX1MT0R1tryOwN7waRvIjaXHBKI+P59imJrN5slF0P0ecLiiYsIRuHx7346qqst/2HMR2rdCORLuENWHtT1UAmq1G40F+T5hqxeFks= X-Gm-Message-State: AOJu0Ywu0BBSRF6UG2v0RrGIz82kYawk4wfzAmqcf/itvn69ojyfDx7k NVOx9N17dkHmQR6Rd9ccm1SUeASUR/kZ2tI263gcUAz/ojO/+wuEw2aSU0jhMPQ= X-Google-Smtp-Source: AGHT+IGHGZjdFmV3eFGqC8FJHxVC9D1wSPHpGQgKUM7hRt/4kJ1eWwU/AAaASzthWd/iCBjPMuERUg== X-Received: by 2002:a17:906:b15a:b0:a7a:b26d:fb5 with SMTP id a640c23a62f3a-a8091f1eb5dmr68212166b.19.1723104712714; Thu, 08 Aug 2024 01:11:52 -0700 (PDT) Received: from puffmais.c.googlers.com (64.227.90.34.bc.googleusercontent.com. [34.90.227.64]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7dc9c0c578sm716931166b.73.2024.08.08.01.11.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Aug 2024 01:11:52 -0700 (PDT) From: =?utf-8?q?Andr=C3=A9_Draszik?= Date: Thu, 08 Aug 2024 09:11:52 +0100 Subject: [PATCH v3 2/2] tty: serial: samsung_tty: cast the interrupt's void *id just once MIME-Version: 1.0 Message-Id: <20240808-samsung-tty-cleanup-v3-2-494412f49f4b@linaro.org> References: <20240808-samsung-tty-cleanup-v3-0-494412f49f4b@linaro.org> In-Reply-To: <20240808-samsung-tty-cleanup-v3-0-494412f49f4b@linaro.org> To: Krzysztof Kozlowski , Alim Akhtar , Greg Kroah-Hartman , Jiri Slaby Cc: Peter Griffin , Tudor Ambarus , Will McVicker , kernel-team@android.com, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, =?utf-8?q?Andr?= =?utf-8?q?=C3=A9_Draszik?= X-Mailer: b4 0.13.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240808_011154_954514_39FA7F81 X-CRM114-Status: GOOD ( 13.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The interrupt handler routines and helpers are casting the 'void *' pointer to 'struct exynos_uart_port *' all over the place. There is no need for that, we can do the casting once and keep passing the 'struct exynos_uart_port *', simplifying the code and saving a few lines of code. No functional changes. Reviewed-by: Tudor Ambarus Signed-off-by: André Draszik Reviewed-by: Jiri Slaby --- v3: undo too eager removal of 'const' where unnecessary (Jiri) v2: fix -Wdiscarded-qualifiers, sorry --- drivers/tty/serial/samsung_tty.c | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c index 1c6d0ffe5649..c4f2ac9518aa 100644 --- a/drivers/tty/serial/samsung_tty.c +++ b/drivers/tty/serial/samsung_tty.c @@ -707,9 +707,8 @@ static void enable_rx_pio(struct s3c24xx_uart_port *ourport) static void s3c24xx_serial_rx_drain_fifo(struct s3c24xx_uart_port *ourport); -static irqreturn_t s3c24xx_serial_rx_chars_dma(void *dev_id) +static irqreturn_t s3c24xx_serial_rx_chars_dma(struct s3c24xx_uart_port *ourport) { - struct s3c24xx_uart_port *ourport = dev_id; struct uart_port *port = &ourport->port; struct s3c24xx_uart_dma *dma = ourport->dma; struct tty_struct *tty = tty_port_tty_get(&ourport->port.state->port); @@ -843,9 +842,8 @@ static void s3c24xx_serial_rx_drain_fifo(struct s3c24xx_uart_port *ourport) tty_flip_buffer_push(&port->state->port); } -static irqreturn_t s3c24xx_serial_rx_chars_pio(void *dev_id) +static irqreturn_t s3c24xx_serial_rx_chars_pio(struct s3c24xx_uart_port *ourport) { - struct s3c24xx_uart_port *ourport = dev_id; struct uart_port *port = &ourport->port; uart_port_lock(port); @@ -855,13 +853,11 @@ static irqreturn_t s3c24xx_serial_rx_chars_pio(void *dev_id) return IRQ_HANDLED; } -static irqreturn_t s3c24xx_serial_rx_irq(void *dev_id) +static irqreturn_t s3c24xx_serial_rx_irq(struct s3c24xx_uart_port *ourport) { - struct s3c24xx_uart_port *ourport = dev_id; - if (ourport->dma && ourport->dma->rx_chan) - return s3c24xx_serial_rx_chars_dma(dev_id); - return s3c24xx_serial_rx_chars_pio(dev_id); + return s3c24xx_serial_rx_chars_dma(ourport); + return s3c24xx_serial_rx_chars_pio(ourport); } static void s3c24xx_serial_tx_chars(struct s3c24xx_uart_port *ourport) @@ -928,9 +924,8 @@ static void s3c24xx_serial_tx_chars(struct s3c24xx_uart_port *ourport) s3c24xx_serial_stop_tx(port); } -static irqreturn_t s3c24xx_serial_tx_irq(void *id) +static irqreturn_t s3c24xx_serial_tx_irq(struct s3c24xx_uart_port *ourport) { - struct s3c24xx_uart_port *ourport = id; struct uart_port *port = &ourport->port; uart_port_lock(port); @@ -944,17 +939,17 @@ static irqreturn_t s3c24xx_serial_tx_irq(void *id) /* interrupt handler for s3c64xx and later SoC's.*/ static irqreturn_t s3c64xx_serial_handle_irq(int irq, void *id) { - const struct s3c24xx_uart_port *ourport = id; + struct s3c24xx_uart_port *ourport = id; const struct uart_port *port = &ourport->port; u32 pend = rd_regl(port, S3C64XX_UINTP); irqreturn_t ret = IRQ_HANDLED; if (pend & S3C64XX_UINTM_RXD_MSK) { - ret = s3c24xx_serial_rx_irq(id); + ret = s3c24xx_serial_rx_irq(ourport); wr_regl(port, S3C64XX_UINTP, S3C64XX_UINTM_RXD_MSK); } if (pend & S3C64XX_UINTM_TXD_MSK) { - ret = s3c24xx_serial_tx_irq(id); + ret = s3c24xx_serial_tx_irq(ourport); wr_regl(port, S3C64XX_UINTP, S3C64XX_UINTM_TXD_MSK); } return ret; @@ -963,7 +958,7 @@ static irqreturn_t s3c64xx_serial_handle_irq(int irq, void *id) /* interrupt handler for Apple SoC's.*/ static irqreturn_t apple_serial_handle_irq(int irq, void *id) { - const struct s3c24xx_uart_port *ourport = id; + struct s3c24xx_uart_port *ourport = id; const struct uart_port *port = &ourport->port; u32 pend = rd_regl(port, S3C2410_UTRSTAT); irqreturn_t ret = IRQ_NONE; @@ -971,11 +966,11 @@ static irqreturn_t apple_serial_handle_irq(int irq, void *id) if (pend & (APPLE_S5L_UTRSTAT_RXTHRESH | APPLE_S5L_UTRSTAT_RXTO)) { wr_regl(port, S3C2410_UTRSTAT, APPLE_S5L_UTRSTAT_RXTHRESH | APPLE_S5L_UTRSTAT_RXTO); - ret = s3c24xx_serial_rx_irq(id); + ret = s3c24xx_serial_rx_irq(ourport); } if (pend & APPLE_S5L_UTRSTAT_TXTHRESH) { wr_regl(port, S3C2410_UTRSTAT, APPLE_S5L_UTRSTAT_TXTHRESH); - ret = s3c24xx_serial_tx_irq(id); + ret = s3c24xx_serial_tx_irq(ourport); } return ret;