All of lore.kernel.org
 help / color / mirror / Atom feed
From: Javier Carrasco <javier.carrasco@wolfvision.net>
To: Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	 Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	 Abdel Alkuor <abdelalkuor@geotab.com>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	 Javier Carrasco <javier.carrasco@wolfvision.net>
Subject: [PATCH v3 3/3] usb: typec: tipd: rely on i2c_get_match_data()
Date: Mon, 29 Apr 2024 15:35:59 +0200	[thread overview]
Message-ID: <20240429-tps6598x_fix_event_handling-v3-3-4e8e58dce489@wolfvision.net> (raw)
In-Reply-To: <20240429-tps6598x_fix_event_handling-v3-0-4e8e58dce489@wolfvision.net>

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>
---
 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


  parent reply	other threads:[~2024-04-29 13:36 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 ` Javier Carrasco [this message]
2024-04-29 16:35   ` [PATCH v3 3/3] usb: typec: tipd: rely on i2c_get_match_data() Dmitry Baryshkov
2024-05-06  8:29   ` Heikki Krogerus

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=20240429-tps6598x_fix_event_handling-v3-3-4e8e58dce489@wolfvision.net \
    --to=javier.carrasco@wolfvision.net \
    --cc=abdelalkuor@geotab.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.