From: Jacek Anaszewski <jacek.anaszewski@gmail.com>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>,
linux-i2c@vger.kernel.org
Cc: Pavel Machek <pavel@ucw.cz>, Dan Murphy <dmurphy@ti.com>,
linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] leds: is31fl319x: simplify getting the adapter of a client
Date: Tue, 23 Jul 2019 21:02:21 +0200 [thread overview]
Message-ID: <f3a05808-91c4-3641-3d1a-3de6e510b46f@gmail.com> (raw)
In-Reply-To: <20190722181416.6743-1-wsa+renesas@sang-engineering.com>
Hi Wolfram,
Thank you for the patch.
On 7/22/19 8:14 PM, Wolfram Sang wrote:
> 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>
> ---
> drivers/leds/leds-is31fl319x.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/leds/leds-is31fl319x.c b/drivers/leds/leds-is31fl319x.c
> index 2d077b8edd0e..ca6634b8683c 100644
> --- a/drivers/leds/leds-is31fl319x.c
> +++ b/drivers/leds/leds-is31fl319x.c
> @@ -333,12 +333,11 @@ static int is31fl319x_probe(struct i2c_client *client,
> {
> struct is31fl319x_chip *is31;
> struct device *dev = &client->dev;
> - struct i2c_adapter *adapter = to_i2c_adapter(dev->parent);
> int err;
> int i = 0;
> u32 aggregated_led_microamp = IS31FL319X_CURRENT_MAX;
>
> - if (!i2c_check_functionality(adapter, I2C_FUNC_I2C))
> + if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C))
> return -EIO;
>
> is31 = devm_kzalloc(&client->dev, sizeof(*is31), GFP_KERNEL);
>
Applied.
--
Best regards,
Jacek Anaszewski
prev parent reply other threads:[~2019-07-23 19:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-22 18:14 [PATCH] leds: is31fl319x: simplify getting the adapter of a client Wolfram Sang
2019-07-23 19:02 ` Jacek Anaszewski [this message]
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=f3a05808-91c4-3641-3d1a-3de6e510b46f@gmail.com \
--to=jacek.anaszewski@gmail.com \
--cc=dmurphy@ti.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=wsa+renesas@sang-engineering.com \
/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).