From patchwork Wed Nov 15 21:02:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 165609 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b909:0:b0:403:3b70:6f57 with SMTP id t9csp2809968vqg; Wed, 15 Nov 2023 13:04:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IGYaHe1domfZgP5GNyMl3UvbxjMaos5ejXgqWCjI3ZAPPzmdXu7gymSzei6x+iL4kSYjbxK X-Received: by 2002:a05:6808:159d:b0:3b6:dc6f:271c with SMTP id t29-20020a056808159d00b003b6dc6f271cmr17028706oiw.48.1700082253605; Wed, 15 Nov 2023 13:04:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700082253; cv=none; d=google.com; s=arc-20160816; b=lmh6YwzARcxyuh7rUPCXbIwtA+m/nwu4SWJq75WoRb/Sx031aQvTBw08vwVHXy+099 xCF1oEW8anaxLJqRpy2a+0i6Ax0lHAqEDsWOd1JXEMcuuH02PzzlUm359AQiXoDUszwg 4sWqI0NzaNHufh5VJB1CKX7Q+ZOXeRKIyIInNr6FFTqouGr4EBdcR/VdKK1sigZOXQg+ Czo4LpP3bZutpXt7qyvrsv1sidbLYoz2YgY/HgPcOB7SSYIENUhwJZtH/QvmE3DugEHJ kjmL9T7tNzvVafuTJrB+cwuFudlktUGZy2kOeSVdijlu58V8d3NkpkQ4t/C0OShavv4q 7I9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=pqS2umDahExgvUp9vYjVtRrP0HXmO16NeUGqzSCCh8k=; fh=20aOYVgk5DcgGovGVFzHDmn12Lh87kfrBX3nFB/aKCQ=; b=nZp/zBT8G/WV/KFZiZvl/vHtvFHj32yj9GdYozRhprtNl/UVkyoV9AF8atastnl0HQ kKUdDdfHl+ytb2VyXXPMS44jHV8AwfpxnAEImSoiSQJH/GpgcE8cV1UcLUhQ2ROU0CUR Cyjj/jOpb9OObuBKEjchd+B8ABao2V44DH5WJLRoOMr8oUQ5wcgebV4x2em5xuNXq2cj 8B+HfcIDFfUx3fugRM15rNB5assKBzfv4lUnJUiYrGCRJK4Aw7AqCGGqFfMMqZ+iIIr6 97BjoynckFNJ7eqKopfgU74LTXaEwpVNoqYL3wXpBVaJsGvXGZdmfAAR/evdTEOFAYzS hvbA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id l11-20020a65680b000000b005b7c7eee133si10531515pgt.687.2023.11.15.13.04.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 13:04:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 3EF7680CA0A6; Wed, 15 Nov 2023 13:04:11 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344793AbjKOVDg (ORCPT + 29 others); Wed, 15 Nov 2023 16:03:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344738AbjKOVDJ (ORCPT ); Wed, 15 Nov 2023 16:03:09 -0500 Received: from mail-oa1-f51.google.com (mail-oa1-f51.google.com [209.85.160.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AADDEAB for ; Wed, 15 Nov 2023 13:02:56 -0800 (PST) Received: by mail-oa1-f51.google.com with SMTP id 586e51a60fabf-1e9c42fc0c9so27126fac.1 for ; Wed, 15 Nov 2023 13:02:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700082176; x=1700686976; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=pqS2umDahExgvUp9vYjVtRrP0HXmO16NeUGqzSCCh8k=; b=G0xULteVwLcZRCu+qHpibkXEQLcCiwVFREWyero8Zgp+/mgjqiXkL/Wuu25FGz+oGd 7+FWTMjGjgBJE2e91oL5mvFTas6mSt6/klJdSXjUsSGG9BCwVxzWrlzxQbHSzBtQDuuB /591K5ohABLUuzh9ZgUiTlu+cNPhZGayp2+UQgnggmjgR6jeKhOCuwZbXu7tTRMpIxQP 2n83Ecr6oOyaRslsobwRgNUTYQ3M4V9PDQHlr6DSr9NYb9gVQY2Rr5WkdEKscQNMXkws OnBqkKu+uzBlyYmQWscIoZwH6Z9rTfwtdBU4AwxpgBhPfNjvKG/q+wzAUzZJiY5bKw+N CiUw== X-Gm-Message-State: AOJu0YwvjlXal4EQ4UeKkVvcPxBnH1Cs3du372gQ0SqxIV5YnmzsBr12 19w7I+Cj39/DCl+pX5h4Q6vD5FV7kg== X-Received: by 2002:a05:6870:8895:b0:1ef:b16f:d29d with SMTP id m21-20020a056870889500b001efb16fd29dmr15609299oam.18.1700082175882; Wed, 15 Nov 2023 13:02:55 -0800 (PST) Received: from herring.priv (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id g6-20020a0568300a4600b006ce28044207sm690053otu.58.2023.11.15.13.02.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 13:02:54 -0800 (PST) Received: (nullmailer pid 3744821 invoked by uid 1000); Wed, 15 Nov 2023 21:02:53 -0000 From: Rob Herring To: Paul Burton , Miguel Ojeda Cc: linux-kernel@vger.kernel.org Subject: [RESEND PATCH] auxdisplay: img-ascii-lcd: Use device_get_match_data() Date: Wed, 15 Nov 2023 15:02:44 -0600 Message-ID: <20231115210245.3744589-1-robh@kernel.org> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 15 Nov 2023 13:04:11 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782665449237883900 X-GMAIL-MSGID: 1782665449237883900 Use preferred device_get_match_data() instead of of_match_device() to get the driver match data. With this, adjust the includes to explicitly include the correct headers. Signed-off-by: Rob Herring Acked-by: Miguel Ojeda --- drivers/auxdisplay/img-ascii-lcd.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/auxdisplay/img-ascii-lcd.c b/drivers/auxdisplay/img-ascii-lcd.c index fa23e415f260..c16a14becdfc 100644 --- a/drivers/auxdisplay/img-ascii-lcd.c +++ b/drivers/auxdisplay/img-ascii-lcd.c @@ -8,9 +8,9 @@ #include #include #include -#include -#include +#include #include +#include #include #include @@ -225,17 +225,12 @@ MODULE_DEVICE_TABLE(of, img_ascii_lcd_matches); */ static int img_ascii_lcd_probe(struct platform_device *pdev) { - const struct of_device_id *match; const struct img_ascii_lcd_config *cfg; struct device *dev = &pdev->dev; struct img_ascii_lcd_ctx *ctx; int err; - match = of_match_device(img_ascii_lcd_matches, dev); - if (!match) - return -ENODEV; - - cfg = match->data; + cfg = device_get_match_data(&pdev->dev); ctx = devm_kzalloc(dev, sizeof(*ctx) + cfg->num_chars, GFP_KERNEL); if (!ctx) return -ENOMEM;