From patchwork Thu Mar 17 17:46:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miquel Raynal X-Patchwork-Id: 12784388 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 F3821C43217 for ; Thu, 17 Mar 2022 17:46:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237061AbiCQRsH (ORCPT ); Thu, 17 Mar 2022 13:48:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237063AbiCQRrx (ORCPT ); Thu, 17 Mar 2022 13:47:53 -0400 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C62C1EC984; Thu, 17 Mar 2022 10:46:36 -0700 (PDT) Received: (Authenticated sender: miquel.raynal@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 19AF7FF80B; Thu, 17 Mar 2022 17:46:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1647539195; 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=KKVr7N2j8FFtbngS0O/xzuSQW98DT1L97+gy+JEQYOU=; b=VGF5C5lkEhnb41EQFdPwrQs91EsA2JeSgmsqkR1sxPCMgx1N+t/kAU6LVpXVaHUqmyE5w2 Lq5zJMWMOraS9IvzGI3xXg9qWtVAyz5qoKUiWe7mkiCDCO81b7n//huz+yE9TD2FPQxLO0 x0ncHWHkUICsibpjijIlyZZENR+MZP6MbGR4ORaVZ2EhtOBPCrFvCXWBJtYLDrO0Pgl63v 9CRn0ZVsoKv+NOYyjkH+gPZXTRulx448JxA9/iOUrOalBC5fseltxgJv+CudxnR77VvMyD gF0SDwiICiX3YtUZXjogCLOBpj80Bv+/Du3uiDB349s4RsMyL5ECVFIJb4cPCw== From: Miquel Raynal To: linux-renesas-soc@vger.kernel.org, Magnus Damm , Gareth Williams , Phil Edworthy , Geert Uytterhoeven Cc: Greg Kroah-Hartman , Jiri Slaby , Andy Shevchenko , Milan Stevanovic , Jimmy Lalande , Pascal Eberhard , Thomas Petazzoni , Herve Codina , Clement Leger , linux-serial@vger.kernel.org, Miquel Raynal , Emil Renner Berthing Subject: [PATCH v2 02/10] serial: 8250: dw: Use the device API Date: Thu, 17 Mar 2022 18:46:19 +0100 Message-Id: <20220317174627.360815-3-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220317174627.360815-1-miquel.raynal@bootlin.com> References: <20220317174627.360815-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 --- drivers/tty/serial/8250/8250_dw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c index d89731d6c94c..28f0dea2ed88 100644 --- a/drivers/tty/serial/8250/8250_dw.c +++ b/drivers/tty/serial/8250/8250_dw.c @@ -376,9 +376,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 */