Received: by 2002:a05:7412:b101:b0:e2:908c:2ebd with SMTP id az1csp2885646rdb; Wed, 15 Nov 2023 13:38:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IFu1vXoIUGaDbjyAvq12ED9/Jum+5vlWMlhlBPScP9eA0ri2JcXabLn0JRq1V1648dJWtbL X-Received: by 2002:a17:903:18e:b0:1ce:1674:fd15 with SMTP id z14-20020a170903018e00b001ce1674fd15mr8002395plg.65.1700084298619; Wed, 15 Nov 2023 13:38:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700084298; cv=none; d=google.com; s=arc-20160816; b=hhMw0Ov/KcGfzUryuYhQFrK+qqnbF0iTu5gUOvdKrLVI2IYGvpA6EOYcIeuuHKnWte oxDB8yQtyydPnCId5/vZrSGkowsycq023NJG3x8LZNAsNjed1WXTQXirjcjqPgAccTQC E+/uCTigCJwT/3tfSSVYPdHydn3Tcf0kITwYksLioH/p409IRBUV5Mklp1e0Jg3KNLCA IeKsq8DPde5SjhZhFLGVi/r/txuOOurmGrMR9qclfNalGOTHHRKjjsIcN2ZzYXr9IbP3 LpXkCKzZcqkIOzZvGg/4LstZrLv2NaTo0X+igCyxKUpOq1CRUNhaXuTj3iJj+j4CD9cd rN3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:references:to:from:subject:cc :message-id:date:content-transfer-encoding:mime-version :dkim-signature; bh=p+U5Jaoel/VCDuE8uY+PJ8tN8slvNLJcEbXPMTcTUU4=; fh=S3HmJWTTD5wBWb9fdTMLhJFTerYRhB8lmgB7nRcOyO8=; b=JpmIdj0KHFCsbFEQzNibY5vnjCB46Z0agkXlobguOJO4KNri6Tgif/9X28NnXecTmA GhE8hRH/SLOsBWpgnwN7tiZP0VoJAcjp6dHyuMQs90SrC/NttLv+alEKjO3xvLRhXYra JEBZg96IO/43ufWlMxersWSuQ0DyuDhnejy2go0QvRYtIFF44XW5H9fAuBnsTNGwqv9S akAszc6H6Yz7TokDoEfOjf7YWr7LtTA+Wr8i9vma3GThVkiSO7EFy653lZCx4zhOP8TP jGw2VRkzaNQythP0tGOsrz5Fcpcf1FGs27K3gHCOmvbqHyzrfAuiPhhLO2sNq6h95bA5 7CBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=vAYHeNK+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id b15-20020a170902e94f00b001c9ce2b6b97si11449688pll.198.2023.11.15.13.38.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 13:38:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=vAYHeNK+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (Postfix) with ESMTP id 7495180417F8; Wed, 15 Nov 2023 13:38:16 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344560AbjKOViC (ORCPT + 99 others); Wed, 15 Nov 2023 16:38:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229577AbjKOViB (ORCPT ); Wed, 15 Nov 2023 16:38:01 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DE21130 for ; Wed, 15 Nov 2023 13:37:58 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2CD8EC433C7; Wed, 15 Nov 2023 21:37:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700084278; bh=AmCgzmB7jjz+T45RrytzAofEx2AMRRYYB6hhglefLRg=; h=Date:Cc:Subject:From:To:References:In-Reply-To:From; b=vAYHeNK+27nLlK6csqDqimKGiMbHfw6gqr5RfG1F+2FyF2QETyLVwaii0D83vzB42 PtVQOhRSWwe1LhVH7u07nXv9W8GW4TF9LiqzLCIMSpupPxvJuKJCTG7MtdFaU2w0bH CiTfFjX08v5IMmdM59s8dNC91keCn04H8Dj82yZNVDUuxAHKayzrhCkTdRQUvg7j7n pZDkQxAugC/D4TZ8O77V/MRcvxLZTPVhILsYWZlmt/YwqZsmsprA4HaMGac1GulYKs HDG6vPoCuSrsZm4gG3m7gXB7dW7Ow11Ck1iPLUoB0OYeu+WltkuYahWhTyX/EdfkBB aOiCAPDdZM6tw== Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Wed, 15 Nov 2023 23:37:55 +0200 Message-Id: Cc: , Subject: Re: [RESEND PATCH] tpm: nuvoton: Use i2c_get_match_data() From: "Jarkko Sakkinen" To: "Rob Herring" , "Peter Huewe" , "Jason Gunthorpe" X-Mailer: aerc 0.15.2 References: <20231115210215.3743873-1-robh@kernel.org> In-Reply-To: <20231115210215.3743873-1-robh@kernel.org> X-Spam-Status: No, score=-1.3 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Wed, 15 Nov 2023 13:38:16 -0800 (PST) On Wed Nov 15, 2023 at 11:02 PM EET, Rob Herring wrote: > Use preferred i2c_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 > --- > drivers/char/tpm/tpm_i2c_nuvoton.c | 15 ++++----------- > 1 file changed, 4 insertions(+), 11 deletions(-) > > diff --git a/drivers/char/tpm/tpm_i2c_nuvoton.c b/drivers/char/tpm/tpm_i2= c_nuvoton.c > index d7be03c41098..5490f7e0fa43 100644 > --- a/drivers/char/tpm/tpm_i2c_nuvoton.c > +++ b/drivers/char/tpm/tpm_i2c_nuvoton.c > @@ -19,7 +19,8 @@ > #include > #include > #include > -#include > +#include > +#include > #include "tpm.h" > =20 > /* I2C interface offsets */ > @@ -524,7 +525,6 @@ static int get_vid(struct i2c_client *client, u32 *re= s) > =20 > static int i2c_nuvoton_probe(struct i2c_client *client) > { > - const struct i2c_device_id *id =3D i2c_client_get_device_id(client); > int rc; > struct tpm_chip *chip; > struct device *dev =3D &client->dev; > @@ -546,15 +546,8 @@ static int i2c_nuvoton_probe(struct i2c_client *clie= nt) > if (!priv) > return -ENOMEM; > =20 > - if (dev->of_node) { > - const struct of_device_id *of_id; > - > - of_id =3D of_match_device(dev->driver->of_match_table, dev); > - if (of_id && of_id->data =3D=3D OF_IS_TPM2) > - chip->flags |=3D TPM_CHIP_FLAG_TPM2; > - } else > - if (id->driver_data =3D=3D I2C_IS_TPM2) > - chip->flags |=3D TPM_CHIP_FLAG_TPM2; > + if (i2c_get_match_data(client)) > + chip->flags |=3D TPM_CHIP_FLAG_TPM2; > =20 > init_waitqueue_head(&priv->read_queue); > =20 OK, apologies for having to do a resend. I'll pick this, thanks! Reviewed-by: Jarkko Sakkinen BR, Jarkko