From patchwork Wed Apr 13 07:51:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miquel Raynal X-Patchwork-Id: 12811645 X-Patchwork-Delegate: geert@linux-m68k.org 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18FBDC433EF for ; Wed, 13 Apr 2022 07:52:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233517AbiDMHyV (ORCPT ); Wed, 13 Apr 2022 03:54:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233495AbiDMHyK (ORCPT ); Wed, 13 Apr 2022 03:54:10 -0400 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E421E2AE2B; Wed, 13 Apr 2022 00:51:49 -0700 (PDT) Received: (Authenticated sender: miquel.raynal@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 10939FF803; Wed, 13 Apr 2022 07:51:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1649836308; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5kSK+IjrQW24cRviZQ9BaVYH9zhXeVeAjvyFftosVsc=; b=OZy+6uzSTIzW7GhTnKPv+eV3wCMdLwwi1g6ydwZR1J6itAqnWJCrVzVCMjGL0dPOJTWKzm pyqV58UbJJxBmAGJJgtg1ZhG4/B0gvF0pG6KkL8XW+ZUIN2Sw12Gy4ds1yDTVm2wpUrgh0 4OQNquhc860JZFt8hvIvRMu8BKXnnF8amRSzuJa+owL97rRXNeEIa6LFh50tCGr6KIUyUT 2jUjp7ax0v6g3Ja26kUMmrGs49JBF/1rNmm/FxrC2Y9nRkSW51w286kwamNwtrgCVEk1QB eass6MrwTJozCFcbfJ/jsXf+ESSAHq1ZpHl5w5N4/5BdbBdfXZkuMaOSm02MRA== From: Miquel Raynal To: Geert Uytterhoeven , Magnus Damm , Greg Kroah-Hartman , Jiri Slaby Cc: Miquel Raynal , Andy Shevchenko , linux-renesas-soc@vger.kernel.org, linux-serial@vger.kernel.org, Milan Stevanovic , Jimmy Lalande , Pascal Eberhard , Thomas Petazzoni , Herve Codina , Clement Leger , Ilpo Jarvinen , Emil Renner Berthing Subject: [PATCH v5 02/11] serial: 8250: dw: Use the device API Date: Wed, 13 Apr 2022 09:51:32 +0200 Message-Id: <20220413075141.72777-3-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220413075141.72777-1-miquel.raynal@bootlin.com> References: <20220413075141.72777-1-miquel.raynal@bootlin.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org Use the device API instead of the of_* API. While at it move this operation outside of the if block to reduce the indentation level. Cc: Emil Renner Berthing Suggested-by: Andy Shevchenko Signed-off-by: Miquel Raynal Reviewed-by: Geert Uytterhoeven Reviewed-by: Andy Shevchenko --- drivers/tty/serial/8250/8250_dw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c index 1666041513a5..e9f8b65563a1 100644 --- a/drivers/tty/serial/8250/8250_dw.c +++ b/drivers/tty/serial/8250/8250_dw.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -371,9 +372,9 @@ static bool dw8250_idma_filter(struct dma_chan *chan, void *param) static void dw8250_quirks(struct uart_port *p, struct dw8250_data *data) { struct device_node *np = p->dev->of_node; + unsigned long quirks = (unsigned long)device_get_match_data(p->dev); if (np) { - unsigned long quirks = (unsigned long)of_device_get_match_data(p->dev); int id; /* get index of serial line, if found in DT aliases */