Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1685511rdb; Thu, 7 Dec 2023 06:18:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IGw0a/7a1NNif5LX99Xhs+DvDv0sluvKsgCPdFhovskTo+jZZQ3KJfGd8P/WHno60ajp8QV X-Received: by 2002:a05:6a20:938a:b0:18c:8afc:cdd2 with SMTP id x10-20020a056a20938a00b0018c8afccdd2mr2245643pzh.17.1701958732030; Thu, 07 Dec 2023 06:18:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701958732; cv=none; d=google.com; s=arc-20160816; b=HpKnm0YoW2PM83L2thT8jc7Qy4imjTNqwqnYMBu5x2NqbS+k59jWdnrDo59y1g5Tzl vHcHVMdr+jY0pWyWjUYs0UySz3/jbylF9xhzjS+xrqmZSIAWpsH1MWU/IaV5aMli7PB8 Lw2SwbNzAusO4N/aS88S8QH1ynkZgVLlDWmYKhlAnUgAhM1CzhwUvWIji/n3igtL7QRk edD/LAeuBdDb6u+53jjMXWAmNpMSqrW/MKqmXQdCSdF+xwAKTeH1T4O6uiz+WvKsZXPT Zyl5URtu/7JdpCeYZ9egbKppAHd5lzHQJ/9L+SBMoUlguC9MohvlJNPEtsKmat4qxXJ+ W13A== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=JFp1i7XVBwl1aQJhdy5RRcwOem8EJPBbxp20H08kF6Q=; fh=2EyuYZuFv7pvbWODgXyYvSVo1Jt/nOD9U4n59BuOM5Q=; b=erPI4LbOrMQftlBFfstDzlAgsOmp0hbM2KNrcQtNAU0ceDkLv40gwF/ttpK10FOC2j bX/NyPbPp2g7EaaA03K9WPW2hRsIslfa/cpo5abJLx+VSic3X5PIsbhZYx1grRZcXjBe aW7TXGMshMqadUD63EfcRT4+UIYdP09CcH003SOtB1+dLM5HETZG5tQEXzui7qCeAyYS yHyOVvSVk1YbllzONT0ybNGJXe0LZeD4Olz7YuzhDlGp0yVfSQSHUBmmMjwDqg0tfVNr gw0U1RaZi8QghT7xyAVLAH2+8tIge0d5AzYZEhHITBgS4SPWa2FKCvmqqDvqEjV8UGS1 tneg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=nLe+nS9w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id f21-20020a631015000000b005b9022ddeaasi1232659pgl.516.2023.12.07.06.18.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 06:18:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=nLe+nS9w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id AC6D080B8E7D; Thu, 7 Dec 2023 06:18:50 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443394AbjLGOSZ (ORCPT + 99 others); Thu, 7 Dec 2023 09:18:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443209AbjLGORo (ORCPT ); Thu, 7 Dec 2023 09:17:44 -0500 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15B3A10FF; Thu, 7 Dec 2023 06:17:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701958646; x=1733494646; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=LDVJgGPC1/UfdET2Sar0sat4JWJvb4Gf9G/ZusZGYKI=; b=nLe+nS9weoI5zMJ08zTVnKvCWb7FKJHHtUkwdQ3TwPTWWAl+wQHrLNcb x07cMO6u+nG3FtQe65PKCMG6wqvb3P4oc9rikVPOp1mfEUTD5qIZ3IUKt 3dflv5PoTDyoVfFcZzd7fFjkxd96oqylHxYykReIkVVtjUTA78YgKyD4o AfGyur9qLRC/tJVSbz7ERoHgVsf8deIMBjZymlPnsRDMV9/Uyuhu0mUf2 V3HpkOFskfXeMwrOjcHvc+iae+/eLPMGddB84BCrtVULEKNzm5mUJadCS yWgKyb2aLjxaQkGnAGJgdt8eO8W3HI/Oiwnj2Bi0KR91narvbVlfedDYF A==; X-IronPort-AV: E=McAfee;i="6600,9927,10917"; a="460726221" X-IronPort-AV: E=Sophos;i="6.04,256,1695711600"; d="scan'208";a="460726221" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Dec 2023 06:17:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10917"; a="889756108" X-IronPort-AV: E=Sophos;i="6.04,256,1695711600"; d="scan'208";a="889756108" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga002.fm.intel.com with ESMTP; 07 Dec 2023 06:17:12 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 721CBCCE; Thu, 7 Dec 2023 16:17:03 +0200 (EET) From: Andy Shevchenko To: Mario Limonciello , Jarkko Nikula , Herbert Xu , Andy Shevchenko , Wolfram Sang , Andi Shyti , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Mika Westerberg , Jan Dabros , Philipp Zabel , Serge Semin Subject: [PATCH v5 21/24] i2c: designware: Use pci_get_drvdata() Date: Thu, 7 Dec 2023 16:14:01 +0200 Message-ID: <20231207141653.2785124-22-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20231207141653.2785124-1-andriy.shevchenko@linux.intel.com> References: <20231207141653.2785124-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 07 Dec 2023 06:18:50 -0800 (PST) Use the wrapper function for getting the driver data using pci_dev instead of using dev_get_drvdata() with &pdev->dev, so we can directly pass a struct pci_dev. This is a purely cosmetic change. Reviewed-by: Andi Shyti Tested-by: Serge Semin Acked-by: Jarkko Nikula Link: https://lore.kernel.org/r/20231120144641.1660574-22-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko --- drivers/i2c/busses/i2c-designware-pcidrv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c b/drivers/i2c/busses/i2c-designware-pcidrv.c index 2c7bc7dc8e44..211d8279b05e 100644 --- a/drivers/i2c/busses/i2c-designware-pcidrv.c +++ b/drivers/i2c/busses/i2c-designware-pcidrv.c @@ -102,7 +102,7 @@ static u32 mfld_get_clk_rate_khz(struct dw_i2c_dev *dev) static int mfld_setup(struct pci_dev *pdev, struct dw_pci_controller *c) { - struct dw_i2c_dev *dev = dev_get_drvdata(&pdev->dev); + struct dw_i2c_dev *dev = pci_get_drvdata(pdev); switch (pdev->device) { case 0x0817: @@ -152,7 +152,7 @@ static u32 navi_amd_get_clk_rate_khz(struct dw_i2c_dev *dev) static int navi_amd_setup(struct pci_dev *pdev, struct dw_pci_controller *c) { - struct dw_i2c_dev *dev = dev_get_drvdata(&pdev->dev); + struct dw_i2c_dev *dev = pci_get_drvdata(pdev); dev->flags |= MODEL_AMD_NAVI_GPU; dev->timings.bus_freq_hz = I2C_MAX_STANDARD_MODE_FREQ; -- 2.43.0.rc1.1.gbec44491f096