Message ID | 20231110182304.3894319-15-andriy.shevchenko@linux.intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b129:0:b0:403:3b70:6f57 with SMTP id q9csp1379246vqs; Fri, 10 Nov 2023 12:57:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IHQDJhpZLNgpIWgB5KjMCnakdWqePXXiGzzkzGRFk/5rjQkqT7PTrnEfxB3xLQv9uL42uSp X-Received: by 2002:a17:903:2654:b0:1cc:4e78:d10f with SMTP id je20-20020a170903265400b001cc4e78d10fmr489227plb.8.1699649836106; Fri, 10 Nov 2023 12:57:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699649836; cv=none; d=google.com; s=arc-20160816; b=IA0L/qgOPYpTgiisOk1q+mYSmLVEQr7QlrKaoI0GIad8d+6WTJPFp+UX3R1cG6gqFy DnIX0u0KPQbNL5Jh4eh0QCcSg+teqM0k0h9CkEwKWqlUDM+rAP+hEPiHhco+melhT6rW STwNKlZB4m53xQuoZgFWXnN2ggaVBelUhdy0f+K5nyG7MBQurd+reB5pPMdt/NOS+6Wl MB/TjGCPROwuPE7Zrb1I35vjP86xcTFUahCnp+0kWXqnBdflFKhM4Ava4cFxzXgaCHfY omrsBZOg5KX2gANsfnx47uUKrWtwjw/f99+7SpbgBUWTGjBHZz+bvKsnrG7Ms0LkLWjb 2KSA== 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=y0v2zvZ5dbT/XiTnvy6WJ9ol2gWBWIHa2pIpEOGLQg0=; fh=oqZDtrV02dtzkTHSBiwo+TWR13WhTCI6t34Q5J0VV5o=; b=nmzRWMgEsoMYTKWO7h4RWJRSjWMXvItWWQW+jCBL7++UXVcfjs0QqwZaiY2QGLBrnu KoOnqfweUaZkPjkImTs+YZlNfTg7MGgtE4wTePEpntkzuMB/Ul3Dh5AVLzRQBpyCasG6 ySJLqJgaQyFtwui8fTosPtd7Cp7OPXdAlOBKrJbGXVSqShF+i14LUKMfFKc+pk1jAFJo 15T6YhroOUkoFA1qdi4XUMy5lwiM0Xt1kM98XhNsR4ff07gEuTzQeTkXgYYs8+f/0mUb hhGfZxoUhCjTX9ljADsY7J92h0fZPn7i8eL0+xABn+CGUbMiM5ZgyBpWCBZnsQ+wblUL 9Fkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NyL7DKfx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id 3-20020a170902c10300b001befd0512e8si134051pli.303.2023.11.10.12.57.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Nov 2023 12:57:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NyL7DKfx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (Postfix) with ESMTP id BD8EB83CE95C; Fri, 10 Nov 2023 12:57:13 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345962AbjKJU5B (ORCPT <rfc822;heyuhang3455@gmail.com> + 29 others); Fri, 10 Nov 2023 15:57:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235873AbjKJU4n (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 10 Nov 2023 15:56:43 -0500 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56EEF62CE0; Fri, 10 Nov 2023 10:31: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=1699641085; x=1731177085; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=aDNeBaFxH9YLIpux4SIUUOepmpuzRLX2X1AJDeylr5c=; b=NyL7DKfxpVYcDQTT+9V4WxVvaZ/mCDaMCQCGc/jJi9EE1FOssavUSpob vny9UoEvAkf38cvjVOFQc8QaUGOdJ5MIDj3aXVA8faRM/GusH7/dPaVAz Y7ZSrABR+M29SiHkc8K5f6MRI8XhZKgu54bJz8oKUsqZVuLbt8lWEFEtT VaRkBcG3zMgcYo7srtRHa1rhUGMkH8NSZj/4it/NuAFnIogk1q57sS89T VI46IJ4iiTEOlgCIkuW6d5tVwzVKRs/1iPemGaRb4L/ginsRSCXcaYjSQ N2A7mG2qKCVh68xZkV6kYjfqtYeeTZg0FDXYpMCzj2bATmVMLPY93xJD6 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10890"; a="456715078" X-IronPort-AV: E=Sophos;i="6.03,291,1694761200"; d="scan'208";a="456715078" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Nov 2023 10:29:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10890"; a="763808263" X-IronPort-AV: E=Sophos;i="6.03,291,1694761200"; d="scan'208";a="763808263" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga002.jf.intel.com with ESMTP; 10 Nov 2023 10:29:40 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id F2288888; Fri, 10 Nov 2023 20:23:07 +0200 (EET) From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> To: Jarkko Nikula <jarkko.nikula@linux.intel.com>, Mario Limonciello <mario.limonciello@amd.com>, Herbert Xu <herbert@gondor.apana.org.au>, Andy Shevchenko <andriy.shevchenko@linux.intel.com>, Wolfram Sang <wsa@kernel.org>, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Mika Westerberg <mika.westerberg@linux.intel.com>, Jan Dabros <jsd@semihalf.com>, Andi Shyti <andi.shyti@kernel.org>, Philipp Zabel <p.zabel@pengutronix.de>, Hans de Goede <hdegoede@redhat.com> Subject: [PATCH v3 14/25] i2c: designware: Rename dw_i2c_of_configure() -> i2c_dw_of_configure() Date: Fri, 10 Nov 2023 20:11:34 +0200 Message-ID: <20231110182304.3894319-15-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20231110182304.3894319-1-andriy.shevchenko@linux.intel.com> References: <20231110182304.3894319-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,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 groat.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Fri, 10 Nov 2023 12:57:13 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782207379558602399 X-GMAIL-MSGID: 1782212026729359849 |
Series |
i2c: designware: code consolidation & cleanups
|
|
Commit Message
Andy Shevchenko
Nov. 10, 2023, 6:11 p.m. UTC
For the sake of consistency, rename dw_i2c_of_configure() and change its parameter to be aligned with the i2c_dw_acpi_configure(). Reviewed-by: Andi Shyti <andi.shyti@kernel.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> --- drivers/i2c/busses/i2c-designware-platdrv.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
Comments
On 11/10/23 21:39, Mario Limonciello wrote: > On 11/10/2023 12:11, Andy Shevchenko wrote: >> For the sake of consistency, rename dw_i2c_of_configure() and change >> its parameter to be aligned with the i2c_dw_acpi_configure(). >> >> Reviewed-by: Andi Shyti <andi.shyti@kernel.org> >> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> >> --- >> drivers/i2c/busses/i2c-designware-platdrv.c | 9 +++++---- >> 1 file changed, 5 insertions(+), 4 deletions(-) >> Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c index 7449f1b37ecf..b8606b651feb 100644 --- a/drivers/i2c/busses/i2c-designware-platdrv.c +++ b/drivers/i2c/busses/i2c-designware-platdrv.c @@ -110,9 +110,10 @@ static int mscc_twi_set_sda_hold_time(struct dw_i2c_dev *dev) return 0; } -static void dw_i2c_of_configure(struct platform_device *pdev) +static void i2c_dw_of_configure(struct device *device) { - struct dw_i2c_dev *dev = platform_get_drvdata(pdev); + struct platform_device *pdev = to_platform_device(device); + struct dw_i2c_dev *dev = dev_get_drvdata(device); switch (dev->flags & MODEL_MASK) { case MODEL_MSCC_OCELOT: @@ -130,7 +131,7 @@ static int bt1_i2c_request_regs(struct dw_i2c_dev *dev) return -ENODEV; } -static inline void dw_i2c_of_configure(struct platform_device *pdev) +static inline void i2c_dw_of_configure(struct device *device) { } #endif @@ -306,7 +307,7 @@ static int dw_i2c_plat_probe(struct platform_device *pdev) i2c_dw_adjust_bus_speed(dev); if (pdev->dev.of_node) - dw_i2c_of_configure(pdev); + i2c_dw_of_configure(&pdev->dev); if (has_acpi_companion(&pdev->dev)) i2c_dw_acpi_configure(&pdev->dev);