Linux-PM Archive on lore.kernel.org
 help / color / Atom feed
From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: linux-i2c@vger.kernel.org
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>,
	Sebastian Reichel <sre@kernel.org>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 23/34] power: supply: rt9455_charger: simplify getting the adapter of a client
Date: Sat,  8 Jun 2019 12:56:02 +0200
Message-ID: <20190608105619.593-24-wsa+renesas@sang-engineering.com> (raw)
In-Reply-To: <20190608105619.593-1-wsa+renesas@sang-engineering.com>

We have a dedicated pointer for that, so use it. Much easier to read and
less computation involved.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---

Please apply to your subsystem tree.

 drivers/power/supply/rt9455_charger.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/supply/rt9455_charger.c b/drivers/power/supply/rt9455_charger.c
index 40a9d329418a..29161ae90245 100644
--- a/drivers/power/supply/rt9455_charger.c
+++ b/drivers/power/supply/rt9455_charger.c
@@ -1584,7 +1584,7 @@ static const struct regmap_config rt9455_regmap_config = {
 static int rt9455_probe(struct i2c_client *client,
 			const struct i2c_device_id *id)
 {
-	struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent);
+	struct i2c_adapter *adapter = client->adapter;
 	struct device *dev = &client->dev;
 	struct rt9455_info *info;
 	struct power_supply_config rt9455_charger_config = {};
-- 
2.19.1


  parent reply index

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-08 10:55 [PATCH 00/34] treewide: simplify getting the adapter of an I2C client Wolfram Sang
2019-06-08 10:55 ` [PATCH 16/34] power: supply: bq24190_charger: simplify getting the adapter of a client Wolfram Sang
2019-06-13  9:50   ` Simon Horman
2019-06-08 10:55 ` [PATCH 17/34] power: supply: bq24257_charger: " Wolfram Sang
2019-06-13  9:50   ` Simon Horman
2019-06-08 10:55 ` [PATCH 18/34] power: supply: bq25890_charger: " Wolfram Sang
2019-06-13  9:50   ` Simon Horman
2019-06-08 10:55 ` [PATCH 19/34] power: supply: max14656_charger_detector: " Wolfram Sang
2019-06-13  9:51   ` Simon Horman
2019-06-08 10:55 ` [PATCH 20/34] power: supply: max17040_battery: " Wolfram Sang
2019-06-13  9:52   ` Simon Horman
2019-06-08 10:56 ` [PATCH 21/34] power: supply: max17042_battery: " Wolfram Sang
2019-06-13  9:52   ` Simon Horman
2019-06-08 10:56 ` [PATCH 22/34] power: supply: rt5033_battery: " Wolfram Sang
2019-06-13  9:52   ` Simon Horman
2019-06-08 10:56 ` Wolfram Sang [this message]
2019-06-13  9:52   ` [PATCH 23/34] power: supply: rt9455_charger: " Simon Horman
2019-06-08 10:56 ` [PATCH 24/34] power: supply: sbs-manager: " Wolfram Sang
2019-06-13  9:53   ` Simon Horman
2019-06-09 16:37 ` [PATCH 00/34] treewide: simplify getting the adapter of an I2C client Peter Rosin
2019-06-10  7:15   ` Wolfram Sang
2019-06-27 18:28 ` Sebastian Reichel

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190608105619.593-24-wsa+renesas@sang-engineering.com \
    --to=wsa+renesas@sang-engineering.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=sre@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-PM Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-pm/0 linux-pm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-pm linux-pm/ https://lore.kernel.org/linux-pm \
		linux-pm@vger.kernel.org
	public-inbox-index linux-pm

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-pm


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git