linux-samsung-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tamseel Shams <m.shams@samsung.com>
To: kgene@kernel.org, krzk@kernel.org, gregkh@linuxfoundation.org,
	jslaby@suse.com
Cc: linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org, linux-serial@vger.kernel.org,
	linux-kernel@vger.kernel.org, alim.akhtar@samsung.com,
	ajaykumar.rs@samsung.com, Tamseel Shams <m.shams@samsung.com>
Subject: [PATCH v4] serial: samsung: change to platform_get_irq_optional
Date: Mon, 21 Jun 2021 10:17:57 +0530	[thread overview]
Message-ID: <20210621044757.40046-1-m.shams@samsung.com> (raw)
In-Reply-To: CGME20210621044400epcas5p40368077e77d2da219db8f890dfd69f7c@epcas5p4.samsung.com

In few older Samsung SoCs like s3c2410, s3c2412
and s3c2440, UART IP is having 2 interrupt lines.
However, in other SoCs like s3c6400, s5pv210,
exynos5433, and exynos4210 UART is having only 1
interrupt line. Due to this, "platform_get_irq(platdev, 1)"
call in the driver gives the following false-positive error:
"IRQ index 1 not found" on recent platforms.

This patch replaces the platform_get_irq() call with
platform_get_irq_optional() and hence avoiding the
false-positive error.

Signed-off-by: Tamseel Shams <m.shams@samsung.com>
---
Commit message is changed.
Addressed Krzysztof's previous comment.
 
 drivers/tty/serial/samsung_tty.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c
index 6ef614d8648c..c44582011b9b 100644
--- a/drivers/tty/serial/samsung_tty.c
+++ b/drivers/tty/serial/samsung_tty.c
@@ -1911,7 +1911,7 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport,
 		ourport->tx_irq = ret + 1;
 	}
 
-	ret = platform_get_irq(platdev, 1);
+	ret = platform_get_irq_optional(platdev, 1);
 	if (ret > 0)
 		ourport->tx_irq = ret;
 	/*
-- 
2.17.1


       reply	other threads:[~2021-06-21  4:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20210621044400epcas5p40368077e77d2da219db8f890dfd69f7c@epcas5p4.samsung.com>
2021-06-21  4:47 ` Tamseel Shams [this message]
2021-06-21  5:26   ` [PATCH v4] serial: samsung: change to platform_get_irq_optional M Tamseel Shams
     [not found] <CGME20200713141655epcas5p2cdd83477e4fc024457a2b08d8ebfbad0@epcas5p2.samsung.com>
2020-07-13 13:55 ` Tamseel Shams
2020-07-21  8:04   ` Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210621044757.40046-1-m.shams@samsung.com \
    --to=m.shams@samsung.com \
    --cc=ajaykumar.rs@samsung.com \
    --cc=alim.akhtar@samsung.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=kgene@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).