Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp1118533rdb; Sat, 9 Sep 2023 09:27:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF9spai8W8qeqZAoHzRtBD5/aYFcxrywrDXwPXkxEun8Ie2qe1Q1l9agOEl49DBgT8y6urp X-Received: by 2002:a05:6512:1325:b0:4fb:744e:17db with SMTP id x37-20020a056512132500b004fb744e17dbmr3896354lfu.1.1694276869465; Sat, 09 Sep 2023 09:27:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694276869; cv=none; d=google.com; s=arc-20160816; b=SLihtiYL8IXRMkiqQATiSrMt7X5ELpqcmWCGuh57wkxBjBgzNUNQAW/g1/6EyXyQ4p ACjfkEHcH+RZqzQFuRtO4cdZTNJnjn4Hfs1jG/b3EBiJmDPvgsxPFf73F8y/osiX2sQl DIIyIjMEddvqJF5Yy//yn2ZjzMbQmiHacoampWoPVgjlFE7vaNnSK36ewG07GkGyyBkP C2MrR8ZyKG69yRXRMSTtWBWG6SXesYAJ0GLBTLEqpGkoEc8aWdJLXT2WJWouYALnkcg8 5C7JLDsfJezcq23fqaYjyIIhBSLQjkWdZ+n/LXpMCniT4RnMoiZIaJunxozO8FwbcY81 HcKw== 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=49dztcn3SjH4uzL0FDKgOhXqWtsWecxe4vNSeaxXQUg=; fh=szMA/u+1iHjIVVuMOqhs4kSlUnkrB9yCjUsy1vlpVSA=; b=XghvFvaGtaL9pMibWLeKU7eP55c4+bpRanyfbhB794kpv+CG+fv9ttk2NNvm3kPM95 +cRlRwflqurGUzqAHEyXiUK77F1Byru7lr9dKGQVxeRxLgXv9dUUjeEiCK+VIMfZR9Sm hMYlweOw1wY1JEEmrKNl0rlVg/l2g1YLBIQHhvPPhcgQDBVsEHql2s/Z6Zpr64LWpapn dNXFSC39IwHeItFkygg6vJQZw513VnlhspzGdfvUyPT0pKiciIW9HDkOAUJa7kcCVIhO trI+WsyF9SWiGVGlOP02mN8ccVeCWjr4rBFJQSN7R+HhlsQMlwaytDLbmCmEhvBhGGkD 7N8Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=renesas.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k7-20020a170906a38700b009a190ce8513si3260435ejz.129.2023.09.09.09.27.22; Sat, 09 Sep 2023 09:27:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=renesas.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344632AbjIIK7r (ORCPT + 99 others); Sat, 9 Sep 2023 06:59:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229461AbjIIK7q (ORCPT ); Sat, 9 Sep 2023 06:59:46 -0400 Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7BD39CE7; Sat, 9 Sep 2023 03:59:41 -0700 (PDT) X-IronPort-AV: E=Sophos;i="6.02,239,1688396400"; d="scan'208";a="175523984" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 09 Sep 2023 19:59:40 +0900 Received: from localhost.localdomain (unknown [10.226.92.15]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 5903441F935B; Sat, 9 Sep 2023 19:59:38 +0900 (JST) From: Biju Das To: Patrick Rudolph , Linus Walleij Cc: Biju Das , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Biju Das , Andy Shevchenko Subject: [PATCH v2] pinctrl: cy8c95x0: Simplify probe() Date: Sat, 9 Sep 2023 11:59:33 +0100 Message-Id: <20230909105933.9678-1-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Simpilfy probe() by replacing device_get_match_data() and ID lookup for retrieving match data by i2c_get_match_data(). Signed-off-by: Biju Das Reviewed-by: Andy Shevchenko --- Note: This patch is only compile tested. v1->v2: * Updated commit description id->ID. * Added Rb tag from Andy. --- drivers/pinctrl/pinctrl-cy8c95x0.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/pinctrl/pinctrl-cy8c95x0.c b/drivers/pinctrl/pinctrl-cy8c95x0.c index 58ca6fac7849..fae80b52a6fc 100644 --- a/drivers/pinctrl/pinctrl-cy8c95x0.c +++ b/drivers/pinctrl/pinctrl-cy8c95x0.c @@ -1346,9 +1346,7 @@ static int cy8c95x0_probe(struct i2c_client *client) chip->dev = &client->dev; /* Set the device type */ - chip->driver_data = (unsigned long)device_get_match_data(&client->dev); - if (!chip->driver_data) - chip->driver_data = i2c_match_id(cy8c95x0_id, client)->driver_data; + chip->driver_data = (uintptr_t)i2c_get_match_data(client); if (!chip->driver_data) return -ENODEV; -- 2.25.1