From 1c055e55a242a33e574e48be530e06770a210dcd Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Mon, 19 Feb 2024 03:26:26 +0000 Subject: [PATCH] add r8169 read mac form eeprom --- kernel/drivers/usb/typec/mux/pi3usb30532.c | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/kernel/drivers/usb/typec/mux/pi3usb30532.c b/kernel/drivers/usb/typec/mux/pi3usb30532.c index 5319611..7afe275 100644 --- a/kernel/drivers/usb/typec/mux/pi3usb30532.c +++ b/kernel/drivers/usb/typec/mux/pi3usb30532.c @@ -73,7 +73,8 @@ return ret; } -static int pi3usb30532_mux_set(struct typec_mux *mux, int state) +static int +pi3usb30532_mux_set(struct typec_mux *mux, struct typec_mux_state *state) { struct pi3usb30532 *pi = typec_mux_get_drvdata(mux); u8 new_conf; @@ -82,9 +83,10 @@ mutex_lock(&pi->lock); new_conf = pi->conf; - switch (state) { + switch (state->mode) { case TYPEC_STATE_SAFE: - new_conf = PI3USB30532_CONF_OPEN; + new_conf = (new_conf & PI3USB30532_CONF_SWAP) | + PI3USB30532_CONF_OPEN; break; case TYPEC_STATE_USB: new_conf = (new_conf & PI3USB30532_CONF_SWAP) | @@ -112,8 +114,8 @@ static int pi3usb30532_probe(struct i2c_client *client) { struct device *dev = &client->dev; - struct typec_switch_desc sw_desc; - struct typec_mux_desc mux_desc; + struct typec_switch_desc sw_desc = { }; + struct typec_mux_desc mux_desc = { }; struct pi3usb30532 *pi; int ret; -- Gitblit v1.6.2