From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Javier Carrasco <javier.carrasco@wolfvision.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Abdel Alkuor <abdelalkuor@geotab.com>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 3/3] usb: typec: tipd: rely on i2c_get_match_data()
Date: Mon, 6 May 2024 11:29:58 +0300 [thread overview]
Message-ID: <ZjiVBkkdUAZ0B/vb@kuha.fi.intel.com> (raw)
In-Reply-To: <20240429-tps6598x_fix_event_handling-v3-3-4e8e58dce489@wolfvision.net>
On Mon, Apr 29, 2024 at 03:35:59PM +0200, Javier Carrasco wrote:
> The first thing i2c_get_match_data() does is calling
> device_get_match_data(), which already checks if there is a fwnode.
>
> Remove explicit usage of device_get_match_data() as it is already
> included in i2c_get_match_data().
>
> Signed-off-by: Javier Carrasco <javier.carrasco@wolfvision.net>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> ---
> drivers/usb/typec/tipd/core.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c
> index 191f86da283d..ad76dbd20e65 100644
> --- a/drivers/usb/typec/tipd/core.c
> +++ b/drivers/usb/typec/tipd/core.c
> @@ -1365,10 +1365,7 @@ static int tps6598x_probe(struct i2c_client *client)
> TPS_REG_INT_PLUG_EVENT;
> }
>
> - if (dev_fwnode(tps->dev))
> - tps->data = device_get_match_data(tps->dev);
> - else
> - tps->data = i2c_get_match_data(client);
> + tps->data = i2c_get_match_data(client);
> if (!tps->data)
> return -EINVAL;
>
>
> --
> 2.40.1
--
heikki
prev parent reply other threads:[~2024-05-06 8:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-29 13:35 [PATCH v3 0/3] usb: typec: tipd: fix event checking in interrupt service routines Javier Carrasco
2024-04-29 13:35 ` [PATCH v3 1/3] usb: typec: tipd: fix event checking for tps25750 Javier Carrasco
2024-04-29 13:35 ` [PATCH v3 2/3] usb: typec: tipd: fix event checking for tps6598x Javier Carrasco
2024-04-29 13:35 ` [PATCH v3 3/3] usb: typec: tipd: rely on i2c_get_match_data() Javier Carrasco
2024-04-29 16:35 ` Dmitry Baryshkov
2024-05-06 8:29 ` Heikki Krogerus [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=ZjiVBkkdUAZ0B/vb@kuha.fi.intel.com \
--to=heikki.krogerus@linux.intel.com \
--cc=abdelalkuor@geotab.com \
--cc=gregkh@linuxfoundation.org \
--cc=javier.carrasco@wolfvision.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.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
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 read-only IMAP folder(s) and NNTP newsgroup(s).