linux-hwmon.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: linux-i2c@vger.kernel.org
Cc: Peter Rosin <peda@axentia.se>,
	Wolfram Sang <wsa+renesas@sang-engineering.com>,
	devicetree@vger.kernel.org, linux-hwmon@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org
Subject: [PATCH 0/3] treewide: simplify getting the adapter of an I2C client, part2
Date: Mon, 10 Jun 2019 11:51:53 +0200	[thread overview]
Message-ID: <20190610095157.11814-1-wsa+renesas@sang-engineering.com> (raw)

This is a small follow-up series to a larger cleanup series already
sent:

http://patchwork.ozlabs.org/project/linux-i2c/list/?series=112605
("treewide: simplify getting the adapter of an I2C client")

These drivers use a bit different but still unnecessarily complex way to
determine the adapter of a client. Thanks to Peter Rosin for pointing
them out. They have been fixed manually, no need for a coccinelle script
here. Build tested, too. From the previous cover-letter:

The I2C core populates the parent pointer of a client as:
	client->dev.parent = &client->adapter->dev;

Now take into consideration that
	to_i2c_adapter(&adapter->dev);

is a complicated way of saying 'adapter', then we can even formally
prove that the complicated expression can be simplified by using
client->adapter.

A branch can be found here:

git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/no_to_adapter

Please apply the patches to the individual subsystem trees. There are no
dependencies.

Thanks and kind regards,

   Wolfram

Wolfram Sang (3):
  hwmon: lm90: simplify getting the adapter of a client
  leds: is31fl319x: simplify getting the adapter of a client
  of: unittest: simplify getting the adapter of a client

 drivers/hwmon/lm90.c           | 2 +-
 drivers/leds/leds-is31fl319x.c | 2 +-
 drivers/of/unittest.c          | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

-- 
2.19.1


             reply	other threads:[~2019-06-10  9:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-10  9:51 Wolfram Sang [this message]
2019-06-10  9:51 ` [PATCH 1/3] hwmon: lm90: simplify getting the adapter of a client Wolfram Sang
2019-06-12 12:41   ` Guenter Roeck

Reply instructions:

You may reply publicly 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=20190610095157.11814-1-wsa+renesas@sang-engineering.com \
    --to=wsa+renesas@sang-engineering.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=peda@axentia.se \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).