All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] usb: typec: mux: Fix copy-paste mistake in typec_mux_match
@ 2021-06-10  0:21 Bjorn Andersson
  2021-06-10 12:33 ` Heikki Krogerus
  0 siblings, 1 reply; 2+ messages in thread
From: Bjorn Andersson @ 2021-06-10  0:21 UTC (permalink / raw)
  To: Heikki Krogerus, Greg Kroah-Hartman
  Cc: Rafael J. Wysocki, Andy Shevchenko, linux-usb, linux-kernel

Fix the copy-paste mistake in the return path of typec_mux_match(),
where dev is considered a member of struct typec_switch rather than
struct typec_mux.

The two structs are identical in regards to having the struct device as
the first entry, so this provides no functional change.

Fixes: 3370db35193b ("usb: typec: Registering real device entries for the muxes")
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---

Changes since v1:
- Don't touch the typec_switch part of mux.c...

 drivers/usb/typec/mux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/typec/mux.c b/drivers/usb/typec/mux.c
index 664fb3513f48..c8340de0ed49 100644
--- a/drivers/usb/typec/mux.c
+++ b/drivers/usb/typec/mux.c
@@ -246,7 +246,7 @@ static void *typec_mux_match(struct fwnode_handle *fwnode, const char *id,
 	dev = class_find_device(&typec_mux_class, NULL, fwnode,
 				mux_fwnode_match);
 
-	return dev ? to_typec_switch(dev) : ERR_PTR(-EPROBE_DEFER);
+	return dev ? to_typec_mux(dev) : ERR_PTR(-EPROBE_DEFER);
 }
 
 /**
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] usb: typec: mux: Fix copy-paste mistake in typec_mux_match
  2021-06-10  0:21 [PATCH v2] usb: typec: mux: Fix copy-paste mistake in typec_mux_match Bjorn Andersson
@ 2021-06-10 12:33 ` Heikki Krogerus
  0 siblings, 0 replies; 2+ messages in thread
From: Heikki Krogerus @ 2021-06-10 12:33 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Greg Kroah-Hartman, Rafael J. Wysocki, Andy Shevchenko,
	linux-usb, linux-kernel

On Wed, Jun 09, 2021 at 05:21:32PM -0700, Bjorn Andersson wrote:
> Fix the copy-paste mistake in the return path of typec_mux_match(),
> where dev is considered a member of struct typec_switch rather than
> struct typec_mux.
> 
> The two structs are identical in regards to having the struct device as
> the first entry, so this provides no functional change.
> 
> Fixes: 3370db35193b ("usb: typec: Registering real device entries for the muxes")
> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>

> ---
> 
> Changes since v1:
> - Don't touch the typec_switch part of mux.c...
> 
>  drivers/usb/typec/mux.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/typec/mux.c b/drivers/usb/typec/mux.c
> index 664fb3513f48..c8340de0ed49 100644
> --- a/drivers/usb/typec/mux.c
> +++ b/drivers/usb/typec/mux.c
> @@ -246,7 +246,7 @@ static void *typec_mux_match(struct fwnode_handle *fwnode, const char *id,
>  	dev = class_find_device(&typec_mux_class, NULL, fwnode,
>  				mux_fwnode_match);
>  
> -	return dev ? to_typec_switch(dev) : ERR_PTR(-EPROBE_DEFER);
> +	return dev ? to_typec_mux(dev) : ERR_PTR(-EPROBE_DEFER);
>  }
>  
>  /**

-- 
heikki

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-10 12:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-10  0:21 [PATCH v2] usb: typec: mux: Fix copy-paste mistake in typec_mux_match Bjorn Andersson
2021-06-10 12:33 ` Heikki Krogerus

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.