From 1de6e23bdf0ee018aafac199b07c59d90bfc1a3d Mon Sep 17 00:00:00 2001 From: Linyu Yuan Date: Fri, 17 Jul 2020 11:49:00 +0800 Subject: [PATCH] usb: misc: nb7vpq904m: move gpio init before register ucsi callback ucsi callback may called immediately once register, move gpio init earlier will avoid issue. Change-Id: I0f154c964016c141486b7fefb86329193ae49119 Signed-off-by: Linyu Yuan --- drivers/usb/misc/ssusb-redriver-nb7vpq904m.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/misc/ssusb-redriver-nb7vpq904m.c b/drivers/usb/misc/ssusb-redriver-nb7vpq904m.c index e3011aa103b4..4e0f18549a6d 100644 --- a/drivers/usb/misc/ssusb-redriver-nb7vpq904m.c +++ b/drivers/usb/misc/ssusb-redriver-nb7vpq904m.c @@ -602,6 +602,8 @@ static int redriver_i2c_probe(struct i2c_client *client, return ret; } + ssusb_redriver_orientation_gpio_init(redriver); + redriver->panic_nb.notifier_call = ssusb_redriver_panic_notifier; atomic_notifier_chain_register(&panic_notifier_list, &redriver->panic_nb); @@ -609,8 +611,6 @@ static int redriver_i2c_probe(struct i2c_client *client, redriver->ucsi_nb.notifier_call = ssusb_redriver_ucsi_notifier; register_ucsi_glink_notifier(&redriver->ucsi_nb); - ssusb_redriver_orientation_gpio_init(redriver); - ssusb_redriver_debugfs_entries(redriver); return 0;