Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4098281imu; Mon, 10 Dec 2018 13:06:46 -0800 (PST) X-Google-Smtp-Source: AFSGD/VsJJp6qmv5Co2s96lEzSC7IKKPVkgZsKzSpnjd134VELOBYedDNTDlcO2TibtWFIwH9krp X-Received: by 2002:a63:62c3:: with SMTP id w186mr12291846pgb.345.1544476006184; Mon, 10 Dec 2018 13:06:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544476006; cv=none; d=google.com; s=arc-20160816; b=ZyUP7oPiDmURgCyyuV30lguj1Dqp32q3Oy+nCZk0hsFtkvQMHFyP/JzUd86AqWq+TH r2Mmo9JEI4/JeOCgLDt1uftUH6tgaf5NKvamepoMl3/UA9mQ+1wcn1rStGuQQk9pKufH iiGKUxwujFyNYrQlMCAjteTQb9uCV0SrgFqYit+70EScXCFqD2wRtw8EYqIw0/XRf/e3 iaxwwBW3i9OGqSDfKBHeatQoFYTJJEMHNHme6mSm4jwuLuR+yZ+VRINCem+xO6djfE5G dKv5jFDcKP+qfRpoRdqZy6e7B+t3KQ8MkJLgb/2SZC4cO650WIzE/oC7DOZB5PmWiDwn /RGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=uTJWA01tD7d9koV9b4vvtU4JRHi5nqkDBJvd+nnh2Pg=; b=Rj0BbRpQHDnSF03KknLDqFQl4LsUu/j/FvsbFjH6c7mpFu1+pi7YxDNhMDf583ijYs nc4FZzPdyhsBgNYzXMb7u3Axkoq9lV2kOfI+PiBOapbJRyIjg07x4AMK6QYxa36WmqeK 5Nhzz8roaEuVUlUbqX42oFjhEoZ0uPKxHPOELm9uh2pLCgtvMlNSjzFfzJhc7al7vjlP cJUJ5a3Htmzyvze+DUFEoC5EGM6fmGD4pa5qYhXNP0LZ0EMiKreclizCWg1xLgfvRIg1 fCaWkWeoMMxTbh8dw4EULRzUpQFcwpSeRNgqXVtCEEkPsJAszGMXW2+oEqyRbtaS/PMk f7+Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 24si10384575pgm.167.2018.12.10.13.06.27; Mon, 10 Dec 2018 13:06:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729963AbeLJVDX (ORCPT + 99 others); Mon, 10 Dec 2018 16:03:23 -0500 Received: from sauhun.de ([88.99.104.3]:36726 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727967AbeLJVDT (ORCPT ); Mon, 10 Dec 2018 16:03:19 -0500 Received: from localhost (p54B335CF.dip0.t-ipconnect.de [84.179.53.207]) by pokefinder.org (Postfix) with ESMTPSA id 64A034C3C75; Mon, 10 Dec 2018 22:03:17 +0100 (CET) From: Wolfram Sang To: linux-i2c@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, Hans de Goede , linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Wolfram Sang , Orson Zhai , Baolin Wang , Chunyan Zhang , linux-kernel@vger.kernel.org Subject: [RFC/RFT 06/10] i2c: sprd: don't use pdev as variable name for struct device * Date: Mon, 10 Dec 2018 22:03:04 +0100 Message-Id: <20181210210310.12677-7-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181210210310.12677-1-wsa+renesas@sang-engineering.com> References: <20181210210310.12677-1-wsa+renesas@sang-engineering.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The pointer to a device is usually named 'dev'. These 'pdev' here look much like copy&paste errors. Fix them to avoid confusion. Signed-off-by: Wolfram Sang --- drivers/i2c/busses/i2c-sprd.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/i2c/busses/i2c-sprd.c b/drivers/i2c/busses/i2c-sprd.c index a94e724f51dc..e266d8a713d9 100644 --- a/drivers/i2c/busses/i2c-sprd.c +++ b/drivers/i2c/busses/i2c-sprd.c @@ -586,40 +586,40 @@ static int sprd_i2c_remove(struct platform_device *pdev) return 0; } -static int __maybe_unused sprd_i2c_suspend_noirq(struct device *pdev) +static int __maybe_unused sprd_i2c_suspend_noirq(struct device *dev) { - struct sprd_i2c *i2c_dev = dev_get_drvdata(pdev); + struct sprd_i2c *i2c_dev = dev_get_drvdata(dev); i2c_lock_bus(&i2c_dev->adap, I2C_LOCK_ROOT_ADAPTER); i2c_dev->is_suspended = true; i2c_unlock_bus(&i2c_dev->adap, I2C_LOCK_ROOT_ADAPTER); - return pm_runtime_force_suspend(pdev); + return pm_runtime_force_suspend(dev); } -static int __maybe_unused sprd_i2c_resume_noirq(struct device *pdev) +static int __maybe_unused sprd_i2c_resume_noirq(struct device *dev) { - struct sprd_i2c *i2c_dev = dev_get_drvdata(pdev); + struct sprd_i2c *i2c_dev = dev_get_drvdata(dev); i2c_lock_bus(&i2c_dev->adap, I2C_LOCK_ROOT_ADAPTER); i2c_dev->is_suspended = false; i2c_unlock_bus(&i2c_dev->adap, I2C_LOCK_ROOT_ADAPTER); - return pm_runtime_force_resume(pdev); + return pm_runtime_force_resume(dev); } -static int __maybe_unused sprd_i2c_runtime_suspend(struct device *pdev) +static int __maybe_unused sprd_i2c_runtime_suspend(struct device *dev) { - struct sprd_i2c *i2c_dev = dev_get_drvdata(pdev); + struct sprd_i2c *i2c_dev = dev_get_drvdata(dev); clk_disable_unprepare(i2c_dev->clk); return 0; } -static int __maybe_unused sprd_i2c_runtime_resume(struct device *pdev) +static int __maybe_unused sprd_i2c_runtime_resume(struct device *dev) { - struct sprd_i2c *i2c_dev = dev_get_drvdata(pdev); + struct sprd_i2c *i2c_dev = dev_get_drvdata(dev); int ret; ret = clk_prepare_enable(i2c_dev->clk); -- 2.11.0