Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

usb: typec: mux: Remove alt mode parameters from the API

The alt mode descriptor parameters are not used anymore.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Tested-by: Bjorn Andersson <andersson@kernel.org>
Acked-by: Prashant Malani <pmalani@chromium.org>
Link: https://lore.kernel.org/r/20230526131434.46920-3-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Heikki Krogerus and committed by
Greg Kroah-Hartman
3524fe31 4aebc4f8

+10 -18
+1 -1
drivers/platform/chrome/cros_ec_typec.c
··· 77 77 { 78 78 int ret = 0; 79 79 80 - port->mux = fwnode_typec_mux_get(fwnode, NULL); 80 + port->mux = fwnode_typec_mux_get(fwnode); 81 81 if (IS_ERR(port->mux)) { 82 82 ret = PTR_ERR(port->mux); 83 83 dev_dbg(dev, "Mux handle not found: %d.\n", ret);
+2 -2
drivers/usb/typec/class.c
··· 2110 2110 struct typec_mux *mux; 2111 2111 struct typec_retimer *retimer; 2112 2112 2113 - mux = typec_mux_get(&port->dev, desc); 2113 + mux = typec_mux_get(&port->dev); 2114 2114 if (IS_ERR(mux)) 2115 2115 return ERR_CAST(mux); 2116 2116 ··· 2274 2274 return ERR_PTR(ret); 2275 2275 } 2276 2276 2277 - port->mux = typec_mux_get(&port->dev, NULL); 2277 + port->mux = typec_mux_get(&port->dev); 2278 2278 if (IS_ERR(port->mux)) { 2279 2279 ret = PTR_ERR(port->mux); 2280 2280 put_device(&port->dev);
+2 -4
drivers/usb/typec/mux.c
··· 287 287 /** 288 288 * fwnode_typec_mux_get - Find USB Type-C Multiplexer 289 289 * @fwnode: The caller device node 290 - * @desc: Alt Mode description 291 290 * 292 291 * Finds a mux linked to the caller. This function is primarily meant for the 293 292 * Type-C drivers. Returns a reference to the mux on success, NULL if no 294 293 * matching connection was found, or ERR_PTR(-EPROBE_DEFER) when a connection 295 294 * was found but the mux has not been enumerated yet. 296 295 */ 297 - struct typec_mux *fwnode_typec_mux_get(struct fwnode_handle *fwnode, 298 - const struct typec_altmode_desc *desc) 296 + struct typec_mux *fwnode_typec_mux_get(struct fwnode_handle *fwnode) 299 297 { 300 298 struct typec_mux_dev *mux_devs[TYPEC_MUX_MAX_DEVS]; 301 299 struct typec_mux *mux; ··· 306 308 return ERR_PTR(-ENOMEM); 307 309 308 310 count = fwnode_connection_find_matches(fwnode, "mode-switch", 309 - (void *)desc, typec_mux_match, 311 + NULL, typec_mux_match, 310 312 (void **)mux_devs, 311 313 ARRAY_SIZE(mux_devs)); 312 314 if (count <= 0) {
+4 -7
include/linux/usb/typec_mux.h
··· 60 60 61 61 #if IS_ENABLED(CONFIG_TYPEC) 62 62 63 - struct typec_mux *fwnode_typec_mux_get(struct fwnode_handle *fwnode, 64 - const struct typec_altmode_desc *desc); 63 + struct typec_mux *fwnode_typec_mux_get(struct fwnode_handle *fwnode); 65 64 void typec_mux_put(struct typec_mux *mux); 66 65 int typec_mux_set(struct typec_mux *mux, struct typec_mux_state *state); 67 66 ··· 73 74 74 75 #else 75 76 76 - static inline struct typec_mux *fwnode_typec_mux_get(struct fwnode_handle *fwnode, 77 - const struct typec_altmode_desc *desc) 77 + static inline struct typec_mux *fwnode_typec_mux_get(struct fwnode_handle *fwnode); 78 78 { 79 79 return NULL; 80 80 } ··· 100 102 101 103 #endif /* CONFIG_TYPEC */ 102 104 103 - static inline struct typec_mux * 104 - typec_mux_get(struct device *dev, const struct typec_altmode_desc *desc) 105 + static inline struct typec_mux *typec_mux_get(struct device *dev) 105 106 { 106 - return fwnode_typec_mux_get(dev_fwnode(dev), desc); 107 + return fwnode_typec_mux_get(dev_fwnode(dev)); 107 108 } 108 109 109 110 #endif /* __USB_TYPEC_MUX */