Received: by 2002:a05:7412:f584:b0:e2:908c:2ebd with SMTP id eh4csp1071874rdb; Mon, 4 Sep 2023 01:58:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFmY3HF8oCW/fSHO+L0XuS5MaFgB63WrAII7KsVSE7eWT7D3gM9Bct1whruYEBJjY+Qa2IP X-Received: by 2002:a05:6512:1314:b0:4f8:7897:55e6 with SMTP id x20-20020a056512131400b004f8789755e6mr8146084lfu.45.1693817898672; Mon, 04 Sep 2023 01:58:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693817898; cv=none; d=google.com; s=arc-20160816; b=RejK3ZFOMaEZQ6B+TrsPqqz0kVzZp/R8Z9w304GUTrglAXFuBgNUy6Q7A0x+1a2eF4 +1A6A2lJINonB3oz+SJh1ApwbKMYpjmj49jYHdY6K5L+eKRjOoJ8ciA5A+CWtkxww5Xu 1xTG716EjgnWu71yBGJjl+AI/guLmwmYimjATDdS3P3Kla38uAb/Fo3iTKCpPc1T4wdX hf0V2mhqTlB/ddHNuWK0XzxuAARuzHBOoHjcmfLXLTWxaRQgIqM/n7FqgZ+gEMcSjW/n 6JJlU/PWoq+6lZ26b7piy5/UTyzTAIiNySFrN28Uhi7CC1RmOZOa/yBn8B8jY65urQ9a /dgQ== 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=ARa4G2ADBHi2fNReEIA0piXhg2lUebWEz2zJtD0pu9U=; fh=szMA/u+1iHjIVVuMOqhs4kSlUnkrB9yCjUsy1vlpVSA=; b=U+psJEbG66TvqQg9rdR1JLzMsxldl1RQ6RtnlkuUYOUPt508OMfvPbk1x3Etbpa1y4 pdbrw4NTwlavJjbXy1foJv0pF2qRJsHlwAn+e0eAHHowbcqg+T9VX9WRwaV5StezqVNH jGP2VMMEvFpqpysVnY9UysLrBfUXPsgQYjrP3ZYvJx1jSNxcq4aG0sLj4FaBanaufr2P pM2VBaCpHhhpF42L1R/vFcbXsBH2Jdj8eEVtqii7QcVT4pxv2ApOsGok4d7hR5xih6nr LpOkkpfq9mdbqM2yTS84fp2nkMHRo2PBNr6Qz+vZZ+KgD9CtaE3fN9XAgmBLPmj4tf7z cz/Q== 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 ti7-20020a170907c20700b009a606551a1dsi5642570ejc.766.2023.09.04.01.57.53; Mon, 04 Sep 2023 01:58:18 -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 S1351830AbjIBIWh (ORCPT + 99 others); Sat, 2 Sep 2023 04:22:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229475AbjIBIWf (ORCPT ); Sat, 2 Sep 2023 04:22:35 -0400 Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 94F5DCC; Sat, 2 Sep 2023 01:22:32 -0700 (PDT) X-IronPort-AV: E=Sophos;i="6.02,222,1688396400"; d="scan'208";a="174781788" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 02 Sep 2023 17:22:31 +0900 Received: from localhost.localdomain (unknown [10.226.92.16]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 633964006186; Sat, 2 Sep 2023 17:22:29 +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] pinctrl: cy8c95x0: Simplify probe() Date: Sat, 2 Sep 2023 09:22:25 +0100 Message-Id: <20230902082225.8777-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,RCVD_IN_MSPIKE_H2,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 --- Note: This patch is only compile tested. --- 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